aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-31 19:20:39 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-31 19:20:39 -0500
commitbab76f38a17c62f8c1477172fe1bc9428efb3843 (patch)
tree9aee5ed7b54e74735ff417820427c9d2efa984f4 /src/commands/moderation
parent78ab3362a52578d0bcada903732f147747c609df (diff)
downloadtanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip
fixes, and breaking changes
Diffstat (limited to 'src/commands/moderation')
-rw-r--r--src/commands/moderation/_activePunishments.ts2
-rw-r--r--src/commands/moderation/ban.ts6
-rw-r--r--src/commands/moderation/block.ts6
-rw-r--r--src/commands/moderation/evidence.ts4
-rw-r--r--src/commands/moderation/hideCase.ts4
-rw-r--r--src/commands/moderation/kick.ts6
-rw-r--r--src/commands/moderation/lockdown.ts7
-rw-r--r--src/commands/moderation/modlog.ts4
-rw-r--r--src/commands/moderation/mute.ts6
-rw-r--r--src/commands/moderation/purge.ts6
-rw-r--r--src/commands/moderation/removeReactionEmoji.ts6
-rw-r--r--src/commands/moderation/role.ts6
-rw-r--r--src/commands/moderation/slowmode.ts6
-rw-r--r--src/commands/moderation/timeout.ts6
-rw-r--r--src/commands/moderation/unban.ts6
-rw-r--r--src/commands/moderation/unblock.ts6
-rw-r--r--src/commands/moderation/unlockdown.ts6
-rw-r--r--src/commands/moderation/unmute.ts6
-rw-r--r--src/commands/moderation/untimeout.ts6
-rw-r--r--src/commands/moderation/warn.ts4
20 files changed, 54 insertions, 55 deletions
diff --git a/src/commands/moderation/_activePunishments.ts b/src/commands/moderation/_activePunishments.ts
index 5b1674c..cffc39f 100644
--- a/src/commands/moderation/_activePunishments.ts
+++ b/src/commands/moderation/_activePunishments.ts
@@ -38,7 +38,7 @@
// channel: 'guild',
// hidden: true,
// clientPermissions: (m) => util.clientSendAndPermCheck(m),
-// userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+// userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
// });
// }
//
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index 33f980d..209397c 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -8,7 +8,7 @@ import {
type BushSlashMessage,
type OptionalArgType
} from '#lib';
-import { ApplicationCommandOptionType, Permissions, type User } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits, type User } from 'discord.js';
export default class BanCommand extends BushCommand {
public constructor() {
@@ -62,8 +62,8 @@ export default class BanCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: [Permissions.FLAGS.BAN_MEMBERS],
- userPermissions: [Permissions.FLAGS.BAN_MEMBERS]
+ clientPermissions: [PermissionFlagsBits.BanMembers],
+ userPermissions: [PermissionFlagsBits.BanMembers]
});
}
diff --git a/src/commands/moderation/block.ts b/src/commands/moderation/block.ts
index 0b6458d..20c6e86 100644
--- a/src/commands/moderation/block.ts
+++ b/src/commands/moderation/block.ts
@@ -11,7 +11,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class BlockCommand extends BushCommand {
public constructor() {
@@ -53,8 +53,8 @@ export default class BlockCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts
index 84138f6..d951f3d 100644
--- a/src/commands/moderation/evidence.ts
+++ b/src/commands/moderation/evidence.ts
@@ -1,7 +1,7 @@
import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '#lib';
import { ArgumentGeneratorReturn } from 'discord-akairo';
import { ArgumentTypeCasterReturn } from 'discord-akairo/dist/src/struct/commands/arguments/Argument';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class EvidenceCommand extends BushCommand {
public constructor() {
@@ -32,7 +32,7 @@ export default class EvidenceCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts
index 2c71119..a59380f 100644
--- a/src/commands/moderation/hideCase.ts
+++ b/src/commands/moderation/hideCase.ts
@@ -1,5 +1,5 @@
import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class HideCaseCommand extends BushCommand {
public constructor() {
@@ -21,7 +21,7 @@ export default class HideCaseCommand extends BushCommand {
],
slash: true,
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES]),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages]),
channel: 'guild'
});
}
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
index 4fd6c10..6dfb09b 100644
--- a/src/commands/moderation/kick.ts
+++ b/src/commands/moderation/kick.ts
@@ -7,7 +7,7 @@ import {
type BushMessage,
type BushSlashMessage
} from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class KickCommand extends BushCommand {
public constructor() {
@@ -48,8 +48,8 @@ export default class KickCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.KICK_MEMBERS]),
- userPermissions: [Permissions.FLAGS.KICK_MEMBERS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.KickMembers]),
+ userPermissions: [PermissionFlagsBits.KickMembers]
});
}
diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts
index ea7c08b..3e4f05b 100644
--- a/src/commands/moderation/lockdown.ts
+++ b/src/commands/moderation/lockdown.ts
@@ -11,7 +11,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, ChannelType, Collection, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, Collection, PermissionFlagsBits } from 'discord.js';
export default class LockdownCommand extends BushCommand {
public constructor() {
@@ -58,8 +58,8 @@ export default class LockdownCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]),
- userPermissions: [Permissions.FLAGS.MANAGE_CHANNELS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]),
+ userPermissions: [PermissionFlagsBits.ManageChannels]
});
}
@@ -71,7 +71,6 @@ export default class LockdownCommand extends BushCommand {
all: ArgType<'boolean'>;
}
) {
- client.console.debug('lockdown command');
return await LockdownCommand.lockdownOrUnlockdown(message, args, 'lockdown');
}
diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts
index d6ecc37..6b8ae2d 100644
--- a/src/commands/moderation/modlog.ts
+++ b/src/commands/moderation/modlog.ts
@@ -1,5 +1,5 @@
import { BushCommand, ButtonPaginator, ModLog, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Embed, Permissions, User } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits, User } from 'discord.js';
export default class ModlogCommand extends BushCommand {
public constructor() {
@@ -31,7 +31,7 @@ export default class ModlogCommand extends BushCommand {
],
slash: true,
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts
index ea935ce..c97ceb7 100644
--- a/src/commands/moderation/mute.ts
+++ b/src/commands/moderation/mute.ts
@@ -9,7 +9,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class MuteCommand extends BushCommand {
public constructor() {
@@ -51,8 +51,8 @@ export default class MuteCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES]),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/purge.ts b/src/commands/moderation/purge.ts
index b48f997..c882b7f 100644
--- a/src/commands/moderation/purge.ts
+++ b/src/commands/moderation/purge.ts
@@ -1,6 +1,6 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Collection, Permissions, type Snowflake } from 'discord.js';
+import { ApplicationCommandOptionType, Collection, PermissionFlagsBits, type Snowflake } from 'discord.js';
export default class PurgeCommand extends BushCommand {
public constructor() {
@@ -43,8 +43,8 @@ export default class PurgeCommand extends BushCommand {
],
slash: true,
clientPermissions: (m) =>
- util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES, Permissions.FLAGS.EMBED_LINKS], true),
- userPermissions: [Permissions.FLAGS.MANAGE_MESSAGES],
+ util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.EmbedLinks], true),
+ userPermissions: [PermissionFlagsBits.ManageMessages],
channel: 'guild'
});
}
diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts
index 61759ae..092b8ac 100644
--- a/src/commands/moderation/removeReactionEmoji.ts
+++ b/src/commands/moderation/removeReactionEmoji.ts
@@ -1,6 +1,6 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Message, Permissions, type Emoji } from 'discord.js';
+import { ApplicationCommandOptionType, Message, PermissionFlagsBits, type Emoji } from 'discord.js';
export default class RemoveReactionEmojiCommand extends BushCommand {
public constructor() {
@@ -33,8 +33,8 @@ export default class RemoveReactionEmojiCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) =>
- util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES, Permissions.FLAGS.EMBED_LINKS], true),
- userPermissions: [Permissions.FLAGS.MANAGE_MESSAGES, Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS] // Can't undo the removal of 1000s of reactions
+ util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.EmbedLinks], true),
+ userPermissions: [PermissionFlagsBits.ManageMessages, PermissionFlagsBits.ManageEmojisAndStickers] // Can't undo the removal of 1000s of reactions
});
}
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts
index 0d4d91b..b76795b 100644
--- a/src/commands/moderation/role.ts
+++ b/src/commands/moderation/role.ts
@@ -9,7 +9,7 @@ import {
type OptionalArgType
} from '#lib';
import { type ArgumentOptions, type Flag } from 'discord-akairo';
-import { ApplicationCommandOptionType, Permissions, type Snowflake } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits, type Snowflake } from 'discord.js';
export default class RoleCommand extends BushCommand {
public constructor() {
@@ -61,7 +61,7 @@ export default class RoleCommand extends BushCommand {
channel: 'guild',
typing: true,
clientPermissions: (m) =>
- util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES, Permissions.FLAGS.EMBED_LINKS], true),
+ util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles, PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
@@ -130,7 +130,7 @@ export default class RoleCommand extends BushCommand {
if (!args.role) return await message.util.reply(`${util.emojis.error} You must specify a role.`);
if (args.duration === null) args.duration = 0;
if (
- !message.member!.permissions.has(Permissions.FLAGS.MANAGE_ROLES) &&
+ !message.member!.permissions.has(PermissionFlagsBits.ManageRoles) &&
message.member!.id !== message.guild?.ownerId &&
!message.member!.user.isOwner()
) {
diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts
index 96c3881..fb446d1 100644
--- a/src/commands/moderation/slowmode.ts
+++ b/src/commands/moderation/slowmode.ts
@@ -1,6 +1,6 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import { Argument } from 'discord-akairo';
-import { ApplicationCommandOptionType, ChannelType, Permissions, type TextChannel, type ThreadChannel } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits, type TextChannel, type ThreadChannel } from 'discord.js';
export default class SlowmodeCommand extends BushCommand {
public constructor() {
@@ -35,8 +35,8 @@ export default class SlowmodeCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) =>
- util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.EMBED_LINKS], true),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels, PermissionFlagsBits.EmbedLinks], true),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/timeout.ts b/src/commands/moderation/timeout.ts
index 73b9d50..32fcf76 100644
--- a/src/commands/moderation/timeout.ts
+++ b/src/commands/moderation/timeout.ts
@@ -8,7 +8,7 @@ import {
type BushSlashMessage
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class TimeoutCommand extends BushCommand {
public constructor() {
@@ -49,8 +49,8 @@ export default class TimeoutCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MODERATE_MEMBERS]),
- userPermissions: [Permissions.FLAGS.MODERATE_MEMBERS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ModerateMembers]),
+ userPermissions: [PermissionFlagsBits.ModerateMembers]
});
}
diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts
index b2bdd72..7bdb32e 100644
--- a/src/commands/moderation/unban.ts
+++ b/src/commands/moderation/unban.ts
@@ -7,7 +7,7 @@ import {
type BushSlashMessage,
type OptionalArgType
} from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class UnbanCommand extends BushCommand {
public constructor() {
@@ -39,8 +39,8 @@ export default class UnbanCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: [Permissions.FLAGS.BAN_MEMBERS],
- userPermissions: [Permissions.FLAGS.BAN_MEMBERS]
+ clientPermissions: [PermissionFlagsBits.BanMembers],
+ userPermissions: [PermissionFlagsBits.BanMembers]
});
}
diff --git a/src/commands/moderation/unblock.ts b/src/commands/moderation/unblock.ts
index 1abf2be..7d36e15 100644
--- a/src/commands/moderation/unblock.ts
+++ b/src/commands/moderation/unblock.ts
@@ -11,7 +11,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class UnblockCommand extends BushCommand {
public constructor() {
@@ -53,8 +53,8 @@ export default class UnblockCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/unlockdown.ts b/src/commands/moderation/unlockdown.ts
index ea36b67..4694518 100644
--- a/src/commands/moderation/unlockdown.ts
+++ b/src/commands/moderation/unlockdown.ts
@@ -1,6 +1,6 @@
import { LockdownCommand } from '#commands';
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
-import { ApplicationCommandOptionType, ChannelType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits } from 'discord.js';
export default class UnlockdownCommand extends BushCommand {
public constructor() {
@@ -47,8 +47,8 @@ export default class UnlockdownCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]),
- userPermissions: [Permissions.FLAGS.MANAGE_CHANNELS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]),
+ userPermissions: [PermissionFlagsBits.ManageChannels]
});
}
diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts
index 9974b8d..fb4bb55 100644
--- a/src/commands/moderation/unmute.ts
+++ b/src/commands/moderation/unmute.ts
@@ -9,7 +9,7 @@ import {
type BushSlashMessage,
type OptionalArgType
} from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class UnmuteCommand extends BushCommand {
public constructor() {
@@ -51,8 +51,8 @@ export default class UnmuteCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES]),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]),
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}
diff --git a/src/commands/moderation/untimeout.ts b/src/commands/moderation/untimeout.ts
index 6ebd777..6d3632d 100644
--- a/src/commands/moderation/untimeout.ts
+++ b/src/commands/moderation/untimeout.ts
@@ -9,7 +9,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class UntimeoutCommand extends BushCommand {
public constructor() {
@@ -51,8 +51,8 @@ export default class UntimeoutCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MODERATE_MEMBERS]),
- userPermissions: [Permissions.FLAGS.MODERATE_MEMBERS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ModerateMembers]),
+ userPermissions: [PermissionFlagsBits.ModerateMembers]
});
}
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts
index af45782..27d04b3 100644
--- a/src/commands/moderation/warn.ts
+++ b/src/commands/moderation/warn.ts
@@ -9,7 +9,7 @@ import {
type BushSlashMessage,
type OptionalArgType
} from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class WarnCommand extends BushCommand {
public constructor() {
@@ -51,7 +51,7 @@ export default class WarnCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: (m) => util.userGuildPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES])
+ userPermissions: (m) => util.userGuildPermCheck(m, [PermissionFlagsBits.ManageMessages])
});
}