Skip to content

Commit 8b88ffd

Browse files
committed
fix: fixed module building code on DiscordJS v13.4.0
1 parent 627b05c commit 8b88ffd

File tree

3 files changed

+55
-243
lines changed

3 files changed

+55
-243
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@sapphire/prettier-config": "^1.2.7",
4545
"@sapphire/ts-config": "^3.1.6",
4646
"@types/jest": "^27.0.3",
47-
"@types/node": "^17.0.0",
47+
"@types/node": "^17.0.4",
4848
"@types/ws": "^8.2.2",
4949
"@typescript-eslint/eslint-plugin": "^5.8.0",
5050
"@typescript-eslint/parser": "^5.8.0",

src/preconditions/ClientPermissions.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message, NewsChannel, Permissions, TextChannel } from 'discord.js';
1+
import { Message, NewsChannel, Permissions, PermissionString, TextChannel } from 'discord.js';
22
import { Identifiers } from '../lib/errors/Identifiers';
33
import type { Command } from '../lib/structures/Command';
44
import { Precondition, PreconditionContext, PreconditionResult } from '../lib/structures/Precondition';
@@ -49,7 +49,7 @@ export class CorePrecondition extends Precondition {
4949
});
5050
}
5151

52-
public static readonly readablePermissions = {
52+
public static readonly readablePermissions: Record<PermissionString, string> = {
5353
ADD_REACTIONS: 'Add Reactions',
5454
ADMINISTRATOR: 'Administrator',
5555
ATTACH_FILES: 'Attach Files',
@@ -64,20 +64,22 @@ export class CorePrecondition extends Precondition {
6464
KICK_MEMBERS: 'Kick Members',
6565
MANAGE_CHANNELS: 'Manage Channels',
6666
MANAGE_EMOJIS_AND_STICKERS: 'Manage Emojis and Stickers',
67+
MANAGE_EVENTS: 'Manage Events',
6768
MANAGE_GUILD: 'Manage Server',
6869
MANAGE_MESSAGES: 'Manage Messages',
6970
MANAGE_NICKNAMES: 'Manage Nicknames',
7071
MANAGE_ROLES: 'Manage Roles',
7172
MANAGE_THREADS: 'Manage Threads',
7273
MANAGE_WEBHOOKS: 'Manage Webhooks',
7374
MENTION_EVERYONE: 'Mention Everyone',
75+
MODERATE_MEMBERS: 'Moderate Members',
7476
MOVE_MEMBERS: 'Move Members',
7577
MUTE_MEMBERS: 'Mute Members',
7678
PRIORITY_SPEAKER: 'Priority Speaker',
7779
READ_MESSAGE_HISTORY: 'Read Message History',
7880
REQUEST_TO_SPEAK: 'Request to Speak',
79-
SEND_MESSAGES: 'Send Messages',
8081
SEND_MESSAGES_IN_THREADS: 'Send Messages in Threads',
82+
SEND_MESSAGES: 'Send Messages',
8183
SEND_TTS_MESSAGES: 'Send TTS Messages',
8284
SPEAK: 'Speak',
8385
START_EMBEDDED_ACTIVITIES: 'Start Activities',

0 commit comments

Comments
 (0)