npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

distickets

v1.1.1

Published

package to create ticket system

Downloads

12

Readme

DisTickets

Discord-Ticket is an npm package who allows you to create a perfectly working ticket system with buttons!.

Installation

Use node.js to install distickets.

npm install distickets

Usage

const discord = require('discord.js')
const client = new discord.Client({intents: [discord.Intents.FLAGS.GUILDS, discord.Intents.FLAGS.GUILD_MESSAGES]});
const { Ticket, TicketInteraction } = require('distickets')


client.on('messageCreate', async message => {
    if(message.author.bot) return;    

    if(message.content.startsWith('!deployticket')) {

    //here you can put whatever you want, I suggest making a permission filter
    const ticketembed = new Ticket({
        client: client,
        channel:client.channels.cache.get("CHANNEL ID"), //id of the channel where the ticket create embed should get sent
        configuration: {
            title: "Support Ticket", //default: Ticket Support
            description: "Press for support.", //default: Press the emoji to open a ticket
            buttonName: "Open Ticket", //default: Open Ticket
            color: "BLURPLE", //default: BLACK
            footer: "Powered by distickets", //default: Powered by discord-ticket
            openEmoji: "📖" //default: 📖
        }
      })

      ticketembed.create()

}})

client.on('interactionCreate', async interaction => {

    const ticketinter = new TicketInteraction({
        interaction: interaction,
        configuration: {
            openTitle: "Ticket Opened!", //default: Ticket Support
            openFooter: "powered by distickets",
            openDesc: `${interaction.user}, wait for a moderator to come!`, //default: Wait for a staffer
            openCategory: "ticket category id", //default: no one
            openColor: "BLURPLE", //default: BLACK
            ticketOpenTitle: "ERROR", //default = ERROR
            ticketOpenDescription: "You already have a ticket opened!", //default: You already have a ticket opened!
            ticketOpenFooter: `${interaction.guild.name}`, //default: server's name
            ticketOpenColor: "BLURPLE", //default: BLACK
            roleView: "role id", //id of the role allowed to see the tickets. 
            closeTitle: `Closing Ticket`, //default: CLosing Ticket
            closeDesc: `Ticket will close in 10s`, //adjust to match with closeTime
            closeTime: "10s", //default: 10s - use s for seconds, m for minutes, d for days
            closeButton: "Close ticket", //default: Close Ticket
            closeEmoji: "❎" //deafult: ❎ 
        }
    })
    ticketinter.onInteraction()
})



client.login('TOKEN')

ScreenShots

ticket create embed

Ticket Open

Ticket Close