-
Notifications
You must be signed in to change notification settings - Fork 9
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
Help with guilds #29
Comments
I can do bearer_client.users.get_my_guilds() to get the users guild but how do I check if my bot is in those guilds |
This has to be done on the bot's side. Pass the guild ID to the bot somehow, and let the bot check if the guild IDs exist in its own list of joined guild IDs. In my case, I created an asynchronous RPC endpoint on the bot which I queried from the API to run the checks. This method isn't scalable but you can do it for small bots. Another way to do it would be to store all of the joined guild IDs of the bot in a fast caching service like Redis. The API can just query Redis to get a list of the bot's joined guilds and match them. |
Is there a way to get the users guilds? I can't seem to find a way. Thanks |
Does |
Hello,
I need to get the guilds the user has and then see if the bot is in them. For now my website only shows the guilds the bot is in which is not optimal for obvious reasons.
The text was updated successfully, but these errors were encountered: