DiscordTickets/src/buttons/create.js

22 lines
425 B
JavaScript
Raw Normal View History

const { Button } = require('@eartharoid/dbf');
module.exports = class CreateButton extends Button {
constructor(client, options) {
super(client, {
...options,
id: 'create',
});
}
2022-08-06 00:21:55 +03:00
/**
* @param {*} id
* @param {import("discord.js").ButtonInteraction} interaction
*/
async run(id, interaction) {
await this.client.tickets.create({
categoryId: id.target,
interaction,
topic: id.topic,
});
}
};