mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-09-19 18:55:59 +03:00
26 lines
787 B
JavaScript
26 lines
787 B
JavaScript
const { SlashCommand } = require('@eartharoid/dbf');
|
|
|
|
module.exports = class ClaimSlashCommand extends SlashCommand {
|
|
constructor(client, options) {
|
|
const name = 'claim';
|
|
super(client, {
|
|
...options,
|
|
description: client.i18n.getMessage(null, `commands.slash.${name}.description`),
|
|
descriptionLocalizations: client.i18n.getAllMessages(`commands.slash.${name}.description`),
|
|
dmPermission: false,
|
|
name,
|
|
nameLocalizations: client.i18n.getAllMessages(`commands.slash.${name}.name`),
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
|
*/
|
|
async run(interaction) {
|
|
/** @type {import("client")} */
|
|
const client = this.client;
|
|
|
|
await interaction.deferReply({ ephemeral: false });
|
|
await client.tickets.claim(interaction);
|
|
}
|
|
}; |