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:
smueller
2026-07-22 12:49:17 +02:00
parent 2518119257
commit fa5910ec43
38 changed files with 6759 additions and 144 deletions

View 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')
)
);