diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-31 19:20:39 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-31 19:20:39 -0500 |
commit | bab76f38a17c62f8c1477172fe1bc9428efb3843 (patch) | |
tree | 9aee5ed7b54e74735ff417820427c9d2efa984f4 /src/listeners/commands | |
parent | 78ab3362a52578d0bcada903732f147747c609df (diff) | |
download | tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2 tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip |
fixes, and breaking changes
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandMissingPermissions.ts | 3 | ||||
-rw-r--r-- | src/listeners/commands/commandStarted.ts | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 4d9aa1b..e84d58c 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -1,4 +1,5 @@ import { BushListener, type BushCommandHandlerEvents } from '#lib'; +import { PermissionsString } from 'discord.js'; export default class CommandMissingPermissionsListener extends BushListener { public constructor() { @@ -18,7 +19,7 @@ export default class CommandMissingPermissionsListener extends BushListener { | BushCommandHandlerEvents['missingPermissions'] | BushCommandHandlerEvents['slashMissingPermissions'] ) { - const niceMissing = (missing.includes('ADMINISTRATOR') ? (['ADMINISTRATOR'] as const) : missing).map( + const niceMissing = (missing.includes('Administrator') ? (['Administrator'] as PermissionsString[]) : missing).map( (perm) => client.consts.mappings.permissions[perm]?.name ?? missing ); diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index 4917402..419191a 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -21,8 +21,10 @@ export default class CommandStartedListener extends BushListener { 'message.id': message.id, 'message.type': message.util.isSlash ? 'slash' : 'normal', 'message.parsed.content': message.util.parsed!.content, - 'channel.id': message.channel.isDM() ? message.channel!.recipient.id : (<GuildTextBasedChannel>message.channel)?.id, - 'channel.name': message.channel.isDM() ? message.channel.recipient.tag : (<GuildTextBasedChannel>message.channel)?.name, + 'channel.id': message.channel.isDMBased() ? message.channel!.recipient.id : message.channel?.id, + 'channel.name': message.channel.isDMBased() + ? message.channel.recipient.tag + : (<GuildTextBasedChannel>message.channel)?.name, 'guild.id': message.guild?.id, 'guild.name': message.guild?.name, 'environment': client.config.environment |