mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: catch errors
This commit is contained in:
parent
7e4039dcce
commit
25d7cdaee8
@ -14,7 +14,7 @@ module.exports = class CreateMenu extends Menu {
|
|||||||
* @param {import("discord.js").SelectMenuInteraction} interaction
|
* @param {import("discord.js").SelectMenuInteraction} interaction
|
||||||
*/
|
*/
|
||||||
async run(id, interaction) {
|
async run(id, interaction) {
|
||||||
if (!interaction.message.flags.has(MessageFlags.Ephemeral)) interaction.message.edit({ components: interaction.message.components }); // reset the select menu (minor client-side UI issue)
|
if (!interaction.message.flags.has(MessageFlags.Ephemeral)) interaction.message.edit({ components: interaction.message.components }).catch(() => { }); // reset the select menu (to fix a UI issue)
|
||||||
await this.client.tickets.create({
|
await this.client.tickets.create({
|
||||||
...id,
|
...id,
|
||||||
categoryId: interaction.values[0],
|
categoryId: interaction.values[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user