Carl-Bot-Paket: Moderation, Auto-/Sticky-Roles, Level-System, Tags, geplante Posts
- Moderation: /warn (DM + Mod-Log), /warns (Historie + löschen), /timeout (max 28d), /purge (bulk, 14-Tage-Limit sauber gemeldet); Mod-Log erweitert um Join/Leave und Nick-/Rollen-Änderungen - Auto-Rolle bei Join + Sticky-Roles (Rollen bei Leave gesichert, bei Rejoin wiederhergestellt; managed/@everyone ausgenommen) — Rollen-Tab - Level-System (opt-in): 15-25 XP/Nachricht mit 60s-Cooldown, MEE6-Formel, Level-Up-Announce, Rollen-Belohnungen (Level=RolleID), /rank mit Fortschritt, öffentliche Bestenliste /level; Community-Tab - Tags: /tag mit Autocomplete, Verwaltung im Composer-Tab (/api/tags) - Geplante Posts: einmalig/täglich/wöchentlich, Minuten-Scheduler, DST-sicher über Neuberechnung aus Zeitfeldern; Composer-Tab (/api/scheduled) - Autocomplete-Dispatch im InteractionCreate; alles smoke-getestet Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+21
-1
@@ -5,6 +5,7 @@ import { devlogChannelId, devlogPingRoleId, playtesterRoleId, ticketChannelId }
|
||||
import { archiveDevlogMessage, removeDevlog } from './devlog-archive.js';
|
||||
import { registerCommunityListeners } from './community.js';
|
||||
import { registerModTools } from './mod-tools.js';
|
||||
import { registerLevels } from './levels.js';
|
||||
import { handleRoleMenuButton } from './role-menus.js';
|
||||
import {
|
||||
addPlaytester, removePlaytester, isWish, bumpWish,
|
||||
@@ -20,9 +21,18 @@ import * as galerieBackfill from './commands/galerie-backfill.js';
|
||||
import * as wunsch from './commands/wunsch.js';
|
||||
import * as giveaway from './commands/giveaway.js';
|
||||
import * as ticketSetup from './commands/ticket-setup.js';
|
||||
import * as warn from './commands/warn.js';
|
||||
import * as warns from './commands/warns.js';
|
||||
import * as timeout from './commands/timeout.js';
|
||||
import * as purge from './commands/purge.js';
|
||||
import * as rank from './commands/rank.js';
|
||||
import * as tag from './commands/tag.js';
|
||||
|
||||
// Alle Commands hier eintragen — jedes Modul exportiert { data, execute }
|
||||
const commandModules = [ping, devlogBackfill, bug, playtesterSetup, galerieBackfill, wunsch, giveaway, ticketSetup];
|
||||
const commandModules = [
|
||||
ping, devlogBackfill, bug, playtesterSetup, galerieBackfill,
|
||||
wunsch, giveaway, ticketSetup, warn, warns, timeout, purge, rank, tag,
|
||||
];
|
||||
|
||||
export async function startBot() {
|
||||
const client = new Client({
|
||||
@@ -92,6 +102,15 @@ export async function startBot() {
|
||||
});
|
||||
|
||||
client.on(Events.InteractionCreate, async (interaction) => {
|
||||
// Autocomplete (z. B. /tag)
|
||||
if (interaction.isAutocomplete()) {
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
await command?.autocomplete?.(interaction).catch((e) =>
|
||||
console.error(`[bot] Autocomplete /${interaction.commandName}:`, e)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔔-Button unterm Devlog: Ping-Rolle selbst an-/abmelden
|
||||
if (interaction.isButton() && interaction.customId === 'devlog_ping_toggle') {
|
||||
const roleId = devlogPingRoleId();
|
||||
@@ -276,6 +295,7 @@ export async function startBot() {
|
||||
|
||||
registerCommunityListeners(client);
|
||||
registerModTools(client);
|
||||
registerLevels(client);
|
||||
|
||||
await client.login(config.discordToken);
|
||||
return client;
|
||||
|
||||
Reference in New Issue
Block a user