Comments (12)
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
If you are using Gateway Intents, members and presences returned in this event will only contain your bot and users in voice channels unless you specify the GUILD_PRESENCES intent.
look more into it here: https://discord.com/developers/docs/topics/gateway#guilds
from kord.
Hello, What Kord version are you on?
from kord.
Sorry, 0.6.10
from kord.
could you try using the snapshot on 0.7.x branch? There is a group id change as well so please read the readme there.
This is the PR updating the readme for 0.7.x
#159
from kord.
I couldn't get Gradle to resolve it before...looks like I didn't know about the extra repo.
With 0.7.x it doesn't matter how I configure the intents...guild.members
always only sees the bot user instead of the full list, so it's more consistent but still suggests something unplanned happening w/the cache.
from kord.
I couldn't get Gradle to resolve it before...looks like I didn't know about the extra repo.
you need to add the Sonatype repo: maven("https://oss.sonatype.org/content/repositories/snapshots")
then you can add the snapshot implementation("dev.kord:kord-core:0.7.0-SNAPSHOT")
from kord.
Tried this
val kord = Kord(System.getenv("token")) {
intents += Intents(Intent.Guilds, Intent.GuildMembers)
}
message.channel.createMessage(message.getGuild().members.toList().joinToString(" ") { it.displayName })
on the snapshot still only get the bot member
from kord.
Hey, I'll look into it when possible, right now my Gradle isn't acting fine.
Will inform you of any updates. However if you'd like you can join our Discord server.
from kord.
This works as a workaround:
kord.on<ReadyEvent> {
for (guildId in guildIds) {
gateway.requestGuildMembers(guildId).launchIn(kord)
}
}
from kord.
Hello there, sorry for late replying but I have issues with my network here.
The issue here is that the cache is not yet filled with members.
in order to do this you call
gateway.requestGuildMembers(guildId)
in your ReadyEvent
.
this sends member chunks that we will cache for you
in order for the requests to be sent, you need to collect the result flows.
Now that you have the members of the guild you care about cached. you can list them in other events.
TL;DR:
if you want to have members of all guilds add this to your ReadyEvent
for (guildId in guildIds) {
gateway.requestGuildMembers(guildId).launchIn(kord)
}
in-order to request and cache members through gateway.
from kord.
Okay. It sounds like this has evolved and there's a different approach now vs. the inconsistent and possibly unintended behavior in 0.6. I didn't start with 0.7 because it wasn't obvious from the front page how to setup the dependency, but I'll proceed with that and see how it goes. Member scanning is something I should probably handle differently anyway, but the weirdness with the intent config caught my attention and seemed like something that should be understood. Thanks for the attention.
from kord.
The issue has been closed due to inactivity, feel free to open it again if you face further problems.
from kord.
Related Issues (20)
- How to timeout user? HOT 1
- Nullability issue with TextChannel.createMessage and EmbedBuilder.Author HOT 9
- Update documentation for Components HOT 1
- How to get all members in guild and all members in role? HOT 4
- Add permission overwrite for `@everyone` HOT 2
- Guild missing "created at" property HOT 1
- Nullability issue when getting application info HOT 1
- MessageModifyBuilder and MessageCreateBuilder should share a common interface HOT 1
- Support delta events for voice channels HOT 3
- Unexpected null field when parsing audit log entry HOT 2
- Sealed base type for Kord events HOT 2
- IdentifyRateLimiter threw an exception in context HOT 7
- Defer multiple public responses to slash commands
- Exception HOT 7
- `ZERO_WIDTH_SPACE` in `EmbedBuilder` is not a zero-width space, but left-to-right override
- How to create threads from a Message HOT 1
- ERROR dev.kord.gateway.DefaultGateway HOT 3
- Guild members not available in GuildCreateEvent HOT 5
- Intents setting not found HOT 1
- More information in an stack trace / preconditions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kord.