2022-08-02 20:03:55 +03:00
|
|
|
const { Menu } = require('@eartharoid/dbf');
|
|
|
|
|
|
|
|
module.exports = class CreateMenu extends Menu {
|
|
|
|
constructor(client, options) {
|
|
|
|
super(client, {
|
|
|
|
...options,
|
|
|
|
id: 'create',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-08-06 00:21:55 +03:00
|
|
|
/**
|
|
|
|
* @param {*} id
|
|
|
|
* @param {import("discord.js").SelectMenuInteraction} interaction
|
|
|
|
*/
|
|
|
|
async run(id, interaction) {
|
2022-08-09 01:36:45 +03:00
|
|
|
interaction.message.edit({ components: interaction.message.components }); // reset the select menu (minor client-side UI issue)
|
2022-08-06 00:21:55 +03:00
|
|
|
await this.client.tickets.create({
|
|
|
|
categoryId: interaction.values[0],
|
|
|
|
interaction,
|
|
|
|
topic: id.topic,
|
|
|
|
});
|
|
|
|
}
|
2022-08-02 20:03:55 +03:00
|
|
|
};
|