mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-04 09:21:25 +03:00
feat: add ticket claiming
This commit is contained in:
@@ -8,5 +8,15 @@ module.exports = class ClaimButton extends Button {
|
||||
});
|
||||
}
|
||||
|
||||
async run (id, interaction) {}
|
||||
/**
|
||||
* @param {*} id
|
||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
*/
|
||||
async run(id, interaction) {
|
||||
/** @type {import("client")} */
|
||||
const client = this.client;
|
||||
|
||||
await interaction.deferReply({ ephemeral: false });
|
||||
await client.tickets.claim(interaction);
|
||||
}
|
||||
};
|
@@ -8,5 +8,15 @@ module.exports = class UnclaimButton extends Button {
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
/**
|
||||
* @param {*} id
|
||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
*/
|
||||
async run(id, interaction) {
|
||||
/** @type {import("client")} */
|
||||
const client = this.client;
|
||||
|
||||
await interaction.deferReply({ ephemeral: false });
|
||||
await client.tickets.release(interaction);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user