DiscordTickets/src/commands/slash/claim.js
2022-10-29 00:33:19 +01:00

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);
}
};