Community-Endgame: Alpha-Keys, Bewerbungen, Events, Stats, Triggers, /remind, Social, Temp-Voice + MEE6-Bot-Karte
- Alpha-Keys: Pool im Community-Tab, Ein-Klick-Verteilung per DM an alle Playtester (Key bleibt frei, wenn die DM geblockt wird) - Bewerbungs-Formulare: Builder im neuen Bewerbungen-Tab (bis 5 Fragen), Button → Discord-Modal → Review-Embed mit ✅/❌, Rolle + DM bei Entscheidung - Events: GuildScheduledEventCreate → Announce-Embed; öffentliche /events-Seite aus den Discord-Events (5-min-Cache) - Server-Stats: activity_daily (Nachrichten/Joins/Leaves) → Balken-Chart auf /level - Triggers (Auto-Antworten, 30s-Cooldown), /remind (DM-Scheduler), Twitch-Live (Helix, App-Creds write-only) + YouTube-RSS-Announcements, Temp-Voice (Join to Create, Cleanup bei Leerstand + Start) - Brand-Tab: MEE6-Style Bot-Identity-Karte (Avatar-Vorschau mit Status-Dot, Bot-Name via setUsername, Presence online/idle/dnd, Aktivität) - Neue Intents: GuildVoiceStates, GuildScheduledEvents; alles smoke-getestet Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+9
-8
@@ -1,7 +1,7 @@
|
||||
// Bot-Status (Presence) aus den Branding-Settings — hat Vorrang vor dem
|
||||
// Server-Monitor (der die Presence nur nutzt, wenn hier nichts gesetzt ist).
|
||||
// Server-Monitor (der die Presence nur nutzt, wenn hier kein Text gesetzt ist).
|
||||
import { ActivityType, Events } from 'discord.js';
|
||||
import { botStatusText, botStatusType } from '../runtime-settings.js';
|
||||
import { botStatusText, botStatusType, botPresenceStatus } from '../runtime-settings.js';
|
||||
|
||||
const TYPES = {
|
||||
playing: ActivityType.Playing,
|
||||
@@ -10,15 +10,16 @@ const TYPES = {
|
||||
custom: ActivityType.Custom,
|
||||
};
|
||||
|
||||
/** Presence aus den Settings anwenden (leerer Text = Presence löschen) */
|
||||
/** Presence aus den Settings anwenden (Status immer, Aktivität nur wenn Text gesetzt) */
|
||||
export function applyBotStatus(client) {
|
||||
const text = botStatusText();
|
||||
try {
|
||||
if (!text) {
|
||||
client.user?.setPresence?.({ activities: [] });
|
||||
return;
|
||||
}
|
||||
client.user?.setActivity?.(text, { type: TYPES[botStatusType()] ?? ActivityType.Custom });
|
||||
client.user?.setPresence?.({
|
||||
status: botPresenceStatus(),
|
||||
activities: text
|
||||
? [{ name: text, type: TYPES[botStatusType()] ?? ActivityType.Custom }]
|
||||
: [],
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('[presence] Status setzen fehlgeschlagen:', error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user