Skip to content
Functiongatewayv0.9.0

hasPermsToAssign

Validates that the bot can assign a role. Refuses when the role is at or above the bot's, when an integration manages it, or when the bot lacks Manage Roles.

Throws:

  • A Notice when the check refuses.

  • A SeedcordError when the guild's caches don't hold the bot's role or member.

hasPermsToAssign(
    { role, higher, managed, missing },
    input: HasPermsToAssignOptions
): void

{ role, higher, managed, missing }

{ role, higher, managed, missing }