Skip to content

Commit

Permalink
[PATCH] fix ban status
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Dec 29, 2023
1 parent f689b18 commit a6e62c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/Commands/SlashCommands/mod/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a6e62c7

Please sign in to comment.