From a6e62c7dff1ed74642d76da25664f28547f65846 Mon Sep 17 00:00:00 2001 From: Larsundso Date: Fri, 29 Dec 2023 22:22:29 +0100 Subject: [PATCH] [PATCH] fix ban status --- package.json | 2 +- src/Commands/SlashCommands/mod/check.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 22fd2326a..dfe70d02c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "type": "module", - "version": "2.0.19", + "version": "2.0.20", "scripts": { "start": "node --max-old-space-size=8192 ./dist/index.js", "build": "npx tsc", diff --git a/src/Commands/SlashCommands/mod/check.ts b/src/Commands/SlashCommands/mod/check.ts index 4da0d6b26..fd06ef7e3 100644 --- a/src/Commands/SlashCommands/mod/check.ts +++ b/src/Commands/SlashCommands/mod/check.ts @@ -33,8 +33,10 @@ export const getPayload = async ( guildid: baseInfo.guild.id, }); + const ban = await ch.request.guilds.getMemberBan(baseInfo.guild, baseInfo.user.id); + const punishedOpts = { - isBanned: !!(await ch.request.guilds.getMemberBan(baseInfo.guild, baseInfo.user.id)), + isBanned: !('message' in ban), isMuted: baseInfo.member?.isCommunicationDisabled() ?? false, isChannelBanned: !!baseInfo.guild.channels.cache.find((c) => { const perms = c.permissionsFor(baseInfo.user.id)?.serialize();