From 5a0046146fb2a697aead63d2af492db9f0ef9113 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 10 Aug 2022 10:27:35 -0400 Subject: update discord js and discord-akairo fix breaking changes add unverified bot emoji to user command --- src/lib/utils/BushUtils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/utils/BushUtils.ts') diff --git a/src/lib/utils/BushUtils.ts b/src/lib/utils/BushUtils.ts index af173f9..de01ac0 100644 --- a/src/lib/utils/BushUtils.ts +++ b/src/lib/utils/BushUtils.ts @@ -466,9 +466,13 @@ export function clientSendAndPermCheck( permissions: bigint[] = [], checkChannel = false ): PermissionsString[] | null { + if (!message.inGuild() || !message.channel) return null; + const missing: PermissionsString[] = []; - const sendPerm = message.channel!.isThread() ? 'SendMessages' : 'SendMessagesInThreads'; - if (!message.inGuild()) return null; + const sendPerm = message.channel.isThread() ? 'SendMessages' : 'SendMessagesInThreads'; + + // todo: remove once forum channels are fixed + if (message.channel.parent === null && message.channel.isThread()) return null; if (!message.guild.members.me!.permissionsIn(message.channel!.id).has(sendPerm)) missing.push(sendPerm); -- cgit