diff options
Diffstat (limited to 'src/commands/leveling')
-rw-r--r-- | src/commands/leveling/leaderboard.ts | 15 | ||||
-rw-r--r-- | src/commands/leveling/level.ts | 4 | ||||
-rw-r--r-- | src/commands/leveling/levelRoles.ts | 17 | ||||
-rw-r--r-- | src/commands/leveling/setLevel.ts | 18 | ||||
-rw-r--r-- | src/commands/leveling/setXp.ts | 18 |
5 files changed, 17 insertions, 55 deletions
diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index 109f398..50af997 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -1,14 +1,4 @@ -import { - BotCommand, - ButtonPaginator, - chunk, - clientSendAndPermCheck, - emojis, - Level, - type CommandMessage, - type OptArgType, - type SlashMessage -} from '#lib'; +import { BotCommand, ButtonPaginator, chunk, emojis, Level, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; @@ -33,7 +23,8 @@ export default class LeaderboardCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: ['EmbedLinks'], + clientCheckChannel: true, userPermissions: [] }); } diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index 2547b06..869140d 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -2,7 +2,6 @@ import { AllowedMentions, BotCommand, CanvasProgressBar, - clientSendAndPermCheck, emojis, Level, type CommandMessage, @@ -37,7 +36,8 @@ export default class LevelCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), + clientPermissions: ['AttachFiles'], + clientCheckChannel: true, userPermissions: [] }); } diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts index 4973b01..860e88a 100644 --- a/src/commands/leveling/levelRoles.ts +++ b/src/commands/leveling/levelRoles.ts @@ -1,15 +1,6 @@ -import { - AllowedMentions, - BotCommand, - clientSendAndPermCheck, - emojis, - type ArgType, - type CommandMessage, - type OptArgType, - type SlashMessage -} from '#lib'; +import { AllowedMentions, BotCommand, emojis, type ArgType, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; export default class LevelRolesCommand extends BotCommand { public constructor() { @@ -42,8 +33,8 @@ export default class LevelRolesCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]), - userPermissions: [PermissionFlagsBits.ManageGuild, PermissionFlagsBits.ManageRoles] + clientPermissions: ['ManageRoles'], + userPermissions: ['ManageGuild', 'ManageRoles'] }); } diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index cd30978..6f6f69e 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -1,16 +1,6 @@ -import { - AllowedMentions, - BotCommand, - clientSendAndPermCheck, - emojis, - format, - Level, - type ArgType, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { AllowedMentions, BotCommand, emojis, format, Level, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; export default class SetLevelCommand extends BotCommand { public constructor() { @@ -40,8 +30,8 @@ export default class SetLevelCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: [PermissionFlagsBits.Administrator] + clientPermissions: [], + userPermissions: ['Administrator'] }); } diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index 23f4463..8c3b86f 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -1,16 +1,6 @@ -import { - AllowedMentions, - BotCommand, - clientSendAndPermCheck, - emojis, - format, - Level, - type ArgType, - type CommandMessage, - type SlashMessage -} from '#lib'; +import { AllowedMentions, BotCommand, emojis, format, Level, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; +import { ApplicationCommandOptionType } from 'discord.js'; export default class SetXpCommand extends BotCommand { public constructor() { @@ -41,8 +31,8 @@ export default class SetXpCommand extends BotCommand { ], slash: true, channel: 'guild', - clientPermissions: (m) => clientSendAndPermCheck(m), - userPermissions: [PermissionFlagsBits.Administrator] + clientPermissions: [], + userPermissions: ['Administrator'] }); } |