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

[Welcome] Bot role not works with permissions #42

Closed
fixator10 opened this issue Jul 10, 2017 · 2 comments
Closed

[Welcome] Bot role not works with permissions #42

fixator10 opened this issue Jul 10, 2017 · 2 comments

Comments

@fixator10
Copy link

When adding bot with permissions (Discord-Managed role, &permissions=int) bot's role not assign with error

welcome.py: added %role% role to bot, %bot%
welcome.py: unable to add %role% role to %bot%. Role was deleted, network error, or lacking permissions

But on adding bot without predefined role/permissions (without &permissions=int arg in URL), role assigns normally

Bot has access to manage roles

@ghost
Copy link

ghost commented Jul 10, 2017

Issue caused by add_role command, which tries to get list of roles from bot, then add new role to this list and then replace_roles with the new list.
But managed role is not yet on the list when add_role is running, so replace_role tries to replace list of role with Bot role only, and Managed role is not replaceable.

Quick and dirty fix is to add 5 seconds sleep before assigning roles to bot.
Or think of something more beautiful :D

@Chovin
Copy link
Collaborator

Chovin commented Oct 9, 2017

not sure I understand but I'll add a 5 second fallback in case

@Chovin Chovin closed this as completed in 3d2a5e4 Oct 9, 2017
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