Skip to content
Functiongatewayv0.7.5

hasPermsToAssign

Validates that the bot can assign a target role. Refuses when the target role is above the bot's, is managed, or the bot lacks Manage Roles.

Throws:

  • A Notice on refusal, or a SeedcordError when the bot has no role in the guild's role cache.

hasPermsToAssign(
    roleOrOptions: Role | HasPermsToAssignOptions
): void