Implement leveling and economy features with associated models and commands
- Added new models for leveling and economy functionalities in the Prisma schema, including LevelingConfig, MemberLevel, LevelReward, EconomyConfig, MemberEconomy, ShopItem, and InventoryItem. - Introduced commands for managing XP, economy transactions, and shop interactions, enhancing user engagement. - Updated job handling to include reminders and poll closing functionalities. - Enhanced localization support for new commands and features in both German and English. - Improved the bot's job processing capabilities with a dedicated reminder worker for scheduled tasks.
This commit is contained in:
49
apps/bot/src/modules/leveling/command-definitions.ts
Normal file
49
apps/bot/src/modules/leveling/command-definitions.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import { applyCommandDescription, applyOptionDescription } from '@nexumi/shared';
|
||||
|
||||
export const rankCommandData = applyCommandDescription(
|
||||
new SlashCommandBuilder().setName('rank'),
|
||||
'leveling.rank.description'
|
||||
).addUserOption((option) =>
|
||||
applyOptionDescription(option.setName('user'), 'leveling.rank.options.user')
|
||||
);
|
||||
|
||||
export const leaderboardCommandData = applyCommandDescription(
|
||||
new SlashCommandBuilder().setName('leaderboard'),
|
||||
'leveling.leaderboard.description'
|
||||
);
|
||||
|
||||
export const xpCommandData = applyCommandDescription(
|
||||
new SlashCommandBuilder().setName('xp'),
|
||||
'leveling.xp.description'
|
||||
)
|
||||
.addSubcommand((sub) =>
|
||||
applyCommandDescription(sub.setName('give'), 'leveling.xp.give.description')
|
||||
.addUserOption((option) =>
|
||||
applyOptionDescription(option.setName('user').setRequired(true), 'leveling.xp.options.user')
|
||||
)
|
||||
.addIntegerOption((option) =>
|
||||
applyOptionDescription(
|
||||
option.setName('amount').setRequired(true).setMinValue(1).setMaxValue(1_000_000),
|
||||
'leveling.xp.options.amount'
|
||||
)
|
||||
)
|
||||
)
|
||||
.addSubcommand((sub) =>
|
||||
applyCommandDescription(sub.setName('remove'), 'leveling.xp.remove.description')
|
||||
.addUserOption((option) =>
|
||||
applyOptionDescription(option.setName('user').setRequired(true), 'leveling.xp.options.user')
|
||||
)
|
||||
.addIntegerOption((option) =>
|
||||
applyOptionDescription(
|
||||
option.setName('amount').setRequired(true).setMinValue(1).setMaxValue(1_000_000),
|
||||
'leveling.xp.options.amount'
|
||||
)
|
||||
)
|
||||
)
|
||||
.addSubcommand((sub) =>
|
||||
applyCommandDescription(sub.setName('reset'), 'leveling.xp.reset.description').addUserOption(
|
||||
(option) =>
|
||||
applyOptionDescription(option.setName('user').setRequired(true), 'leveling.xp.options.user')
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user