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 ---
|
// --- Discord Client ---
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
// 32385 = Guilds + GuildVoiceStates + GuildMessages + GuildMessageReactions + GuildMessageTyping
|
intents: [
|
||||||
// + DirectMessages + DirectMessageReactions + DirectMessageTyping
|
GatewayIntentBits.Guilds,
|
||||||
// (ohne privilegierte Intents wie MessageContent/GuildMembers/Presences)
|
GatewayIntentBits.GuildVoiceStates,
|
||||||
intents: 32385,
|
GatewayIntentBits.DirectMessages,
|
||||||
|
GatewayIntentBits.MessageContent,
|
||||||
|
],
|
||||||
partials: [Partials.Channel]
|
partials: [Partials.Channel]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -418,7 +420,7 @@ client.on(Events.VoiceStateUpdate, async (oldState: VoiceState, newState: VoiceS
|
||||||
client.on(Events.MessageCreate, async (message: Message) => {
|
client.on(Events.MessageCreate, async (message: Message) => {
|
||||||
try {
|
try {
|
||||||
if (message.author?.bot) return;
|
if (message.author?.bot) return;
|
||||||
// Commands überall annehmen
|
// Commands überall annehmen (inkl. DMs)
|
||||||
const content = (message.content || '').trim();
|
const content = (message.content || '').trim();
|
||||||
if (content.startsWith('?')) {
|
if (content.startsWith('?')) {
|
||||||
await handleCommand(message, content);
|
await handleCommand(message, content);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue