Skip to content

Commit

Permalink
fix: fixed module building code on DiscordJS v13.4.0 (#346)
Browse files Browse the repository at this point in the history
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jeroen Claassens <support@favware.tech>
  • Loading branch information
3 people committed Dec 26, 2021
1 parent 5f2d2ff commit b0d860c
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 273 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@
"@sapphire/prettier-config": "^1.2.7",
"@sapphire/ts-config": "^3.1.6",
"@types/jest": "^27.0.3",
"@types/node": "^17.0.0",
"@types/node": "^17.0.4",
"@types/ws": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"cz-conventional-changelog": "^3.3.0",
"discord.js": "^13.3.1",
"discord.js": "^13.4.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"gen-esm-wrapper": "^1.1.3",
"husky": "^7.0.4",
"jest": "^27.4.5",
"jest-circus": "^27.4.5",
"lint-staged": "^12.1.3",
"lint-staged": "^12.1.4",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.2",
"rollup": "^2.61.1",
"pretty-quick": "^3.1.3",
"rollup": "^2.62.0",
"rollup-plugin-version-injector": "^1.3.3",
"standard-version": "^9.3.2",
"ts-jest": "^27.1.2",
Expand Down
8 changes: 5 additions & 3 deletions src/preconditions/ClientPermissions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Message, NewsChannel, Permissions, TextChannel } from 'discord.js';
import { Message, NewsChannel, Permissions, PermissionString, TextChannel } from 'discord.js';
import { Identifiers } from '../lib/errors/Identifiers';
import type { Command } from '../lib/structures/Command';
import { Precondition, PreconditionContext, PreconditionResult } from '../lib/structures/Precondition';
Expand Down Expand Up @@ -49,7 +49,7 @@ export class CorePrecondition extends Precondition {
});
}

public static readonly readablePermissions = {
public static readonly readablePermissions: Record<PermissionString, string> = {
ADD_REACTIONS: 'Add Reactions',
ADMINISTRATOR: 'Administrator',
ATTACH_FILES: 'Attach Files',
Expand All @@ -64,20 +64,22 @@ export class CorePrecondition extends Precondition {
KICK_MEMBERS: 'Kick Members',
MANAGE_CHANNELS: 'Manage Channels',
MANAGE_EMOJIS_AND_STICKERS: 'Manage Emojis and Stickers',
MANAGE_EVENTS: 'Manage Events',
MANAGE_GUILD: 'Manage Server',
MANAGE_MESSAGES: 'Manage Messages',
MANAGE_NICKNAMES: 'Manage Nicknames',
MANAGE_ROLES: 'Manage Roles',
MANAGE_THREADS: 'Manage Threads',
MANAGE_WEBHOOKS: 'Manage Webhooks',
MENTION_EVERYONE: 'Mention Everyone',
MODERATE_MEMBERS: 'Moderate Members',
MOVE_MEMBERS: 'Move Members',
MUTE_MEMBERS: 'Mute Members',
PRIORITY_SPEAKER: 'Priority Speaker',
READ_MESSAGE_HISTORY: 'Read Message History',
REQUEST_TO_SPEAK: 'Request to Speak',
SEND_MESSAGES: 'Send Messages',
SEND_MESSAGES_IN_THREADS: 'Send Messages in Threads',
SEND_MESSAGES: 'Send Messages',
SEND_TTS_MESSAGES: 'Send TTS Messages',
SPEAK: 'Speak',
START_EMBEDDED_ACTIVITIES: 'Start Activities',
Expand Down
Loading

0 comments on commit b0d860c

Please sign in to comment.