feat: initial Papo bot scaffold
This commit is contained in:
18
src/commands/tickets/claim.ts
Normal file
18
src/commands/tickets/claim.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js';
|
||||
import { SlashCommand } from '../../utils/types.js';
|
||||
import { context } from '../../config/context.js';
|
||||
|
||||
const command: SlashCommand = {
|
||||
guildOnly: true,
|
||||
data: new SlashCommandBuilder().setName('claim').setDescription('Übernimmt das aktuelle Ticket.'),
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
const ok = await context.tickets.claimTicket(interaction);
|
||||
if (!ok) {
|
||||
await interaction.reply({ content: 'Kein Ticket in diesem Kanal gefunden.', ephemeral: true });
|
||||
return;
|
||||
}
|
||||
await interaction.reply({ content: 'Ticket übernommen.' });
|
||||
}
|
||||
};
|
||||
|
||||
export default command;
|
||||
Reference in New Issue
Block a user