aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common
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/lib/common
parent78ab3362a52578d0bcada903732f147747c609df (diff)
downloadtanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip
fixes, and breaking changes
Diffstat (limited to 'src/lib/common')
-rw-r--r--src/lib/common/AutoMod.ts6
-rw-r--r--src/lib/common/util/Moderation.ts4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index c57d581..8d94dab 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -6,7 +6,7 @@ import {
ChannelType,
Embed,
GuildMember,
- Permissions,
+ PermissionFlagsBits,
type TextChannel
} from 'discord.js';
@@ -120,7 +120,7 @@ export class AutoMod {
if (!includes('@everyone') && !includes('@here')) return;
// It would be bad if we deleted a message that actually pinged @everyone or @here
if (
- this.message.member?.permissionsIn(this.message.channelId).has(Permissions.FLAGS.MENTION_EVERYONE) ||
+ this.message.member?.permissionsIn(this.message.channelId).has(PermissionFlagsBits.MentionEveryone) ||
this.message.mentions.everyone
)
return;
@@ -291,7 +291,7 @@ export class AutoMod {
* @param interaction The button interaction.
*/
public static async handleInteraction(interaction: BushButtonInteraction) {
- if (!interaction.memberPermissions?.has(Permissions.FLAGS.BAN_MEMBERS))
+ if (!interaction.memberPermissions?.has(PermissionFlagsBits.BanMembers))
return interaction.reply({
content: `${util.emojis.error} You are missing the **Ban Members** permission.`,
ephemeral: true
diff --git a/src/lib/common/util/Moderation.ts b/src/lib/common/util/Moderation.ts
index 62dbc90..0ba6fca 100644
--- a/src/lib/common/util/Moderation.ts
+++ b/src/lib/common/util/Moderation.ts
@@ -10,7 +10,7 @@ import {
type BushUserResolvable,
type ModLogType
} from '#lib';
-import { Embed, Permissions, type Snowflake } from 'discord.js';
+import { Embed, PermissionFlagsBits, type Snowflake } from 'discord.js';
/**
* A utility class with moderation-related methods.
@@ -72,7 +72,7 @@ export class Moderation {
}
if (
checkModerator &&
- victim.permissions.has(Permissions.FLAGS.MANAGE_MESSAGES) &&
+ victim.permissions.has(PermissionFlagsBits.ManageMessages) &&
!(type.startsWith('un') && moderator.id === victim.id)
) {
if (await moderator.guild.hasFeature('modsCanPunishMods')) {