#Cannot read property send of undefined when fetching a guild's members.
1 messages · Page 1 of 1 (latest)
[EVENT HANDLER] READY - TYPEERROR: CANNOT READ PROPERTY 'SEND' OF UNDEFINED
AT C:\USERS\JOÃO TEIXEIRA\DOCUMENTS\WORKSHOP\PROJECTS\FREELANCING\BEERHUNTER\NODE_MODULES\DISCORD.JS\SRC\MANAGERS\GUILDMEMBERMANAGER.JS:422:24
AT NEW PROMISE (<ANONYMOUS>)
AT GUILDMEMBERMANAGER._FETCHMANY (C:\USERS\JOÃO TEIXEIRA\DOCUMENTS\WORKSHOP\PROJECTS\FREELANCING\BEERHUNTER\NODE_MODULES\DISCORD.JS\SRC\MANAGERS\GUILDMEMBERMANAGER.JS:419:12)
AT GUILDMEMBERMANAGER.FETCH (C:\USERS\JOÃO TEIXEIRA\DOCUMENTS\WORKSHOP\PROJECTS\FREELANCING\BEERHUNTER\NODE_MODULES\DISCORD.JS\SRC\MANAGERS\GUILDMEMBERMANAGER.JS:177:31)
AT FUNCTION.FETCHMEMBERS (C:\USERS\JOÃO TEIXEIRA\DOCUMENTS\WORKSHOP\PROJECTS\FREELANCING\BEERHUNTER\DIST\EVENTS\READY.JS:16:58)
AT PROCESSTICKSANDREJECTIONS (NODE:INTERNAL/PROCESS/TASK_QUEUES:96:5)
AT ASYNC CLIENT.MAIN (C:\USERS\JOÃO TEIXEIRA\DOCUMENTS\WORKSHOP\PROJECTS\FREELANCING\BEERHUNTER\DIST\EVENTS\READY.JS:41:13)
do u have GUILDS intent?
oh, yeah, that may couse this error
just looked through djs code and it relies on this.guild, which relies on cache
I do have it yes
private readonly _client: Client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_MEMBERS],
});
could you show ready.js 16-41
then for some reason. GuildMemberManager loses it's this.guild
Entire Ready.js file: https://pastebin.com/3YxzY8M5
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
It's transpiled from TypeScript code so its kinda messy
as that is undefined. What djs version are u on? also log <Client>.options.intents
could you log this.guild and see if it is a Guild object?
u cannot log this.guild, it is in guild membermanager.. U have to do that in that class.
Okay let me try
what u can do is log the manager <Guild>.members, and show us the log
just check if it returns undefined
Both are not undefined: https://pastebin.com/Qwjb0e9N
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Scroll down there's the GuildMemberManager
wth, weird. It seems like ur shardId is undefined, idk what can cause this lol
I've actually found someone with the same issue: #djs-help-v14 message ,