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

Criar Roles com as permissões especificas. #1

Open
gabubellon opened this issue Jul 10, 2021 · 0 comments
Open

Criar Roles com as permissões especificas. #1

gabubellon opened this issue Jul 10, 2021 · 0 comments

Comments

@gabubellon
Copy link
Collaborator

gabubellon commented Jul 10, 2021

Exemplo de possivel solução atribuindo apenas as pemissões sendo falsas

    vol_permission = discord.Permissions.all()

    # Roles from here https://discordpy.readthedocs.io/en/stable/api.html?highlight=discord%20permissions#discord.Permissions.view_guild_insights
    # Manage roles
    manage_roles = [
        "manage_channels",
        "manage_emojis",
        "manage_guild",
        "manage_messages",
        "manage_nicknames",
        "manage_permissions",
        "manage_roles",
        "manage_webhooks",
    ]
    for role in manage_roles:
        setattr(vol_permission, role, False)

Motivo: Não é permitido atribuir None a uma role

("Voluntariado", None, 70),

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

1 participant