mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02:00
22 lines
425 B
JavaScript
22 lines
425 B
JavaScript
const { Button } = require('@eartharoid/dbf');
|
|
|
|
module.exports = class CreateButton extends Button {
|
|
constructor(client, options) {
|
|
super(client, {
|
|
...options,
|
|
id: 'create',
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param {*} id
|
|
* @param {import("discord.js").ButtonInteraction} interaction
|
|
*/
|
|
async run(id, interaction) {
|
|
await this.client.tickets.create({
|
|
categoryId: id.target,
|
|
interaction,
|
|
topic: id.topic,
|
|
});
|
|
}
|
|
}; |