-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of undefined (reading 'send') #9729
Comments
That is the issue. If your client logs in, you receive shard data and guild objects are populated with that. |
Explain to me how I can do all other commands and use the bot as usual, but the only thing that it can't do is fetch the members? Wouldn't it have to be logged in to do all those things as well? |
That requires a gateway connection. The others do not. |
How about fetching commands? It does that just fine |
I'm really confused here, what am I supposed to do to fix this, if it's really on my side? I did Client.login("Token") 2 minutes prior to me doing the command, and I don't know what you mean by gateway connection, so that doesn't bring me too far. |
The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway. |
Which package is this bug report for?
discord.js
Issue description
While I was building a localized leaderboard for my bot, I used a .fetch() command. It worked fine while building, but shortly after I released it, it stopped working, giving me the error in the title. It's got something to do with a missing shard in the Guild object, but it's not my code throwing an error, it's the discord module.
I've looked for solutions on here already, but people saying that the bot not being logged in might be the issue, but I can do all the other commands just fine, but when I do a local leaderboard command, executing the code below, it crashes, with the error at the bottom.
Here is the simplified version of the code, Guild being the native Discord guild object
Error:
Code sample
Versions
"discord.js": "^14.11.0"
Issue priority
Low (slightly annoying)
Which partials do you have configured?
Channel
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildMessages, GuildMessageReactions, DirectMessages, MessageContent
I have tested this issue on a development release
d26e022
The text was updated successfully, but these errors were encountered: