- 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.
61 lines
2.3 KiB
TypeScript
61 lines
2.3 KiB
TypeScript
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'
|
|
);
|