Skip to content
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

Member add/update events not being triggered #30

Closed
AlexITC opened this issue Aug 8, 2020 · 4 comments
Closed

Member add/update events not being triggered #30

AlexITC opened this issue Aug 8, 2020 · 4 comments

Comments

@AlexITC
Copy link

AlexITC commented Aug 8, 2020

I have an app that expects the APIMessage.GuildMemberAdd/APIMessage.GuildMemberUpdate events, but since I updated to 0.17.0-M1, I haven't been getting them, I tried 0.17.0-M2 without luck.

@Katrix
Copy link
Owner

Katrix commented Aug 8, 2020

Are you setting the right intents? The guild members events a privileged and as such AckCord won't set that intent by default.

@AlexITC
Copy link
Author

AlexITC commented Aug 8, 2020

I have no idea what are you referring to, but, I'm using the same code I used with 0.16.1, where these events were being captured. There are no changes on the discord role either.

@Katrix
Copy link
Owner

Katrix commented Aug 8, 2020

Discord released intents, which is a way to specify what events a bot will receive, a few months ago now. These can be set in AckCord in the ClientSettings object. You likely want GatewayIntents.AllNonPrivileged++ GatewayIntents.GuildMembers.

Before you start the bot again, you'll have to enable the guild members intent in the bot settings, same place where you find the bot token.

image

@AlexITC
Copy link
Author

AlexITC commented Aug 8, 2020

Ok, I wasn't aware of those changes, but I can confirm that reverting back to 0.16.1 has fixed the issue.

I analyzed a bit, and the default intends on the previous version used to include the member related events, while the current version does not (AllNonPrivileged).

I confirm that using the right intents gets the bot working again, thanks!

In any case

@AlexITC AlexITC closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants