Closed Cldfire closed 4 years ago
Just to make sure, this is happening when you do it with the shard or the cluster construct? And do you have access to the precense intent enabled for the bot?
https://discordapp.com/developers/docs/topics/gateway#gateway-intents
First, if I understand correctly, I think you need the GUILDS
intent to get Event::GuildCreate
. Second, GUILD_PRESENCES
is a privileged intent.
Just to make sure, this is happening when you do it with the shard or the cluster construct?
This is on the cluster.
And do you have access to the precense intent enabled for the bot?
I do not! I didn't realize this intent required special permissions, my bad.
https://discordapp.com/developers/docs/topics/gateway#gateway-intents
First, if I understand correctly, I think you need the
GUILDS
intent to getEvent::GuildCreate
. Second,GUILD_PRESENCES
is a privileged intent.
Yep, you're right. I misread the docs. Thanks!
It would be nice to handle permissions issues and hand some errors back to the library user in the future perhaps?
Yeah I need to handle unrecoverable error in another way. Also note that for now you just need to flip a switch on the application page. Also had a look at your profile and saw you are using it as a chat relay. Maybe a webhook will be better suited for that as you can change username in the request. At least that is how I have seen others do it.
Maybe a webhook will be better suited for that as you can change username in the request.
Ooo, I didn't know about that. That's cool!
In my case I'd rather stick to the bot approach for the flexibility down the road, but thanks for the heads-up :smile: (although I could perhaps mix in webhook usage, hmm...)
EDIT: If you're coming here in the future, this was a permissions issue. Read the discussion below.
I've been using the following intent configuration in my code, with no issues:
I just changed it to the following in order to be able to log when the bot connects to guilds (
Event::GuildCreate
):Unfortunately that change caused the library to start failing to connect. Log output: