aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/_customAutomodPhrases.ts4
-rw-r--r--src/commands/config/blacklist.ts4
-rw-r--r--src/commands/config/config.ts6
-rw-r--r--src/commands/config/disable.ts5
-rw-r--r--src/commands/config/features.ts6
-rw-r--r--src/commands/config/log.ts4
6 files changed, 15 insertions, 14 deletions
diff --git a/src/commands/config/_customAutomodPhrases.ts b/src/commands/config/_customAutomodPhrases.ts
index 1c91f28..bd9bab5 100644
--- a/src/commands/config/_customAutomodPhrases.ts
+++ b/src/commands/config/_customAutomodPhrases.ts
@@ -1,5 +1,5 @@
// import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
-// import { Permissions } from 'discord.js';
+// import { PermissionFlagsBits } from 'discord.js';
// export default class CustomAutomodPhrasesCommand extends BushCommand {
// public constructor() {
@@ -31,7 +31,7 @@
// slash: true,
// channel: 'guild',
// clientPermissions: (m) => util.clientSendAndPermCheck(m),
-// userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+// userPermissions: [PermissionFlagsBits.ManageGuild]
// });
// }
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 0498b87..d210472 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Permissions, User } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits, User } from 'discord.js';
export default class BlacklistCommand extends BushCommand {
public constructor() {
@@ -42,7 +42,7 @@ export default class BlacklistCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+ userPermissions: [PermissionFlagsBits.ManageGuild]
});
}
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index 42ff309..8f2472e 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -20,7 +20,7 @@ import {
Formatters,
GuildMember,
InteractionUpdateOptions,
- Permissions,
+ PermissionFlagsBits,
Role,
SelectMenuComponent,
SelectMenuOption,
@@ -126,7 +126,7 @@ export default class ConfigCommand extends BushCommand {
}),
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+ userPermissions: [PermissionFlagsBits.ManageGuild]
});
}
@@ -209,7 +209,7 @@ export default class ConfigCommand extends BushCommand {
}
) {
if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be used in servers.`);
- if (!message.member?.permissions.has(Permissions.FLAGS.MANAGE_GUILD) && !message.member?.user.isOwner())
+ if (!message.member?.permissions.has(PermissionFlagsBits.ManageGuild) && !message.member?.user.isOwner())
return await message.util.reply(`${util.emojis.error} You must have the **Manage Server** permission to run this command.`);
const setting = message.util.isSlash ? (_.camelCase(args.subcommandGroup)! as GuildSettings) : args.setting!;
const action = message.util.isSlash ? args.subcommand! : args.action!;
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index d59ff55..a7ebfa2 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -1,7 +1,8 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, AutocompleteInteraction, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, AutocompleteInteraction, PermissionFlagsBits } from 'discord.js';
import Fuse from 'fuse.js';
+
assert(Fuse);
export default class DisableCommand extends BushCommand {
@@ -48,7 +49,7 @@ export default class DisableCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+ userPermissions: [PermissionFlagsBits.ManageGuild]
});
}
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index 04c0425..2e7d623 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -10,7 +10,7 @@ import {
ActionRow,
ComponentType,
Embed,
- Permissions,
+ PermissionFlagsBits,
SelectMenuComponent,
SelectMenuOption,
type Message,
@@ -27,8 +27,8 @@ export default class FeaturesCommand extends BushCommand {
examples: ['features'],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
+ userPermissions: [PermissionFlagsBits.ManageGuild]
});
}
diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts
index 4c9a20b..79f9258 100644
--- a/src/commands/config/log.ts
+++ b/src/commands/config/log.ts
@@ -1,6 +1,6 @@
import { BushCommand, guildLogsArr, type ArgType, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib';
import { ArgumentGeneratorReturn } from 'discord-akairo';
-import { ApplicationCommandOptionType, ChannelType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits } from 'discord.js';
export default class LogCommand extends BushCommand {
public constructor() {
@@ -38,7 +38,7 @@ export default class LogCommand extends BushCommand {
],
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD]
+ userPermissions: [PermissionFlagsBits.ManageGuild]
});
}