diff options
Diffstat (limited to 'src/arguments/permission.ts')
-rw-r--r-- | src/arguments/permission.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arguments/permission.ts b/src/arguments/permission.ts index 8c09072..b5ff4bf 100644 --- a/src/arguments/permission.ts +++ b/src/arguments/permission.ts @@ -1,12 +1,12 @@ import { type BushArgumentTypeCaster } from '#lib'; -import { Permissions } from 'discord.js'; +import { Permissions, PermissionString } from 'discord.js'; -export const permission: BushArgumentTypeCaster = (_, phrase) => { +export const permission: BushArgumentTypeCaster = (_, phrase): PermissionString | null => { if (!phrase) return null; phrase = phrase.toUpperCase().replace(/ /g, '_'); if (!(phrase in Permissions.FLAGS)) { return null; } else { - return phrase; + return phrase as PermissionString; } }; |