Branding-Tab: Name/Farben/Bot-Status/Avatar/Banner + Button-Farben für Rollen-Menüs
- Alle Embeds nutzen jetzt brandName/brandColor/brandColor2/brandFooter aus den Settings (Codemod über 20 Module) — Farbe & Name serverweit per Klick änderbar - Bot-Status (Presence): Typ (Spielt/Schaut/Hört/Status) + Text, sofort angewendet; Server-Monitor nutzt die Presence nur noch, wenn kein eigener Status gesetzt ist - Avatar-/Banner-Upload direkt aufs Bot-Profil (Base64, 8-MB-Limit, Discord-Rate-Limit sauber gemeldet) - Env-Verlagerung: GITEA_API_TOKEN (write-only Setting) und DISCORD_GUILD_ID jetzt auch über den Brand-Tab pflegbar — weniger Redeploys - Rollen-Menüs: Button-Farbe pro Eintrag wählbar (Grau/Blau/Grün/Rot) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+9
-6
@@ -1,11 +1,12 @@
|
||||
// Discord-Client: Commands laden, registrieren und Interactions verarbeiten
|
||||
import { Client, Collection, Events, GatewayIntentBits, MessageFlags, Partials, REST, Routes } from 'discord.js';
|
||||
import { config } from '../config.js';
|
||||
import { devlogChannelId, devlogPingRoleId, playtesterRoleId, ticketChannelId } from '../runtime-settings.js';
|
||||
import { devlogChannelId, devlogPingRoleId, playtesterRoleId, ticketChannelId, brandColor, brandFooter, discordGuildId } from '../runtime-settings.js';
|
||||
import { archiveDevlogMessage, removeDevlog } from './devlog-archive.js';
|
||||
import { registerCommunityListeners } from './community.js';
|
||||
import { registerModTools } from './mod-tools.js';
|
||||
import { registerLevels } from './levels.js';
|
||||
import { registerPresence } from './presence.js';
|
||||
import { handleRoleMenuButton } from './role-menus.js';
|
||||
import {
|
||||
addPlaytester, removePlaytester, isWish, bumpWish,
|
||||
@@ -186,12 +187,12 @@ export async function startBot() {
|
||||
content: `<@${interaction.user.id}>`,
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setColor(0xf5c518)
|
||||
.setColor(brandColor())
|
||||
.setDescription(
|
||||
'Willkommen in deinem Ticket! Beschreib dein Anliegen — das Team meldet sich.\n' +
|
||||
'Wenn alles geklärt ist, kann das Ticket hier geschlossen werden.'
|
||||
)
|
||||
.setFooter({ text: 'D4RKST3R // SUPPORT' }),
|
||||
.setFooter({ text: brandFooter('SUPPORT') }),
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder().addComponents(
|
||||
@@ -296,6 +297,7 @@ export async function startBot() {
|
||||
registerCommunityListeners(client);
|
||||
registerModTools(client);
|
||||
registerLevels(client);
|
||||
registerPresence(client);
|
||||
|
||||
await client.login(config.discordToken);
|
||||
return client;
|
||||
@@ -306,12 +308,13 @@ async function registerCommands() {
|
||||
const rest = new REST().setToken(config.discordToken);
|
||||
const body = commandModules.map((c) => c.data.toJSON());
|
||||
|
||||
const route = config.discordGuildId
|
||||
? Routes.applicationGuildCommands(config.discordClientId, config.discordGuildId)
|
||||
const guildId = discordGuildId();
|
||||
const route = guildId
|
||||
? Routes.applicationGuildCommands(config.discordClientId, guildId)
|
||||
: Routes.applicationCommands(config.discordClientId);
|
||||
|
||||
await rest.put(route, { body });
|
||||
console.log(
|
||||
`[bot] ${body.length} Slash-Command(s) registriert (${config.discordGuildId ? 'Guild' : 'global'})`
|
||||
`[bot] ${body.length} Slash-Command(s) registriert (${guildId ? 'Guild' : 'global'})`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user