DiscordTickets/src/commands/slash/claim.js

26 lines
787 B
JavaScript
Raw Normal View History

2022-08-08 23:55:09 +03:00
const { SlashCommand } = require('@eartharoid/dbf');
module.exports = class ClaimSlashCommand extends SlashCommand {
constructor(client, options) {
2022-10-26 20:58:46 +03:00
const name = 'claim';
2022-08-08 23:55:09 +03:00
super(client, {
...options,
2022-10-26 20:58:46 +03:00
description: client.i18n.getMessage(null, `commands.slash.${name}.description`),
descriptionLocalizations: client.i18n.getAllMessages(`commands.slash.${name}.description`),
2022-08-08 23:55:09 +03:00
dmPermission: false,
2022-10-26 20:58:46 +03:00
name,
nameLocalizations: client.i18n.getAllMessages(`commands.slash.${name}.name`),
2022-08-08 23:55:09 +03:00
});
}
2022-10-29 02:33:19 +03:00
/**
* @param {import("discord.js").ChatInputCommandInteraction} interaction
*/
async run(interaction) {
2022-10-29 02:33:19 +03:00
/** @type {import("client")} */
const client = this.client;
await interaction.deferReply({ ephemeral: false });
await client.tickets.claim(interaction);
}
2022-08-08 23:55:09 +03:00
};