#Hello, the issue is that when attempting to retrieve the value of guild.id, it returns undefined.

20 messages · Page 1 of 1 (latest)

warm tendon
#

what's the purpose of that first line

#

just use member.guild

rain shell
#

Tried many times

#

Same problem

warm tendon
#

this causes more problems though

#

i don't see you accessing guild.id anywhere though

#

what exactly is undefined here

rain shell
#

const guild = client.guilds.cache.find(g => g.members.cache.has(member.id));

#

That

warm tendon
#

just use member.guild

rain shell
#

uh

warm tendon
#

are you messing with the cache or something?

rain shell
warm tendon
rain shell
#

TypeError: Cannot read properties of undefined (reading 'channels')
at GuildMemberAddEvent.onGuildMemberAdd (C:\Users\artem\OneDrive\Рабочий стол\Module-Bot\src\events\logsystem\member\guildMemberAdd.ts1836)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async next (C:\Users\artem\OneDrive\Рабочий стол\Module-Bot\node_modules\discordx\src\decorators\classes\Method.ts:85:15)
at async C:\Users\artem\OneDrive\Рабочий стол\Module-Bot\node_modules\discordx\src\logic\metadata\MetadataStorage.ts:609:23
at async Promise.all (index 0)
at async Client.<anonymous> (C:\Users\artem\OneDrive\Рабочий стол\Module-Bot\node_modules\discordx\src\logic\metadata\MetadataStorage.ts:603:7)

warm tendon
#

what intents do you have and are you messing with cache

rain shell
ruby cometBOT
#

We highly recommend only specifying the intents you actually need.
• Note, that 98303, 32767 or whatever other magic number you read that represents "all intents", gets outdated as soon as new intents are introduced.
• The number will always represent the same set of intents, and will not include new ones. There is no magic "all intents" bit.

warm tendon
#

i'm not reading that