discord-ticket-easy
v2.7.0
Published
- A module allowing the simple creation of a discord ticket with your client supported by Discord.js^14.0.0 - The easiest to use ticket module.
Downloads
28
Maintainers
Readme
Discord-Ticket
- A module allowing the simple creation of a discord ticket with your client supported by Discord.js^14.0.0
- The easiest to use ticket module.
News
- nothing for the moment
Installation
Set an api Key
(index.js)
const { Client } = require("discord-ticket-easy");
Client.setApiKey("<your-api-key>")
Setup a new ticket.
const { Setup } = require("discord-ticket-easy");
const Discord = require("discord.js");
const intents = new Discord.IntentsBitField(3276799);
const client = new Discord.Client({intents});
client.on("ready", () => {
console.log("I'm login !")
});
client.on("interactionCreate", async (interaction) => {
if (interaction.isChatInputCommand() && interaction.commandName === 'tsetup') {
let manager = new Setup(bot, {
interaction: interaction
})
manager.setupMessageTicket()
}
});
Setup the interaction
⚠️ The interaction handler must be placed either in a Client.on function which takes "interactionCreate" as a parameter or in a file defined by your bot which retrieves this same parameter. If you enter the handler in a Client.on which supports the "interactionCreate" event and which itself is in a file containing this last parameter, then the handler will not work.
In the example below, the manager is only in the client.on which supports the "interactionCreate" event.
const { Interaction } = require("discord-ticket-easy");
const Discord = require("discord.js");
const intents = new Discord.IntentsBitField(3276799);
const client = new Discord.Client({intents});
client.on("ready", () => {
console.log("I'm login !")
});
client.on("interactionCreate", async (interaction) => {
new Interaction(client, interaction).start()
})
Other
To contact the owner of this module, you can join his discord server and ask him a question.
For anything else, ditto, join his discord server.
(careful, this discord server is on french!)