aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush
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/moulberry-bush
parent78ab3362a52578d0bcada903732f147747c609df (diff)
downloadtanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2
tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip
fixes, and breaking changes
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r--src/commands/moulberry-bush/capePermissions.ts4
-rw-r--r--src/commands/moulberry-bush/capes.ts4
-rw-r--r--src/commands/moulberry-bush/giveawayPing.ts18
-rw-r--r--src/commands/moulberry-bush/moulHammer.ts4
-rw-r--r--src/commands/moulberry-bush/report.ts4
-rw-r--r--src/commands/moulberry-bush/rule.ts4
-rw-r--r--src/commands/moulberry-bush/serverStatus.ts4
7 files changed, 21 insertions, 21 deletions
diff --git a/src/commands/moulberry-bush/capePermissions.ts b/src/commands/moulberry-bush/capePermissions.ts
index 7f261d5..e568036 100644
--- a/src/commands/moulberry-bush/capePermissions.ts
+++ b/src/commands/moulberry-bush/capePermissions.ts
@@ -1,5 +1,5 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Embed, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
import got from 'got';
export default class CapePermissionsCommand extends BushCommand {
@@ -21,7 +21,7 @@ export default class CapePermissionsCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
channel: 'guild'
});
diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts
index 7965713..8c080e3 100644
--- a/src/commands/moulberry-bush/capes.ts
+++ b/src/commands/moulberry-bush/capes.ts
@@ -1,7 +1,7 @@
import { BushCommand, ButtonPaginator, DeleteButton, type BushMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
import { APIEmbed } from 'discord-api-types';
-import { ApplicationCommandOptionType, AutocompleteInteraction, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, AutocompleteInteraction, PermissionFlagsBits } from 'discord.js';
import Fuse from 'fuse.js';
import got from 'got';
@@ -29,7 +29,7 @@ export default class CapesCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts
index dbbb613..dd305c6 100644
--- a/src/commands/moulberry-bush/giveawayPing.ts
+++ b/src/commands/moulberry-bush/giveawayPing.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, type BushMessage } from '#lib';
-import { Permissions } from 'discord.js';
+import { PermissionFlagsBits } from 'discord.js';
export default class GiveawayPingCommand extends BushCommand {
public constructor() {
@@ -9,13 +9,13 @@ export default class GiveawayPingCommand extends BushCommand {
description: 'Pings the giveaway role.',
usage: ['giveaway-ping'],
examples: ['giveaway-ping'],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_MESSAGES], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageMessages], true),
userPermissions: [
- Permissions.FLAGS.MANAGE_GUILD,
- Permissions.FLAGS.MANAGE_MESSAGES,
- Permissions.FLAGS.BAN_MEMBERS,
- Permissions.FLAGS.KICK_MEMBERS,
- Permissions.FLAGS.VIEW_CHANNEL
+ PermissionFlagsBits.ManageGuild,
+ PermissionFlagsBits.ManageMessages,
+ PermissionFlagsBits.BanMembers,
+ PermissionFlagsBits.KickMembers,
+ PermissionFlagsBits.ViewChannel
],
channel: 'guild',
ignoreCooldown: [],
@@ -29,8 +29,8 @@ export default class GiveawayPingCommand extends BushCommand {
}
public override async exec(message: BushMessage) {
- if (!message.member!.permissions.has(Permissions.FLAGS.MANAGE_GUILD) && !message.member!.user.isOwner())
- await message.util.reply(`${util.emojis.error} You are missing the **MANAGE_GUILD** permission.`);
+ if (!message.member!.permissions.has(PermissionFlagsBits.ManageGuild) && !message.member!.user.isOwner())
+ await message.util.reply(`${util.emojis.error} You are missing the **ManageGuild** permission.`);
await message.delete().catch(() => {});
diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts
index 6aa5ca3..9a16545 100644
--- a/src/commands/moulberry-bush/moulHammer.ts
+++ b/src/commands/moulberry-bush/moulHammer.ts
@@ -1,5 +1,5 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Embed, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
export default class MoulHammerCommand extends BushCommand {
public constructor() {
@@ -22,7 +22,7 @@ export default class MoulHammerCommand extends BushCommand {
slash: true,
slashGuilds: ['516977525906341928'],
restrictedGuilds: ['516977525906341928'],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts
index a2a18ef..7b3e729 100644
--- a/src/commands/moulberry-bush/report.ts
+++ b/src/commands/moulberry-bush/report.ts
@@ -1,6 +1,6 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Embed, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
import moment from 'moment';
assert(moment);
@@ -34,7 +34,7 @@ export default class ReportCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
channel: 'guild'
});
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index dfb65f3..5eb2b98 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, BushSlashMessage, type BushMessage, type OptionalArgType } from '#lib';
-import { ApplicationCommandOptionType, Embed, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
const rules = [
{
@@ -85,7 +85,7 @@ export default class RuleCommand extends BushCommand {
slash: true,
slashGuilds: ['516977525906341928'],
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
restrictedGuilds: ['516977525906341928']
});
diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts
index 435b99e..35240f9 100644
--- a/src/commands/moulberry-bush/serverStatus.ts
+++ b/src/commands/moulberry-bush/serverStatus.ts
@@ -1,6 +1,6 @@
import { BushCommand, type BushMessage } from '#lib';
import assert from 'assert';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
import got from 'got';
assert(got);
@@ -13,7 +13,7 @@ export default class ServerStatusCommand extends BushCommand {
description: "Gives the status of moulberry's server",
usage: ['server-status'],
examples: ['server-status', 'ss'],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
slash: true
});