diff options
Diffstat (limited to 'src/commands/moderation/role.ts')
-rw-r--r-- | src/commands/moderation/role.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 69432ab..fd7b817 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -95,8 +95,14 @@ export default class RoleCommand extends BushCommand { public override async exec( message: BushMessage | BushSlashMessage, - { action, user, role, duration }: { action: 'add' | 'remove'; user: BushGuildMember; role: BushRole; duration?: number } + { + action, + user, + role, + duration + }: { action: 'add' | 'remove'; user: BushGuildMember; role: BushRole; duration?: number | null } ): Promise<unknown> { + if (duration === null) duration = 0; if ( !message.member!.permissions.has('MANAGE_ROLES') && message.member!.id !== message.guild?.ownerId && |