Enhance bot and WebUI functionality with new features and environment updates
- Added support for new environment variables in `.env.example` for public site and legal operator information. - Integrated core commands into the bot's command structure for improved functionality. - Implemented a new `publishBotStatus` function to update bot status in Redis, enhancing monitoring capabilities. - Updated the landing page to include features, invite links, and support server access, improving user experience. - Enhanced localization with new keys for core commands and landing page elements in both English and German. - Improved error handling and logging for bot presence updates and status publishing.
This commit is contained in:
@@ -1398,6 +1398,26 @@ export const commandLocales = {
|
||||
'guildbackup.common.options.id': {
|
||||
de: 'Backup-ID',
|
||||
en: 'Backup ID'
|
||||
},
|
||||
'core.help.description': {
|
||||
de: 'Command-Übersicht nach Modulen',
|
||||
en: 'Command overview by module'
|
||||
},
|
||||
'core.help.options.module': {
|
||||
de: 'Modul filtern (z. B. moderation)',
|
||||
en: 'Filter by module (e.g. moderation)'
|
||||
},
|
||||
'core.info.description': {
|
||||
de: 'Bot-Info: Version, Uptime, Shard, Links',
|
||||
en: 'Bot info: version, uptime, shard, links'
|
||||
},
|
||||
'core.invite.description': {
|
||||
de: 'Einladungslink für Nexumi',
|
||||
en: 'Invite link for Nexumi'
|
||||
},
|
||||
'core.support.description': {
|
||||
de: 'Link zum Support-Server',
|
||||
en: 'Link to the support server'
|
||||
}
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ export * from './phase5.js';
|
||||
export * from './phase6.js';
|
||||
export * from './dashboard.js';
|
||||
export * from './owner.js';
|
||||
export * from './public.js';
|
||||
|
||||
export const LocaleSchema = z.enum(['de', 'en']);
|
||||
export type Locale = z.infer<typeof LocaleSchema>;
|
||||
@@ -52,6 +53,48 @@ const de: Dictionary = {
|
||||
'generic.error': 'Es ist ein Fehler aufgetreten.',
|
||||
'generic.maintenance': 'Nexumi ist derzeit im Wartungsmodus. Bitte versuche es später erneut.',
|
||||
'generic.unknownCommand': 'Unbekannter Befehl.',
|
||||
'core.help.title': 'Nexumi Hilfe',
|
||||
'core.help.subtitle': 'Commands nach Modul. Optional: `/help module:<name>`.',
|
||||
'core.help.moduleLine': '**{module}**: {commands}',
|
||||
'core.help.unknownModule': 'Unbekanntes Modul. Verfügbar: {modules}',
|
||||
'core.help.footer': 'Mehr Infos: /info · Dashboard: {webui}',
|
||||
'core.info.title': 'Nexumi',
|
||||
'core.info.version': 'Version',
|
||||
'core.info.uptime': 'Uptime',
|
||||
'core.info.shard': 'Shard',
|
||||
'core.info.guilds': 'Server (dieser Shard)',
|
||||
'core.info.latency': 'API-Latenz',
|
||||
'core.info.links': 'Links',
|
||||
'core.info.link.dashboard': 'Dashboard',
|
||||
'core.info.link.invite': 'Einladen',
|
||||
'core.info.link.support': 'Support',
|
||||
'core.info.link.status': 'Status',
|
||||
'core.invite.title': 'Nexumi einladen',
|
||||
'core.invite.body': 'Lade Nexumi mit diesem Link auf deinen Server ein:',
|
||||
'core.support.title': 'Support',
|
||||
'core.support.body': 'Tritt unserem Support-Server bei:',
|
||||
'core.support.missing': 'Kein Support-Server konfiguriert. Bitte SUPPORT_SERVER_URL setzen.',
|
||||
'core.module.core': 'Basis',
|
||||
'core.module.moderation': 'Moderation',
|
||||
'core.module.automod': 'Auto-Moderation',
|
||||
'core.module.welcome': 'Willkommen',
|
||||
'core.module.verification': 'Verifizierung',
|
||||
'core.module.leveling': 'Leveling',
|
||||
'core.module.economy': 'Economy',
|
||||
'core.module.utility': 'Utility',
|
||||
'core.module.fun': 'Fun',
|
||||
'core.module.giveaways': 'Giveaways',
|
||||
'core.module.tickets': 'Tickets',
|
||||
'core.module.selfroles': 'Self-Roles',
|
||||
'core.module.tags': 'Tags',
|
||||
'core.module.starboard': 'Starboard',
|
||||
'core.module.suggestions': 'Vorschläge',
|
||||
'core.module.birthdays': 'Geburtstage',
|
||||
'core.module.tempvoice': 'Temp-Voice',
|
||||
'core.module.stats': 'Statistiken',
|
||||
'core.module.feeds': 'Feeds',
|
||||
'core.module.scheduler': 'Scheduler',
|
||||
'core.module.guildbackup': 'Backup',
|
||||
'moderation.success': 'Aktion erfolgreich ausgeführt.',
|
||||
'moderation.reason.none': 'Kein Grund angegeben',
|
||||
'moderation.warning.created': 'Verwarnung erstellt: {warningId}',
|
||||
@@ -527,6 +570,48 @@ const en: Dictionary = {
|
||||
'generic.error': 'An error occurred.',
|
||||
'generic.maintenance': 'Nexumi is currently in maintenance mode. Please try again later.',
|
||||
'generic.unknownCommand': 'Unknown command.',
|
||||
'core.help.title': 'Nexumi Help',
|
||||
'core.help.subtitle': 'Commands by module. Optional: `/help module:<name>`.',
|
||||
'core.help.moduleLine': '**{module}**: {commands}',
|
||||
'core.help.unknownModule': 'Unknown module. Available: {modules}',
|
||||
'core.help.footer': 'More: /info · Dashboard: {webui}',
|
||||
'core.info.title': 'Nexumi',
|
||||
'core.info.version': 'Version',
|
||||
'core.info.uptime': 'Uptime',
|
||||
'core.info.shard': 'Shard',
|
||||
'core.info.guilds': 'Servers (this shard)',
|
||||
'core.info.latency': 'API latency',
|
||||
'core.info.links': 'Links',
|
||||
'core.info.link.dashboard': 'Dashboard',
|
||||
'core.info.link.invite': 'Invite',
|
||||
'core.info.link.support': 'Support',
|
||||
'core.info.link.status': 'Status',
|
||||
'core.invite.title': 'Invite Nexumi',
|
||||
'core.invite.body': 'Invite Nexumi to your server with this link:',
|
||||
'core.support.title': 'Support',
|
||||
'core.support.body': 'Join our support server:',
|
||||
'core.support.missing': 'No support server configured. Set SUPPORT_SERVER_URL.',
|
||||
'core.module.core': 'Core',
|
||||
'core.module.moderation': 'Moderation',
|
||||
'core.module.automod': 'Auto-Moderation',
|
||||
'core.module.welcome': 'Welcome',
|
||||
'core.module.verification': 'Verification',
|
||||
'core.module.leveling': 'Leveling',
|
||||
'core.module.economy': 'Economy',
|
||||
'core.module.utility': 'Utility',
|
||||
'core.module.fun': 'Fun',
|
||||
'core.module.giveaways': 'Giveaways',
|
||||
'core.module.tickets': 'Tickets',
|
||||
'core.module.selfroles': 'Self-Roles',
|
||||
'core.module.tags': 'Tags',
|
||||
'core.module.starboard': 'Starboard',
|
||||
'core.module.suggestions': 'Suggestions',
|
||||
'core.module.birthdays': 'Birthdays',
|
||||
'core.module.tempvoice': 'Temp Voice',
|
||||
'core.module.stats': 'Stats',
|
||||
'core.module.feeds': 'Feeds',
|
||||
'core.module.scheduler': 'Scheduler',
|
||||
'core.module.guildbackup': 'Backup',
|
||||
'moderation.success': 'Action executed successfully.',
|
||||
'moderation.reason.none': 'No reason provided',
|
||||
'moderation.warning.created': 'Warning created: {warningId}',
|
||||
|
||||
28
packages/shared/src/public.ts
Normal file
28
packages/shared/src/public.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const PublicStatsSchema = z.object({
|
||||
guildCount: z.number().int().nonnegative(),
|
||||
approximateUserCount: z.number().int().nonnegative(),
|
||||
updatedAt: z.string()
|
||||
});
|
||||
|
||||
export type PublicStats = z.infer<typeof PublicStatsSchema>;
|
||||
|
||||
export const BotStatusShardSchema = z.object({
|
||||
id: z.number().int().nonnegative(),
|
||||
status: z.string(),
|
||||
guildCount: z.number().int().nonnegative(),
|
||||
ping: z.number()
|
||||
});
|
||||
|
||||
export const BotStatusPayloadSchema = z.object({
|
||||
shards: z.array(BotStatusShardSchema),
|
||||
apiLatencyMs: z.number(),
|
||||
guildCount: z.number().int().nonnegative(),
|
||||
uptimeSeconds: z.number(),
|
||||
updatedAt: z.string()
|
||||
});
|
||||
|
||||
export type BotStatusPayload = z.infer<typeof BotStatusPayloadSchema>;
|
||||
|
||||
export const BOT_STATUS_REDIS_KEY = 'bot:status';
|
||||
Reference in New Issue
Block a user