-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: added guilds array and count to ready_t #1038
Conversation
✅ Deploy Preview for dpp-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Can you send the raw event please? Remember to take out sensitive information. |
the bot is in guilds, so raw event: {
"t": "READY",
"s": 1,
"op": 0,
"d": {
"v": 10,
"user_settings": {
},
"user": {
"verified": true,
"username": "REDACTED",
"mfa_enabled": true,
"id": "REDACTED",
"global_name": null,
"flags": 0,
"email": null,
"discriminator": "REDACTED",
"bot": true,
"avatar": null
},
"shard": [
0,
1
],
"session_type": "normal",
"session_id": "REDACTED",
"resume_gateway_url": "REDACTED",
"relationships": [
],
"private_channels": [
],
"presences": [
],
"guilds": [
{
"unavailable": true,
"id": "REDACTED"
}
],
"guild_join_requests": [
],
"geo_ordered_rtc_regions": [
"REDACTED",
"REDACTED",
"REDACTED",
"REDACTED",
"REDACTED"
],
"current_location": [
"REDACTED",
"REDACTED"
],
"auth": {
},
"application": {
"id": "REDACTED",
"flags": 8421376
},
"_trace": [
"[\"gateway-prd-us-east1-b-lz5w\",{\"micros\":91431,\"calls\":[\"id_created\",{\"micros\":1089,\"calls\":[]},\"session_lookup_time\",{\"micros\":4560,\"calls\":[]},\"session_lookup_finished\",{\"micros\":16,\"calls\":[]},\"discord-sessions-prd-2-85\",{\"micros\":85342,\"calls\":[\"start_session\",{\"micros\":75877,\"calls\":[\"discord-api-7865c84bc5-f4jll\",{\"micros\":61109,\"calls\":[\"get_user\",{\"micros\":9624},\"get_guilds\",{\"micros\":8391},\"send_scheduled_deletion_message\",{\"micros\":11},\"guild_join_requests\",{\"micros\":10},\"authorized_ip_coro\",{\"micros\":12}]}]},\"starting_guild_connect\",{\"micros\":58,\"calls\":[]},\"presence_started\",{\"micros\":316,\"calls\":[]},\"guilds_started\",{\"micros\":99,\"calls\":[]},\"guilds_connect\",{\"micros\":2,\"calls\":[]},\"presence_connect\",{\"micros\":8935,\"calls\":[]},\"connect_finished\",{\"micros\":8942,\"calls\":[]},\"build_ready\",{\"micros\":21,\"calls\":[]},\"clean_ready\",{\"micros\":26,\"calls\":[]},\"optimize_ready\",{\"micros\":1,\"calls\":[]},\"split_ready\",{\"micros\":0,\"calls\":[]}]}]}]"
]
}
} |
Just to make sure, your application is using the updated DPP library right? Not an older version? |
For example using updated headers but an older libdpp.so can cause things like this |
yes, but i fear it might be some cmake cache edit: yep, works now |
the only thing i noticed is you cannot access the guild cache |
Yes we know, that's why this PR exists and is also completely unrelated. Discord sends an array of guilds with the Ready event, we are now acknowledging it and exposing it to users so they can set the status on ready instantly. Double check your version is right with DPP_VERSION_LONG (when running the bot, don't just look at the header and assume). If you are on 10.0.29, open an issue ticket please. |
Yes. Guild members are given separately after the ready event, if you have the guild members intent |
This PR adds the guilds array and a count of the array to the ready_t event, as Discord provides an array of unavailable guilds on the ready event. This means people can now get the amount of guilds a bot is in from the ready_t event.
Code change checklist