fix(entrance-exit): Stelle sicher, dass VoiceStateUpdate/DM-Commands via expliziten Intents (Guilds, GuildVoiceStates, DirectMessages, MessageContent) aktiv sind
This commit is contained in:
parent
8604e5591d
commit
0fc533bbd5
1 changed files with 7 additions and 5 deletions
|
|
@ -143,10 +143,12 @@ console.log(generateDependencyReport());
|
|||
|
||||
// --- Discord Client ---
|
||||
const client = new Client({
|
||||
// 32385 = Guilds + GuildVoiceStates + GuildMessages + GuildMessageReactions + GuildMessageTyping
|
||||
// + DirectMessages + DirectMessageReactions + DirectMessageTyping
|
||||
// (ohne privilegierte Intents wie MessageContent/GuildMembers/Presences)
|
||||
intents: 32385,
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildVoiceStates,
|
||||
GatewayIntentBits.DirectMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
],
|
||||
partials: [Partials.Channel]
|
||||
});
|
||||
|
||||
|
|
@ -418,7 +420,7 @@ client.on(Events.VoiceStateUpdate, async (oldState: VoiceState, newState: VoiceS
|
|||
client.on(Events.MessageCreate, async (message: Message) => {
|
||||
try {
|
||||
if (message.author?.bot) return;
|
||||
// Commands überall annehmen
|
||||
// Commands überall annehmen (inkl. DMs)
|
||||
const content = (message.content || '').trim();
|
||||
if (content.startsWith('?')) {
|
||||
await handleCommand(message, content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue