Cache conflict when using Guilds and GuildMembers intents together
See original GitHub issueI’ve attached a project that just connects and prints the member list from the ready event.
On the discord end, I’ve turned on the GUILD_MEMBERS flag.
I’m finding that if I configure Kord with just +Intent.GuildMember
then I get all the members back from guild.members
against my test server. But if I add +Intent.Guild
it only returns the bot’s own user.
val kord = Kord(botToken) {
intents {
+Intent.Guilds // If uncommented then the full member list isn't seen
+Intent.GuildMembers
}
}
It’s weird to turn on an intent and get less data. The difference seems to be that Guild
is causing the cache to be initialized prematurely. I’m wondering if that’s supposed to happen or how I should work around it. This is kind of a one-off; I don’t necessarily want the whole member list in cache, but if I ask for it, it’s surprising if I don’t get it. I guess I can use RestEntitySupplier
directly…
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (9 by maintainers)
You can view #55 for updates on the matters. Your question has sparked a discussion And it seems better in your case to just use the GUILD_PRESENCE intent which will provide us with the members in GuildCreateEvent, which in turn will allow us to cache them
look more into it here: https://discord.com/developers/docs/topics/gateway#guilds
The issue has been closed due to inactivity, feel free to open it again if you face further problems.