Add giveaway, ticket, self-role, starboard, and suggestion features to the bot
- Introduced new models in the Prisma schema for giveaways, tickets, self-role panels, starboard configurations, and suggestions, enhancing the bot's functionality. - Implemented job handling for self-role expiration and ticket management, improving user experience. - Updated command localization to support new features in both German and English. - Enhanced the job processing system to include dedicated workers for managing tickets and self-role expirations. - Documented the new features and their setup processes in PHASE-TRACKING.md for clarity on implementation steps.
This commit is contained in:
61
apps/bot/src/modules/giveaways/command-definitions.ts
Normal file
61
apps/bot/src/modules/giveaways/command-definitions.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { applyCommandDescription, applyOptionDescription } from '@nexumi/shared';
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export const giveawayCommandData = applyCommandDescription(
|
||||
new SlashCommandBuilder()
|
||||
.setName('giveaway')
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('start'), 'giveaway.start.description')
|
||||
.addStringOption((o) =>
|
||||
applyOptionDescription(o.setName('duration').setRequired(true), 'giveaway.start.options.duration')
|
||||
)
|
||||
.addIntegerOption((o) =>
|
||||
applyOptionDescription(
|
||||
o.setName('winners').setRequired(true).setMinValue(1).setMaxValue(25),
|
||||
'giveaway.start.options.winners'
|
||||
)
|
||||
)
|
||||
.addStringOption((o) =>
|
||||
applyOptionDescription(o.setName('prize').setRequired(true), 'giveaway.start.options.prize')
|
||||
)
|
||||
.addRoleOption((o) =>
|
||||
applyOptionDescription(o.setName('role'), 'giveaway.start.options.role')
|
||||
)
|
||||
.addIntegerOption((o) =>
|
||||
applyOptionDescription(
|
||||
o.setName('level').setMinValue(0).setMaxValue(500),
|
||||
'giveaway.start.options.level'
|
||||
)
|
||||
)
|
||||
.addIntegerOption((o) =>
|
||||
applyOptionDescription(
|
||||
o.setName('member_days').setMinValue(0).setMaxValue(3650),
|
||||
'giveaway.start.options.member_days'
|
||||
)
|
||||
)
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('end'), 'giveaway.end.description').addStringOption((o) =>
|
||||
applyOptionDescription(o.setName('id').setRequired(true), 'giveaway.common.options.id')
|
||||
)
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('reroll'), 'giveaway.reroll.description').addStringOption(
|
||||
(o) => applyOptionDescription(o.setName('id').setRequired(true), 'giveaway.common.options.id')
|
||||
)
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('list'), 'giveaway.list.description')
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('delete'), 'giveaway.delete.description').addStringOption(
|
||||
(o) => applyOptionDescription(o.setName('id').setRequired(true), 'giveaway.common.options.id')
|
||||
)
|
||||
)
|
||||
.addSubcommand((s) =>
|
||||
applyCommandDescription(s.setName('pause'), 'giveaway.pause.description').addStringOption(
|
||||
(o) => applyOptionDescription(o.setName('id').setRequired(true), 'giveaway.common.options.id')
|
||||
)
|
||||
),
|
||||
'giveaway.description'
|
||||
);
|
||||
Reference in New Issue
Block a user