Add stats, feeds, scheduler, and guild backup features to the bot

- Introduced new models in the Prisma schema for statistics, social feeds, scheduled messages, and guild backups, enhancing the bot's functionality.
- Implemented command modules for managing stats channels, feeds, scheduling messages, and creating/restoring backups, improving user engagement and server management.
- Updated job handling to include dedicated workers for stats updates, feed polling, scheduling, and backup restoration, enhancing automation.
- Enhanced command localization for new features in both German and English.
- Documented the new features and their setup processes in PHASE-TRACKING.md for clarity on implementation steps.
This commit is contained in:
smueller
2026-07-22 13:36:39 +02:00
parent 52b10c9536
commit 12066befa8
36 changed files with 4032 additions and 42 deletions

View File

@@ -0,0 +1,60 @@
import { applyCommandDescription, applyOptionDescription } from '@nexumi/shared';
import { ChannelType, SlashCommandBuilder } from 'discord.js';
export const statsCommandData = applyCommandDescription(
new SlashCommandBuilder()
.setName('stats')
.addSubcommand((sub) =>
applyCommandDescription(sub.setName('setup'), 'stats.setup.description')
.addChannelOption((option) =>
applyOptionDescription(
option
.setName('members_channel')
.setRequired(true)
.addChannelTypes(ChannelType.GuildVoice, ChannelType.GuildText),
'stats.setup.options.members_channel'
)
)
.addChannelOption((option) =>
applyOptionDescription(
option
.setName('online_channel')
.setRequired(true)
.addChannelTypes(ChannelType.GuildVoice, ChannelType.GuildText),
'stats.setup.options.online_channel'
)
)
.addChannelOption((option) =>
applyOptionDescription(
option
.setName('boosts_channel')
.setRequired(true)
.addChannelTypes(ChannelType.GuildVoice, ChannelType.GuildText),
'stats.setup.options.boosts_channel'
)
)
.addStringOption((option) =>
applyOptionDescription(option.setName('members_template'), 'stats.setup.options.members_template')
)
.addStringOption((option) =>
applyOptionDescription(option.setName('online_template'), 'stats.setup.options.online_template')
)
.addStringOption((option) =>
applyOptionDescription(option.setName('boosts_template'), 'stats.setup.options.boosts_template')
)
)
.addSubcommand((sub) => applyCommandDescription(sub.setName('refresh'), 'stats.refresh.description')),
'stats.description'
);
export const invitesCommandData = applyCommandDescription(
new SlashCommandBuilder()
.setName('invites')
.addSubcommand((sub) =>
applyCommandDescription(sub.setName('view'), 'invites.view.description').addUserOption((option) =>
applyOptionDescription(option.setName('user'), 'invites.view.options.user')
)
)
.addSubcommand((sub) => applyCommandDescription(sub.setName('leaderboard'), 'invites.leaderboard.description')),
'invites.description'
);