Have ideas to improve npm?Join in the discussion! »

    djs-tickets

    5.0.0 • Public • Published

    This is for the ones using npm package

    First you need to install using

    npm i djs-tickets

    For Support

    Discord server

    Defining

    const discord = require('discord.js')
    const client = new discord.Client()
    const ticket = require('djs-tickets')

    Functions

    ticket.client("SECRET") // Your discord bot token
    ticket.prefix("tt!") // Whatever Prefix you wanna keep
    ticket.status("Hi I am bot") // Bot's status

    Usage Example

    const discord = require('discord.js')
    const client = new discord.Client()
    const ticket = require('djs-tickets')
     
     
     
    ticket.client("SECRET") // Your discord bot token
    ticket.prefix("tt!") // Whatever Prefix you wanna keep
    ticket.status("Hi I am bot") // Bot's status
     
    // Now 2 commands are ready !
    // (tt!)ticket-setup 
    // (tt!)close
    // Transcript also
     
    client.on("message", async message => {
     
    if(message.content === 'tt!help'){
     const help = new Discord.MessageEmbed()
          .setTitle(`Discord Ticket`)
          .setDescription(
            `**My Commands**
                     PS: You should use tt! before every command XD`
          )
          .addField(
            `🚨 Instruction`,
            "Make sure to create a role called `Patrol` with exact capitalisation and also give it to moderators or one's you want to give ability to chat in ticket"
          )
          .addField(
            `Setup Command`,
            "**Admins** of the server should run `tt!ticket-setup` after doing above steps"
          )
          .addField(`Setup usage`, "`tt!ticket-setup #channel`")
          .addField(
            `Open Ticket`,
            `You just have to react with 🎫 in desired channel`
          )
          .addField(`Close Ticket`, "`tt!close` is command used to close a ticket")
          .addField(`Transcript`, "When close ticket command is run, chat history will be dmed you and will be sent in channel")
     
          .setColor("RANDOM");
        message.channel.send(help);
        }
     
    })
     
    client.login('1234567890') // Your Discord bot token

    Install

    npm i djs-tickets

    DownloadsWeekly Downloads

    62

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    38.5 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar