aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json25
-rw-r--r--src/arguments/permission.ts8
-rw-r--r--src/commands/admin/channelPermissions.ts8
-rw-r--r--src/commands/admin/roleAll.ts8
-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
-rw-r--r--src/commands/dev/eval.ts4
-rw-r--r--src/commands/info/avatar.ts6
-rw-r--r--src/commands/info/botInfo.ts4
-rw-r--r--src/commands/info/color.ts5
-rw-r--r--src/commands/info/guildInfo.ts14
-rw-r--r--src/commands/info/help.ts4
-rw-r--r--src/commands/info/icon.ts6
-rw-r--r--src/commands/info/ping.ts4
-rw-r--r--src/commands/info/pronouns.ts4
-rw-r--r--src/commands/info/snowflake.ts4
-rw-r--r--src/commands/info/userInfo.ts18
-rw-r--r--src/commands/leveling/leaderboard.ts4
-rw-r--r--src/commands/leveling/level.ts6
-rw-r--r--src/commands/leveling/levelRoles.ts6
-rw-r--r--src/commands/leveling/setLevel.ts4
-rw-r--r--src/commands/leveling/setXp.ts4
-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
-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
-rw-r--r--src/commands/utilities/activity.ts8
-rw-r--r--src/commands/utilities/price.ts4
-rw-r--r--src/commands/utilities/reminders.ts4
-rw-r--r--src/commands/utilities/steal.ts6
-rw-r--r--src/commands/utilities/viewRaw.ts4
-rw-r--r--src/lib/common/AutoMod.ts6
-rw-r--r--src/lib/common/util/Moderation.ts4
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts55
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts19
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts4
-rw-r--r--src/lib/extensions/discord-akairo/BushCommandHandler.ts6
-rw-r--r--src/lib/extensions/discord.js/BushChannel.ts7
-rw-r--r--src/lib/extensions/discord.js/BushClientEvents.ts14
-rw-r--r--src/lib/extensions/discord.js/BushDMChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts16
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannelManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts27
-rw-r--r--src/lib/extensions/discord.js/BushGuildMemberManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushStoreChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushTextChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushThreadChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushThreadMemberManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushUserManager.ts4
-rw-r--r--src/lib/utils/BushConstants.ts113
-rw-r--r--src/listeners/client/rateLimit.ts15
-rw-r--r--src/listeners/commands/commandMissingPermissions.ts3
-rw-r--r--src/listeners/commands/commandStarted.ts6
-rw-r--r--src/listeners/member-custom/bushBan.ts2
-rw-r--r--src/listeners/member-custom/bushBlock.ts2
-rw-r--r--src/listeners/member-custom/bushKick.ts2
-rw-r--r--src/listeners/member-custom/bushMute.ts2
-rw-r--r--src/listeners/member-custom/bushPunishRole.ts2
-rw-r--r--src/listeners/member-custom/bushPunishRoleRemove.ts2
-rw-r--r--src/listeners/member-custom/bushPurge.ts2
-rw-r--r--src/listeners/member-custom/bushRemoveTimeout.ts2
-rw-r--r--src/listeners/member-custom/bushTimeout.ts2
-rw-r--r--src/listeners/member-custom/bushUnban.ts2
-rw-r--r--src/listeners/member-custom/bushUnblock.ts2
-rw-r--r--src/listeners/member-custom/bushUnmute.ts2
-rw-r--r--src/listeners/member-custom/bushUpdateModlog.ts2
-rw-r--r--src/listeners/member-custom/bushUpdateSettings.ts2
-rw-r--r--src/listeners/member-custom/bushWarn.ts2
-rw-r--r--src/listeners/message/autoThread.ts4
-rw-r--r--src/listeners/rest/rateLimit.ts16
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncBan.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncKick.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncTimeout.ts6
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncUnban.ts6
-rw-r--r--tsconfig.json30
-rw-r--r--yarn.lock393
104 files changed, 627 insertions, 542 deletions
diff --git a/package.json b/package.json
index 786a3d7..ea8c3fc 100644
--- a/package.json
+++ b/package.json
@@ -7,13 +7,13 @@
"repository": "https://github.com/NotEnoughUpdates/bush-bot-3.0",
"author": "IRONM00N#0001 (@IRONM00N)",
"contributors": [
+ "jani270#0119 (@jani270)",
"Tyman#5998 (@TymanWasTaken)",
"TrashCan#8913 (@TrashCan69420)",
"tricked#3777 (@Tricked-dev)",
"rioho#0001 (@riohorealhk)",
"Proudmuslim#2900 (@proudmuslim-dev)",
"katherine🌺#0668 (@Lisenaaaa)",
- "jani270#0119 (@jani270)",
"pjones123#6025 (@pjones123)",
"Angry_Pineapple#6926 (@Angry-Pineapple3121)",
"EthanDevelops#5366 (@EthanDevelops)"
@@ -44,7 +44,7 @@
"format:check": "yarn prettier . --check",
"upgrade": "yarn rimraf yarn.lock && yarn cache clean && yarn install && yarn up && yarn up -R && yarn set version latest",
"upgrade:sdk": "yarn dlx @yarnpkg/sdks vscode",
- "upgrade:manual": "yarn add @notenoughupdates/discord.js-minesweeper @notenoughupdates/events-intercept @notenoughupdates/humanize-duration @notenoughupdates/simplify-number @notenoughupdates/wolfram-alpha-api @sentry/integrations @sentry/node @sentry/tracing canvas deep-lock chalk discord-akairo@npm:@notenoughupdates/discord-akairo@dev discord.js@npm:@notenoughupdates/discord.js@dev fuse.js got lodash mathjs moment nanoid node-os-utils numeral pg pg-hstore prettier pretty-bytes rimraf sequelize source-map-support tinycolor2 tslib typescript vm2 && yarn add --dev @types/express @types/lodash @types/node @types/node-os-utils @types/numeral @types/tinycolor2 @types/validator @typescript-eslint/eslint-plugin @typescript-eslint/parser discord-api-types@0.26.0 eslint eslint-config-prettier",
+ "upgrade:manual": "yarn add @notenoughupdates/discord.js-minesweeper @notenoughupdates/events-intercept @notenoughupdates/humanize-duration @notenoughupdates/simplify-number @notenoughupdates/wolfram-alpha-api @sentry/integrations @sentry/node @sentry/tracing canvas chalk deep-lock discord-akairo@npm:@notenoughupdates/discord-akairo@dev discord.js@npm:@notenoughupdates/discord.js@dev fuse.js got lodash mathjs moment nanoid node-os-utils numeral pg pg-hstore prettier pretty-bytes rimraf sequelize source-map-support tinycolor2 tslib typescript vm2 && yarn add --dev @types/express @types/lodash @types/node @types/node-os-utils @types/numeral @types/tinycolor2 @types/validator @typescript-eslint/eslint-plugin @typescript-eslint/parser discord-api-types@0.26.1 eslint eslint-config-prettier node-fetch",
"upgrade:package": "powershell -c \"yarn info --name-only | %{\\$_ -replace '^(?:├─ |└─ )?(@?[a-z0-9-~][a-z0-9-._~/]{0,}(?=.*(npm:(?!.*dev)|patch:.*?@npm).*))|.*\\$','\\$1'} | where{[string]::IsNullOrEmpty(\\$_) -eq \\$false} | yarn add\"",
"beta": "git push && git checkout beta && git merge master && git push && git checkout master",
"deploy:beta": "pm2 deploy ecosystem.config.cjs beta",
@@ -57,9 +57,9 @@
"@notenoughupdates/humanize-duration": "^4.0.1",
"@notenoughupdates/simplify-number": "^1.0.1",
"@notenoughupdates/wolfram-alpha-api": "^1.0.1",
- "@sentry/integrations": "^6.16.1",
- "@sentry/node": "^6.16.1",
- "@sentry/tracing": "^6.16.1",
+ "@sentry/integrations": "^6.17.3",
+ "@sentry/node": "^6.17.3",
+ "@sentry/tracing": "^6.17.3",
"canvas": "^2.9.0",
"chalk": "^5.0.0",
"deep-lock": "^1.0.0",
@@ -78,18 +78,18 @@
"prettier": "^2.5.1",
"pretty-bytes": "^5.6.0",
"rimraf": "^3.0.2",
- "sequelize": "^6.13.0",
+ "sequelize": "6.13.0",
"source-map-support": "^0.5.21",
"tinycolor2": "^1.4.2",
"tslib": "^2.3.1",
- "typescript": "^4.5.4",
+ "typescript": "^4.5.5",
"vm2": "^3.9.5"
},
"devDependencies": {
"@types/eslint": "^8",
"@types/express": "^4.17.13",
"@types/lodash": "^4.14.178",
- "@types/node": "^17.0.10",
+ "@types/node": "^17.0.13",
"@types/node-os-utils": "^1.2.0",
"@types/numeral": "^2.0.2",
"@types/pg": "^8",
@@ -98,12 +98,13 @@
"@types/source-map-support": "^0",
"@types/tinycolor2": "^1.4.3",
"@types/validator": "^13.7.1",
- "@typescript-eslint/eslint-plugin": "^5.10.0",
- "@typescript-eslint/parser": "^5.10.0",
+ "@typescript-eslint/eslint-plugin": "^5.10.2",
+ "@typescript-eslint/parser": "^5.10.2",
"discord-api-types": "0.26.1",
- "eslint": "^8.7.0",
+ "eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
- "eslint-plugin-deprecation": "^1.3.2"
+ "eslint-plugin-deprecation": "^1.3.2",
+ "node-fetch": "^3.2.0"
},
"packageManager": "yarn@3.1.1"
}
diff --git a/src/arguments/permission.ts b/src/arguments/permission.ts
index 4ae6327..cf4c42c 100644
--- a/src/arguments/permission.ts
+++ b/src/arguments/permission.ts
@@ -1,12 +1,12 @@
import { type BushArgumentTypeCaster } from '#lib';
-import { Permissions, type PermissionString } from 'discord.js';
+import { PermissionFlagsBits, type PermissionsString } from 'discord.js';
-export const permission: BushArgumentTypeCaster<PermissionString | null> = (_, phrase) => {
+export const permission: BushArgumentTypeCaster<PermissionsString | null> = (_, phrase) => {
if (!phrase) return null;
phrase = phrase.toUpperCase().replace(/ /g, '_');
- if (!(phrase in Permissions.FLAGS)) {
+ if (!(phrase in PermissionFlagsBits)) {
return null;
} else {
- return phrase as PermissionString;
+ return phrase as PermissionsString;
}
};
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index 4f511cd..e12a131 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -1,5 +1,5 @@
import { BushCommand, ButtonPaginator, 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 ChannelPermissionsCommand extends BushCommand {
public constructor() {
@@ -47,8 +47,8 @@ export default class ChannelPermissionsCommand extends BushCommand {
]
}
],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_CHANNELS]),
- userPermissions: [Permissions.FLAGS.ADMINISTRATOR],
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageChannels]),
+ userPermissions: [PermissionFlagsBits.Administrator],
channel: 'guild',
slash: true
});
@@ -63,7 +63,7 @@ export default class ChannelPermissionsCommand extends BushCommand {
}
) {
if (!message.inGuild()) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`);
- if (!message.member!.permissions.has(Permissions.FLAGS.ADMINISTRATOR) && !message.member!.user.isOwner())
+ if (!message.member!.permissions.has(PermissionFlagsBits.Administrator) && !message.member!.user.isOwner())
return await message.util.reply(`${util.emojis.error} You must have admin perms to use this command.`);
if (message.util.isSlashMessage(message)) await message.interaction.deferReply();
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts
index 3b438d9..c056bbd 100644
--- a/src/commands/admin/roleAll.ts
+++ b/src/commands/admin/roleAll.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Permissions, type GuildMember } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js';
export default class RoleAllCommand extends BushCommand {
public constructor() {
@@ -30,8 +30,8 @@ export default class RoleAllCommand extends BushCommand {
}
],
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES]),
- userPermissions: [Permissions.FLAGS.ADMINISTRATOR],
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]),
+ userPermissions: [PermissionFlagsBits.Administrator],
typing: true,
slash: true
});
@@ -39,7 +39,7 @@ export default class RoleAllCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage, args: { role: ArgType<'role'>; bots: ArgType<'boolean'> }) {
if (!message.inGuild()) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`);
- if (!message.member!.permissions.has(Permissions.FLAGS.ADMINISTRATOR) && !message.member!.user.isOwner())
+ if (!message.member!.permissions.has(PermissionFlagsBits.Administrator) && !message.member!.user.isOwner())
return await message.util.reply(`${util.emojis.error} You must have admin perms to use this command.`);
if (message.util.isSlashMessage(message)) await message.interaction.deferReply();
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]
});
}
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 28d2c76..617672f 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -32,7 +32,7 @@ import {
Message,
MessageAttachment,
MessageCollector,
- Permissions,
+ PermissionsBitField,
ReactionCollector,
SelectMenuComponent,
Util
@@ -268,4 +268,4 @@ export default class EvalCommand extends BushCommand {
}
}
-/** @typedef {ActivePunishment|Global|Guild|Level|ModLog|StickyRole|ButtonInteraction|Collection|Collector|CommandInteraction|ContextMenuCommandInteraction|DMChannel|Emoji|Interaction|InteractionCollector|Message|ActionRow|MessageAttachment|ButtonComponent|MessageCollector|SelectMenuComponent|ReactionCollector|Util|Canvas|Shared|Permissions} VSCodePleaseDontRemove */
+/** @typedef {ActivePunishment|Global|Guild|Level|ModLog|StickyRole|ButtonInteraction|Collection|Collector|CommandInteraction|ContextMenuCommandInteraction|DMChannel|Emoji|Interaction|InteractionCollector|Message|ActionRow|MessageAttachment|ButtonComponent|MessageCollector|SelectMenuComponent|ReactionCollector|Util|Canvas|Shared|PermissionsBitField} VSCodePleaseDontRemove */
diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts
index 1d1a27b..0ea9179 100644
--- a/src/commands/info/avatar.ts
+++ b/src/commands/info/avatar.ts
@@ -1,5 +1,5 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Embed, GuildMember, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, GuildMember, PermissionFlagsBits } from 'discord.js';
export default class AvatarCommand extends BushCommand {
constructor() {
@@ -21,14 +21,14 @@ export default class AvatarCommand extends BushCommand {
slashType: ApplicationCommandOptionType.User
}
],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
slash: true
});
}
override async exec(message: BushMessage | BushSlashMessage, args: { user: ArgType<'member'> | ArgType<'globalUser'> }) {
- const params: { size: 2048; format: 'png'; dynamic: true } = { size: 2048, format: 'png', dynamic: true };
+ const params: { size: 2048; extension: 'png'; dynamic: true } = { size: 2048, extension: 'png', dynamic: true };
const defaultAvatar = `https://cdn.discordapp.com/embed/avatars/${Math.ceil(Math.random() * 6) - 1}.png`;
const member = (args.user ?? message.member) instanceof GuildMember ? args.user ?? message.member : undefined;
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index d899a95..d23f5b1 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -1,6 +1,6 @@
import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { Embed, Permissions, version as discordJSVersion } from 'discord.js';
+import { Embed, PermissionFlagsBits, version as discordJSVersion } from 'discord.js';
import * as os from 'os';
const { default: prettyBytes } = await import('pretty-bytes');
assert(prettyBytes);
@@ -15,7 +15,7 @@ export default class BotInfoCommand extends BushCommand {
usage: ['bot-info'],
examples: ['bot-info'],
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/info/color.ts b/src/commands/info/color.ts
index 0e1be81..6aad1fe 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -9,8 +9,9 @@ import {
type BushSlashMessage
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Embed, Permissions, Role } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, PermissionFlagsBits, Role } from 'discord.js';
import tinycolor from 'tinycolor2';
+
assert(tinycolor);
const isValidTinyColor: BushArgumentTypeCaster<string | null> = (_message, phase) => {
@@ -40,7 +41,7 @@ export default class ColorCommand extends BushCommand {
}
],
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index 03f6441..0aabb70 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -8,7 +8,7 @@ import {
GuildMFALevel,
GuildPremiumTier,
GuildVerificationLevel,
- Permissions,
+ PermissionFlagsBits,
type BaseGuildVoiceChannel,
type GuildPreview,
type Snowflake,
@@ -36,7 +36,7 @@ export default class GuildInfoCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
@@ -98,14 +98,14 @@ export default class GuildInfoCommand extends BushCommand {
);
if (guild.premiumSubscriptionCount)
guildAbout.push(`**Boosts:** Level ${guild.premiumTier} with ${guild.premiumSubscriptionCount ?? 0} boosts`);
- if (guild.me?.permissions.has(Permissions.FLAGS.MANAGE_GUILD) && guild.vanityURLCode) {
+ if (guild.me?.permissions.has(PermissionFlagsBits.ManageGuild) && guild.vanityURLCode) {
const vanityInfo: Vanity = await guild.fetchVanityData();
guildAbout.push(`**Vanity URL:** discord.gg/${vanityInfo.code}`, `**Vanity Uses:** ${vanityInfo.uses?.toLocaleString()}`);
}
- if (guild.icon) guildAbout.push(`**Icon:** [link](${guild.iconURL({ size: 4096, format: 'png' })})`);
- if (guild.banner) guildAbout.push(`**Banner:** [link](${guild.bannerURL({ size: 4096, format: 'png' })})`);
- if (guild.splash) guildAbout.push(`**Splash:** [link](${guild.splashURL({ size: 4096, format: 'png' })})`);
+ if (guild.icon) guildAbout.push(`**Icon:** [link](${guild.iconURL({ size: 4096, extension: 'png' })})`);
+ if (guild.banner) guildAbout.push(`**Banner:** [link](${guild.bannerURL({ size: 4096, extension: 'png' })})`);
+ if (guild.splash) guildAbout.push(`**Splash:** [link](${guild.splashURL({ size: 4096, extension: 'png' })})`);
const EmojiTierMap = {
[GuildPremiumTier.Tier3]: 500,
@@ -173,7 +173,7 @@ export default class GuildInfoCommand extends BushCommand {
.setColor(util.colors.default)
.addField({ name: '» About', value: guildAbout.join('\n') });
if (guildStats.length) guildInfoEmbed.addField({ name: '» Stats', value: guildStats.join('\n') });
- const guildIcon = guild.iconURL({ size: 2048, format: 'png' });
+ const guildIcon = guild.iconURL({ size: 2048, extension: 'png' });
if (guildIcon) {
guildInfoEmbed.setThumbnail(guildIcon);
}
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 67f99d1..e31153b 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -7,7 +7,7 @@ import {
ButtonComponent,
ButtonStyle,
Embed,
- Permissions
+ PermissionFlagsBits
} from 'discord.js';
import Fuse from 'fuse.js';
import packageDotJSON from '../../../package.json' assert { type: 'json' };
@@ -47,7 +47,7 @@ export default class HelpCommand 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/info/icon.ts b/src/commands/info/icon.ts
index ed9ab0f..b40b814 100644
--- a/src/commands/info/icon.ts
+++ b/src/commands/info/icon.ts
@@ -1,5 +1,5 @@
import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class IconCommand extends BushCommand {
constructor() {
@@ -9,7 +9,7 @@ export default class IconCommand extends BushCommand {
description: "A command to get the server's icon",
usage: ['icon'],
examples: ['icon'],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
channel: 'guild',
slash: true
@@ -23,7 +23,7 @@ export default class IconCommand extends BushCommand {
.setImage(
message.guild!.iconURL({
size: 2048,
- format: 'png'
+ extension: 'png'
})!
)
.setTitle(util.discord.escapeMarkdown(message.guild!.name));
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index 35e9748..c767361 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -1,5 +1,5 @@
import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
-import { Embed, Permissions, type Message } from 'discord.js';
+import { Embed, PermissionFlagsBits, type Message } from 'discord.js';
export default class PingCommand extends BushCommand {
public constructor() {
@@ -10,7 +10,7 @@ export default class PingCommand extends BushCommand {
usage: ['ping'],
examples: ['ping'],
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/info/pronouns.ts b/src/commands/info/pronouns.ts
index 9ba2a2a..652881b 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.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 PronounsCommand extends BushCommand {
public constructor() {
@@ -20,7 +20,7 @@ export default class PronounsCommand extends BushCommand {
slashType: ApplicationCommandOptionType.User
}
],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
slash: true
});
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index 7efd3ce..3295960 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -2,7 +2,7 @@ import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } fr
import {
ApplicationCommandOptionType,
Embed,
- Permissions,
+ PermissionFlagsBits,
SnowflakeUtil,
type DeconstructedSnowflake,
type Guild,
@@ -29,7 +29,7 @@ export default class SnowflakeCommand extends BushCommand {
slashType: ApplicationCommandOptionType.String
}
],
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
slash: true
});
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 2f35770..66eabe1 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -7,7 +7,7 @@ import {
type BushSlashMessage,
type BushUser
} from '#lib';
-import { ActivityType, ApplicationCommandOptionType, Embed, Permissions, UserFlags } from 'discord.js';
+import { ActivityType, ApplicationCommandOptionType, Embed, PermissionFlagsBits, UserFlags } from 'discord.js';
// TODO: Add bot information
export default class UserInfoCommand extends BushCommand {
@@ -31,7 +31,7 @@ export default class UserInfoCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
@@ -58,7 +58,7 @@ export default class UserInfoCommand extends BushCommand {
const userEmbed: Embed = new Embed()
.setTitle(util.discord.escapeMarkdown(user.tag))
- .setThumbnail(user.displayAvatarURL({ size: 2048, format: 'png' }))
+ .setThumbnail(user.displayAvatarURL({ size: 2048, extension: 'png' }))
.setTimestamp();
// Flags
@@ -78,15 +78,15 @@ export default class UserInfoCommand extends BushCommand {
Number(user.discriminator) < 10 ||
client.consts.mappings.maybeNitroDiscrims.includes(user.discriminator) ||
user.displayAvatarURL()?.endsWith('.gif') ||
- user.flags?.has(UserFlags.FLAGS.PARTNER) ||
- user.flags?.has(UserFlags.FLAGS.STAFF) ||
+ user.flags?.has(UserFlags.Partner) ||
+ user.flags?.has(UserFlags.Staff) ||
member?.avatar // server avatar
) {
emojis.push(client.consts.mappings.otherEmojis.Nitro);
}
if (guild?.ownerId == user.id) emojis.push(client.consts.mappings.otherEmojis.Owner);
- else if (member?.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) emojis.push(client.consts.mappings.otherEmojis.Admin);
+ else if (member?.permissions.has(PermissionFlagsBits.Administrator)) emojis.push(client.consts.mappings.otherEmojis.Admin);
if (member?.premiumSinceTimestamp) emojis.push(client.consts.mappings.otherEmojis.Booster);
const createdAt = util.timestamp(user.createdAt),
@@ -99,7 +99,7 @@ export default class UserInfoCommand extends BushCommand {
// General Info
const generalInfo = [`**Mention:** <@${user.id}>`, `**ID:** ${user.id}`, `**Created:** ${createdAt} (${createdAtDelta} ago)`];
if (user.accentColor !== null) generalInfo.push(`**Accent Color:** ${user.hexAccentColor}`);
- if (user.banner) generalInfo.push(`**Banner:** [link](${user.bannerURL({ format: 'png', size: 4096 })})`);
+ if (user.banner) generalInfo.push(`**Banner:** [link](${user.bannerURL({ extension: 'png', size: 4096 })})`);
const pronouns = await Promise.race([util.getPronounsOf(user), util.sleep(2)]);
if (pronouns && typeof pronouns === 'string') generalInfo.push(`**Pronouns:** ${pronouns}`);
@@ -173,7 +173,7 @@ export default class UserInfoCommand extends BushCommand {
// Important Perms
const perms = [];
- if (member?.permissions.has(Permissions.FLAGS.ADMINISTRATOR) || guild?.ownerId == user.id) {
+ if (member?.permissions.has(PermissionFlagsBits.Administrator) || guild?.ownerId == user.id) {
perms.push('`Administrator`');
} else if (member?.permissions.toArray().length) {
member.permissions.toArray().forEach((permission) => {
@@ -184,7 +184,7 @@ export default class UserInfoCommand extends BushCommand {
}
if (perms.length) userEmbed.addField({ name: '» Important Perms', value: perms.join(' ') });
- if (emojis) userEmbed.setDescription(`\u200B${emojis.join(' ')}`); // zero width space
+ if (emojis) userEmbed.setDescription(`\u200B${emojis.filter((e) => e).join(' ')}`); // zero width space
return userEmbed;
}
}
diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts
index 3a00036..eb8b90c 100644
--- a/src/commands/leveling/leaderboard.ts
+++ b/src/commands/leveling/leaderboard.ts
@@ -1,5 +1,5 @@
import { BushCommand, ButtonPaginator, Level, 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 LeaderboardCommand extends BushCommand {
public constructor() {
@@ -32,7 +32,7 @@ export default class LeaderboardCommand extends BushCommand {
if (!(await message.guild.hasFeature('leveling')))
return await message.util.reply(
`${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${
- message.member?.permissions.has(Permissions.FLAGS.MANAGE_GUILD)
+ message.member?.permissions.has(PermissionFlagsBits.ManageGuild)
? ` You can toggle features using the \`${util.prefix(message)}features\` command.`
: ''
}`
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts
index 18648e8..271c3f6 100644
--- a/src/commands/leveling/level.ts
+++ b/src/commands/leveling/level.ts
@@ -12,7 +12,7 @@ import {
import { SimplifyNumber } from '@notenoughupdates/simplify-number';
import assert from 'assert';
import canvas from 'canvas';
-import { ApplicationCommandOptionType, MessageAttachment, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, MessageAttachment, PermissionFlagsBits } from 'discord.js';
import got from 'got';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
@@ -51,7 +51,7 @@ export default class LevelCommand extends BushCommand {
if (!(await message.guild.hasFeature('leveling')))
return await message.util.reply(
`${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${
- message.member?.permissions.has(Permissions.FLAGS.MANAGE_GUILD)
+ message.member?.permissions.has(PermissionFlagsBits.ManageGuild)
? ` You can toggle features using the \`${util.prefix(message)}features\` command.`
: ''
}`
@@ -96,7 +96,7 @@ export default class LevelCommand extends BushCommand {
ctx.fillRect(0, 0, levelCard.width, levelCard.height);
// Draw avatar
const AVATAR_SIZE = 128;
- const avatarBuffer = await got.get(user.displayAvatarURL({ format: 'png', size: AVATAR_SIZE })).buffer();
+ const avatarBuffer = await got.get(user.displayAvatarURL({ extension: 'png', size: AVATAR_SIZE })).buffer();
const avatarImage = new canvas.Image();
avatarImage.src = avatarBuffer;
const imageTopCoord = levelCard.height / 2 - AVATAR_SIZE / 2;
diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts
index 115ace1..c15ebcb 100644
--- a/src/commands/leveling/levelRoles.ts
+++ b/src/commands/leveling/levelRoles.ts
@@ -1,6 +1,6 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class LevelRolesCommand extends BushCommand {
public constructor() {
@@ -33,8 +33,8 @@ export default class LevelRolesCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_ROLES]),
- userPermissions: [Permissions.FLAGS.MANAGE_GUILD, Permissions.FLAGS.MANAGE_ROLES]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageRoles]),
+ userPermissions: [PermissionFlagsBits.ManageGuild, PermissionFlagsBits.ManageRoles]
});
}
diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts
index 29f36e0..1016280 100644
--- a/src/commands/leveling/setLevel.ts
+++ b/src/commands/leveling/setLevel.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, Level, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class SetLevelCommand extends BushCommand {
public constructor() {
@@ -30,7 +30,7 @@ export default class SetLevelCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.ADMINISTRATOR]
+ userPermissions: [PermissionFlagsBits.Administrator]
});
}
diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts
index 721f28f..a86c58a 100644
--- a/src/commands/leveling/setXp.ts
+++ b/src/commands/leveling/setXp.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, Level, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class SetXpCommand extends BushCommand {
public constructor() {
@@ -31,7 +31,7 @@ export default class SetXpCommand extends BushCommand {
slash: true,
channel: 'guild',
clientPermissions: (m) => util.clientSendAndPermCheck(m),
- userPermissions: [Permissions.FLAGS.ADMINISTRATOR]
+ userPermissions: [PermissionFlagsBits.Administrator]
});
}
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])
});
}
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
});
diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts
index 5a56978..52cad26 100644
--- a/src/commands/utilities/activity.ts
+++ b/src/commands/utilities/activity.ts
@@ -163,10 +163,9 @@ export default class ActivityCommand extends BushCommand {
: activityTypeCaster(message, args.activity);
let response: string;
- const invite = await (<any>client).api
- .channels(channel.id)
- .invites.post({
- data: {
+ const invite: any = await client.rest
+ .post(`/channels/${channel.id}/invites`, {
+ body: {
validate: null,
max_age: 604800,
max_uses: 0,
@@ -175,6 +174,7 @@ export default class ActivityCommand extends BushCommand {
temporary: false
}
})
+
.catch((e: Error | DiscordAPIError) => {
if ((e as DiscordAPIError)?.code === 50013) {
response = `${util.emojis.error} I am missing permissions to make an invite in that channel.`;
diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts
index 2df70b7..ffc121c 100644
--- a/src/commands/utilities/price.ts
+++ b/src/commands/utilities/price.ts
@@ -1,6 +1,6 @@
import { BushCommand, type BushMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, AutocompleteInteraction, Embed, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, AutocompleteInteraction, Embed, PermissionFlagsBits } from 'discord.js';
import Fuse from 'fuse.js';
import got from 'got';
@@ -39,7 +39,7 @@ export default class PriceCommand extends BushCommand {
}
],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: [],
typing: true
});
diff --git a/src/commands/utilities/reminders.ts b/src/commands/utilities/reminders.ts
index 369a1a5..509da67 100644
--- a/src/commands/utilities/reminders.ts
+++ b/src/commands/utilities/reminders.ts
@@ -1,7 +1,7 @@
import { BushCommand, ButtonPaginator, Reminder, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
import { APIEmbed } from 'discord-api-types';
-import { Permissions } from 'discord.js';
+import { PermissionFlagsBits } from 'discord.js';
import { Op } from 'sequelize';
assert(Op);
@@ -15,7 +15,7 @@ export default class RemindersCommand extends BushCommand {
usage: ['reminder'],
examples: ['reminders'],
slash: true,
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS]),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks]),
userPermissions: []
});
}
diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts
index a963746..820fa89 100644
--- a/src/commands/utilities/steal.ts
+++ b/src/commands/utilities/steal.ts
@@ -1,7 +1,7 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
import { type ArgumentOptions, type ArgumentType, type ArgumentTypeCaster, type Flag } from 'discord-akairo';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
import _ from 'lodash';
import { URL } from 'url';
@@ -39,8 +39,8 @@ export default class StealCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS]),
- userPermissions: [Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS]
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.ManageEmojisAndStickers]),
+ userPermissions: [PermissionFlagsBits.ManageEmojisAndStickers]
});
}
diff --git a/src/commands/utilities/viewRaw.ts b/src/commands/utilities/viewRaw.ts
index fc50e31..ee57e2d 100644
--- a/src/commands/utilities/viewRaw.ts
+++ b/src/commands/utilities/viewRaw.ts
@@ -7,7 +7,7 @@ import {
type BushTextChannel,
type OptionalArgType
} from '#lib';
-import { ApplicationCommandOptionType, ChannelType, Embed, Message, Permissions, type Snowflake } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, Embed, Message, PermissionFlagsBits, type Snowflake } from 'discord.js';
export default class ViewRawCommand extends BushCommand {
public constructor() {
@@ -65,7 +65,7 @@ export default class ViewRawCommand extends BushCommand {
],
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m, [Permissions.FLAGS.EMBED_LINKS], true),
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
userPermissions: []
});
}
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')) {
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 712d610..ce72ee2 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -25,8 +25,8 @@ import * as Sentry from '@sentry/node';
import { AkairoClient, ContextMenuCommandHandler, version as akairoVersion } from 'discord-akairo';
import {
ActivityType,
- Intents,
Options,
+ Partials,
Structures,
version as discordJsVersion,
type Awaitable,
@@ -189,21 +189,18 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
public constructor(config: Config) {
super({
ownerID: config.owners,
- intents: Object.values(Intents.FLAGS).reduce((acc, p) => acc | p, 0),
- partials: ['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE', 'REACTION', 'GUILD_SCHEDULED_EVENT'],
+ intents: Object.keys(GatewayIntentBits)
+ .map((i) => (typeof i === 'string' ? GatewayIntentBits[i as keyof typeof GatewayIntentBits] : i))
+ .reduce((acc, p) => acc | p, 0),
+ partials: Object.keys(Partials).map((p) => Partials[p as keyof typeof Partials]),
presence: {
- activities: [
- {
- name: 'Beep Boop',
- type: ActivityType.Watching
- }
- ],
+ activities: [{ name: 'Beep Boop', type: ActivityType.Watching }],
status: 'online'
},
- http: { api: 'https://canary.discord.com/api' },
allowedMentions: AllowedMentions.users(), // No everyone or role mentions by default
makeCache: Options.cacheWithLimits({}),
- failIfNotExists: false
+ failIfNotExists: false,
+ rest: { api: 'https://canary.discord.com/api' }
});
patch(this);
@@ -211,7 +208,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
this.config = config;
this.util = new BushClientUtil(this);
- /* handlers */
+ /* =-=-= handlers =-=-= */
this.listenerHandler = new BushListenerHandler(this, {
directory: path.join(__dirname, '..', '..', '..', 'listeners'),
automateCategories: true
@@ -238,12 +235,12 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
commandUtilLifetime: 300_000, // 5 minutes
argumentDefaults: {
prompt: {
- start: 'Placeholder argument prompt. If you see this please tell my developers.',
- retry: 'Placeholder failed argument prompt. If you see this please tell my developers.',
+ start: 'Placeholder argument prompt. **If you see this please tell my developers**.',
+ retry: 'Placeholder failed argument prompt. **If you see this please tell my developers**.',
modifyStart: (_: Message, str: string): string => `${str}\n\n Type \`cancel\` to cancel the command`,
modifyRetry: (_: Message, str: string): string =>
`${str.replace('{error}', this.util.emojis.error)}\n\n Type \`cancel\` to cancel the command`,
- timeout: 'You took too long the command has been cancelled',
+ timeout: ':hourglass: You took too long the command has been cancelled.',
ended: 'You exceeded the maximum amount of tries the command has been cancelled',
cancel: 'The command has been cancelled',
retries: 3,
@@ -262,7 +259,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
automateCategories: true
});
- /* databases */
+ /* =-=-= databases =-=-= */
const sharedDBOptions: SequelizeOptions = {
username: this.config.db.username,
password: this.config.db.password,
@@ -281,8 +278,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
database: 'bushbot-shared'
});
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- /* global objects */
+ /* =-=-= global objects =-=-= */
global.client = this;
global.util = this.util;
}
@@ -351,7 +347,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
contextMenuCommandHandler: this.contextMenuCommandHandler,
process,
stdin: rl,
- gateway: this.ws
+ gateway: this.ws,
+ rest: this.rest
});
this.commandHandler.resolver.addTypes({
duration,
@@ -515,3 +512,23 @@ export interface BushStats {
*/
commandsUsed: bigint;
}
+
+// exported as const enum from discord-api-types
+enum GatewayIntentBits {
+ Guilds = 1,
+ GuildMembers = 2,
+ GuildBans = 4,
+ GuildEmojisAndStickers = 8,
+ GuildIntegrations = 16,
+ GuildWebhooks = 32,
+ GuildInvites = 64,
+ GuildVoiceStates = 128,
+ GuildPresences = 256,
+ GuildMessages = 512,
+ GuildMessageReactions = 1024,
+ GuildMessageTyping = 2048,
+ DirectMessages = 4096,
+ DirectMessageReactions = 8192,
+ DirectMessageTyping = 16384,
+ GuildScheduledEvents = 65536
+}
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index e3c0803..7a4d5b0 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -20,12 +20,13 @@ import { humanizeDuration } from '@notenoughupdates/humanize-duration';
import { exec } from 'child_process';
import deepLock from 'deep-lock';
import { ClientUtil, Util as AkairoUtil } from 'discord-akairo';
-import type { APIMessage } from 'discord-api-types';
+import { APIMessage } from 'discord-api-types';
import {
Constants as DiscordConstants,
GuildMember,
Message,
- Permissions,
+ PermissionFlagsBits,
+ PermissionsBitField,
ThreadMember,
User,
Util as DiscordUtil,
@@ -404,8 +405,8 @@ export class BushClientUtil extends ClientUtil {
* @returns The combined elements or `ifEmpty`.
*
* @example
- * const permissions = oxford([Permissions.FLAGS.ADMINISTRATOR, Permissions.FLAGS.SEND_MESSAGES, Permissions.FLAGS.MANAGE_MESSAGES], 'and', 'none');
- * console.log(permissions); // ADMINISTRATOR, SEND_MESSAGES and MANAGE_MESSAGES
+ * const permissions = oxford([PermissionFlagsBits.Administrator, PermissionFlagsBits.SendMessages, PermissionFlagsBits.ManageMessages], 'and', 'none');
+ * console.log(permissions); // Administrator, SendMessages and ManageMessages
*/
public oxford(array: string[], conjunction: string, ifEmpty?: string): string | undefined {
const l = array.length;
@@ -767,7 +768,7 @@ export class BushClientUtil extends ClientUtil {
public userGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[]) {
const missing = message.member?.permissions.missing(permissions) ?? [];
- return missing.length ? missing.map((p) => Permissions.FLAGS[p]) : null;
+ return missing.length ? missing.map((p) => PermissionFlagsBits[p]) : null;
}
/**
@@ -779,7 +780,7 @@ export class BushClientUtil extends ClientUtil {
public clientGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[]) {
const missing = message.guild?.me?.permissions.missing(permissions) ?? [];
- return missing.length ? missing.map((p) => Permissions.FLAGS[p]) : null;
+ return missing.length ? missing.map((p) => PermissionFlagsBits[p]) : null;
}
/**
@@ -792,7 +793,7 @@ export class BushClientUtil extends ClientUtil {
*/
public clientSendAndPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[] = [], checkChannel = false) {
const missing = [];
- const sendPerm = message.channel!.isThread() ? Permissions.FLAGS.SEND_MESSAGES : Permissions.FLAGS.SEND_MESSAGES_IN_THREADS;
+ const sendPerm = message.channel!.isThread() ? PermissionFlagsBits.SendMessages : PermissionFlagsBits.SendMessagesInThreads;
if (!message.inGuild()) return null;
if (!message.guild.me!.permissionsIn(message.channel.id).has(sendPerm)) missing.push(sendPerm);
@@ -802,7 +803,7 @@ export class BushClientUtil extends ClientUtil {
? message
.guild!.me!.permissionsIn(message.channel!.id!)
.missing(permissions)
- .map((p) => Permissions.FLAGS[p])
+ .map((p) => PermissionFlagsBits[p])
: this.clientGuildPermCheck(message, permissions) ?? [])
);
@@ -875,7 +876,7 @@ export class BushClientUtil extends ClientUtil {
return `https://discord.com/api/oauth2/authorize?client_id=${Buffer.from(
client.token!.split('.')[0],
'base64'
- ).toString()}&permissions=${Permissions.ALL}&scope=bot%20applications.commands`;
+ ).toString()}&permissions=${PermissionsBitField.All}&scope=bot%20applications.commands`;
}
/**
diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index 0456b80..650b538 100644
--- a/src/lib/extensions/discord-akairo/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -51,7 +51,7 @@ import {
type Collection,
type Invite,
type PermissionResolvable,
- type PermissionString,
+ type PermissionsString,
type Snowflake
} from 'discord.js';
@@ -106,7 +106,7 @@ export interface OverriddenBaseArgumentType extends BaseArgumentType {
export interface BaseBushArgumentType extends OverriddenBaseArgumentType {
duration: number | null;
contentWithDuration: ParsedDuration;
- permission: PermissionString | null;
+ permission: PermissionsString | null;
snowflake: Snowflake | null;
discordEmoji: DiscordEmojiInfo | null;
roleWithDuration: RoleWithDuration | null;
diff --git a/src/lib/extensions/discord-akairo/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts
index 6c06c5b..2c1903f 100644
--- a/src/lib/extensions/discord-akairo/BushCommandHandler.ts
+++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts
@@ -1,6 +1,6 @@
import { type BushClient, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
import { CommandHandler, type Category, type CommandHandlerEvents, type CommandHandlerOptions } from 'discord-akairo';
-import { type Collection, type PermissionString } from 'discord.js';
+import { type Collection, type PermissionsString } from 'discord.js';
export type BushCommandHandlerOptions = CommandHandlerOptions;
@@ -18,7 +18,7 @@ export interface BushCommandHandlerEvents extends CommandHandlerEvents {
load: [command: BushCommand, isReload: boolean];
messageBlocked: [message: BushMessage | BushSlashMessage, reason: string];
messageInvalid: [message: BushMessage];
- missingPermissions: [message: BushMessage, command: BushCommand, type: 'client' | 'user', missing: Array<PermissionString>];
+ missingPermissions: [message: BushMessage, command: BushCommand, type: 'client' | 'user', missing: PermissionsString[]];
remove: [command: BushCommand];
slashBlocked: [message: BushSlashMessage, command: BushCommand, reason: string];
slashError: [error: Error, message: BushSlashMessage, command: BushCommand];
@@ -27,7 +27,7 @@ export interface BushCommandHandlerEvents extends CommandHandlerEvents {
message: BushSlashMessage,
command: BushCommand,
type: 'client' | 'user',
- missing: Array<PermissionString>
+ missing: PermissionsString[]
];
slashStarted: [message: BushSlashMessage, command: BushCommand, args: any];
}
diff --git a/src/lib/extensions/discord.js/BushChannel.ts b/src/lib/extensions/discord.js/BushChannel.ts
index 50ec723..8779342 100644
--- a/src/lib/extensions/discord.js/BushChannel.ts
+++ b/src/lib/extensions/discord.js/BushChannel.ts
@@ -12,7 +12,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { Channel, ChannelType, type Snowflake } from 'discord.js';
+import { Channel, ChannelType, PartialGroupDMChannel, type Snowflake } from 'discord.js';
import type { RawChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -20,8 +20,8 @@ import type { RawChannelData } from 'discord.js/typings/rawDataTypes';
*/
export declare class BushChannel extends Channel {
public constructor(client: BushClient, data?: RawChannelData, immediatePatch?: boolean);
- public readonly createdAt: Date;
- public readonly createdTimestamp: number;
+ public readonly createdAt: Date | null;
+ public readonly createdTimestamp: number | null;
public deleted: boolean;
public id: Snowflake;
public readonly partial: false;
@@ -30,6 +30,7 @@ export declare class BushChannel extends Channel {
public fetch(force?: boolean): Promise<this>;
public isText(): this is BushTextChannel;
public isDM(): this is BushDMChannel;
+ public isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
public isVoice(): this is BushVoiceChannel;
public isCategory(): this is BushCategoryChannel;
public isNews(): this is BushNewsChannel;
diff --git a/src/lib/extensions/discord.js/BushClientEvents.ts b/src/lib/extensions/discord.js/BushClientEvents.ts
index 02f0017..fe60964 100644
--- a/src/lib/extensions/discord.js/BushClientEvents.ts
+++ b/src/lib/extensions/discord.js/BushClientEvents.ts
@@ -28,17 +28,7 @@ import type {
PartialBushUser
} from '#lib';
import type { AkairoClientEvents } from 'discord-akairo';
-import type {
- Collection,
- GuildScheduledEvent,
- Interaction,
- InvalidRequestWarningData,
- Invite,
- RateLimitData,
- Snowflake,
- Sticker,
- Typing
-} from 'discord.js';
+import type { Collection, GuildScheduledEvent, Interaction, Invite, Snowflake, Sticker, Typing } from 'discord.js';
export interface BushClientEvents extends AkairoClientEvents {
applicationCommandCreate: [command: BushApplicationCommand];
@@ -88,8 +78,6 @@ export interface BushClientEvents extends AkairoClientEvents {
messageReactionRemove: [reaction: BushMessageReaction | PartialBushMessageReaction, user: BushUser | PartialBushUser];
messageUpdate: [oldMessage: BushMessage | PartialBushMessage, newMessage: BushMessage | PartialBushMessage];
presenceUpdate: [oldPresence: BushPresence | null, newPresence: BushPresence];
- rateLimit: [rateLimitData: RateLimitData];
- invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
ready: [client: BushClient<true>];
invalidated: [];
roleCreate: [role: BushRole];
diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts
index 363c620..d73ad70 100644
--- a/src/lib/extensions/discord.js/BushDMChannel.ts
+++ b/src/lib/extensions/discord.js/BushDMChannel.ts
@@ -13,7 +13,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { DMChannel, type Partialize } from 'discord.js';
+import { DMChannel, PartialGroupDMChannel, type Partialize } from 'discord.js';
import type { RawDMChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -32,6 +32,7 @@ export class BushDMChannel extends DMChannel {
export interface BushDMChannel extends DMChannel {
isText(): this is BushTextChannel;
isDM(): this is BushDMChannel;
+ isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index b546dab..83e024d 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -18,7 +18,7 @@ import {
type GuildLogType,
type GuildModel
} from '#lib';
-import { Collection, Guild, Permissions, Snowflake, type MessageOptions, type MessagePayload } from 'discord.js';
+import { Collection, Guild, PermissionFlagsBits, Snowflake, type MessageOptions, type MessagePayload } from 'discord.js';
import type { RawGuildData } from 'discord.js/typings/rawDataTypes';
import _ from 'lodash';
import { Moderation } from '../../common/util/Moderation.js';
@@ -138,7 +138,7 @@ export class BushGuild extends Guild {
if (
!logChannel
.permissionsFor(this.me!.id)
- ?.has([Permissions.FLAGS.VIEW_CHANNEL, Permissions.FLAGS.SEND_MESSAGES, Permissions.FLAGS.EMBED_LINKS])
+ ?.has([PermissionFlagsBits.ViewChannel, PermissionFlagsBits.SendMessages, PermissionFlagsBits.EmbedLinks])
)
return;
@@ -162,7 +162,7 @@ export class BushGuild extends Guild {
*/
public async bushBan(options: GuildBushBanOptions): Promise<BanResponse> {
// checks
- if (!this.me!.permissions.has(Permissions.FLAGS.BAN_MEMBERS)) return banResponse.MISSING_PERMISSIONS;
+ if (!this.me!.permissions.has(PermissionFlagsBits.BanMembers)) return banResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
let dmSuccessEvent: boolean | undefined = undefined;
@@ -241,7 +241,7 @@ export class BushGuild extends Guild {
*/
public async bushUnban(options: GuildBushUnbanOptions): Promise<UnbanResponse> {
// checks
- if (!this.me!.permissions.has(Permissions.FLAGS.BAN_MEMBERS)) return unbanResponse.MISSING_PERMISSIONS;
+ if (!this.me!.permissions.has(PermissionFlagsBits.BanMembers)) return unbanResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
let dmSuccessEvent: boolean | undefined = undefined;
@@ -335,11 +335,11 @@ export class BushGuild extends Guild {
success.set(channel.id, false);
continue;
}
- if (!channel.permissionsFor(this.me!.id)?.has([Permissions.FLAGS.MANAGE_CHANNELS])) {
+ if (!channel.permissionsFor(this.me!.id)?.has([PermissionFlagsBits.ManageChannels])) {
errors.set(channel.id, new Error('client no permission'));
success.set(channel.id, false);
continue;
- } else if (!channel.permissionsFor(moderator)?.has([Permissions.FLAGS.MANAGE_CHANNELS])) {
+ } else if (!channel.permissionsFor(moderator)?.has([PermissionFlagsBits.ManageChannels])) {
errors.set(channel.id, new Error('moderator no permission'));
success.set(channel.id, false);
continue;
@@ -351,10 +351,10 @@ export class BushGuild extends Guild {
const permissionOverwrites = channel.isThread() ? channel.parent!.permissionOverwrites : channel.permissionOverwrites;
const perms = {
- [channel.isThread() ? 'SEND_MESSAGES_IN_THREADS' : 'FLAGS.SEND_MESSAGES']: options.unlock ? null : false
+ [channel.isThread() ? 'SendMessagesInThreads' : 'SendMessages']: options.unlock ? null : false
};
const permsForMe = {
- [channel.isThread() ? 'SEND_MESSAGES_IN_THREADS' : 'FLAGS.SEND_MESSAGES']: options.unlock ? null : true
+ [channel.isThread() ? 'SendMessagesInThreads' : 'SendMessages']: options.unlock ? null : true
}; // so I can send messages in the channel
const changePermSuccess = await permissionOverwrites.edit(this.id, perms, { reason }).catch((e) => e);
diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts
index 053507e..dd523e5 100644
--- a/src/lib/extensions/discord.js/BushGuildChannel.ts
+++ b/src/lib/extensions/discord.js/BushGuildChannel.ts
@@ -14,7 +14,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { GuildChannel } from 'discord.js';
+import { GuildChannel, PartialGroupDMChannel } from 'discord.js';
import type { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -37,6 +37,7 @@ export class BushGuildChannel extends GuildChannel {
export interface BushGuildChannel extends GuildChannel {
isText(): this is BushTextChannel;
+ isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
isDM(): this is BushDMChannel;
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
diff --git a/src/lib/extensions/discord.js/BushGuildChannelManager.ts b/src/lib/extensions/discord.js/BushGuildChannelManager.ts
index dd3885b..029f7d3 100644
--- a/src/lib/extensions/discord.js/BushGuildChannelManager.ts
+++ b/src/lib/extensions/discord.js/BushGuildChannelManager.ts
@@ -55,7 +55,7 @@ export declare class BushGuildChannelManager
* permissionOverwrites: [
* {
* id: message.author.id,
- * deny: [Permissions.FLAGS.VIEW_CHANNEL],
+ * deny: [PermissionFlagsBits.ViewChannel],
* },
* ],
* })
diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index 10d8a4c..ab6cd65 100644
--- a/src/lib/extensions/discord.js/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -11,7 +11,7 @@ import {
type BushThreadChannelResolvable,
type BushUser
} from '#lib';
-import { GuildMember, Permissions, type Partialize, type Role } from 'discord.js';
+import { GuildMember, PermissionFlagsBits, type Partialize, type Role } from 'discord.js';
import type { RawGuildMemberData } from 'discord.js/typings/rawDataTypes';
/* eslint-enable @typescript-eslint/no-unused-vars */
@@ -90,7 +90,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushAddRole(options: AddRoleOptions): Promise<AddRoleResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) return addRoleResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ManageRoles)) return addRoleResponse.MISSING_PERMISSIONS;
const ifShouldAddRole = this.#checkIfShouldAddRole(options.role, options.moderator);
if (ifShouldAddRole !== true) return ifShouldAddRole;
@@ -161,7 +161,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushRemoveRole(options: RemoveRoleOptions): Promise<RemoveRoleResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) return removeRoleResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ManageRoles)) return removeRoleResponse.MISSING_PERMISSIONS;
const ifShouldAddRole = this.#checkIfShouldAddRole(options.role, options.moderator);
if (ifShouldAddRole !== true) return ifShouldAddRole;
@@ -252,7 +252,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushMute(options: BushTimedPunishmentOptions): Promise<MuteResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) return muteResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ManageRoles)) return muteResponse.MISSING_PERMISSIONS;
const muteRoleID = await this.guild.getSetting('muteRole');
if (!muteRoleID) return muteResponse.NO_MUTE_ROLE;
const muteRole = this.guild.roles.cache.get(muteRoleID);
@@ -338,7 +338,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushUnmute(options: BushPunishmentOptions): Promise<UnmuteResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) return unmuteResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ManageRoles)) return unmuteResponse.MISSING_PERMISSIONS;
const muteRoleID = await this.guild.getSetting('muteRole');
if (!muteRoleID) return unmuteResponse.NO_MUTE_ROLE;
const muteRole = this.guild.roles.cache.get(muteRoleID);
@@ -421,7 +421,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushKick(options: BushPunishmentOptions): Promise<KickResponse> {
// checks
- if (!this.guild.me?.permissions.has(Permissions.FLAGS.KICK_MEMBERS) || !this.kickable)
+ if (!this.guild.me?.permissions.has(PermissionFlagsBits.KickMembers) || !this.kickable)
return kickResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
@@ -474,7 +474,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushBan(options: BushBanOptions): Promise<Exclude<BanResponse, typeof banResponse['ALREADY_BANNED']>> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.BAN_MEMBERS) || !this.bannable) return banResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.BanMembers) || !this.bannable) return banResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
let dmSuccessEvent: boolean | undefined = undefined;
@@ -554,7 +554,8 @@ export class BushGuildMember extends GuildMember {
if (!channel || (!channel.isTextBased() && !channel.isThread())) return blockResponse.INVALID_CHANNEL;
// checks
- if (!channel.permissionsFor(this.guild.me!)!.has(Permissions.FLAGS.MANAGE_CHANNELS)) return blockResponse.MISSING_PERMISSIONS;
+ if (!channel.permissionsFor(this.guild.me!)!.has(PermissionFlagsBits.ManageChannels))
+ return blockResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
let dmSuccessEvent: boolean | undefined = undefined;
@@ -564,7 +565,7 @@ export class BushGuildMember extends GuildMember {
const ret = await (async () => {
// change channel permissions
const channelToUse = channel.isThread() ? channel.parent! : channel;
- const perm = channel.isThread() ? { SEND_MESSAGES_IN_THREADS: false } : { SEND_MESSAGES: false };
+ const perm = channel.isThread() ? { SendMessagesInThreads: false } : { SendMessages: false };
const blockSuccess = await channelToUse.permissionOverwrites
.edit(this, perm, { reason: `[Block] ${moderator.tag} | ${options.reason ?? 'No reason provided.'}` })
.catch(() => false);
@@ -643,7 +644,7 @@ export class BushGuildMember extends GuildMember {
const channel = _channel as BushGuildTextBasedChannel;
// checks
- if (!channel.permissionsFor(this.guild.me!)!.has(Permissions.FLAGS.MANAGE_CHANNELS))
+ if (!channel.permissionsFor(this.guild.me!)!.has(PermissionFlagsBits.ManageChannels))
return unblockResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
@@ -654,7 +655,7 @@ export class BushGuildMember extends GuildMember {
const ret = await (async () => {
// change channel permissions
const channelToUse = channel.isThread() ? channel.parent! : channel;
- const perm = channel.isThread() ? { SEND_MESSAGES_IN_THREADS: null } : { SEND_MESSAGES: null };
+ const perm = channel.isThread() ? { SendMessagesInThreads: null } : { SendMessages: null };
const blockSuccess = await channelToUse.permissionOverwrites
.edit(this, perm, { reason: `[Unblock] ${moderator.tag} | ${options.reason ?? 'No reason provided.'}` })
.catch(() => false);
@@ -720,7 +721,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushTimeout(options: BushTimeoutOptions): Promise<TimeoutResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS)) return timeoutResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ModerateMembers)) return timeoutResponse.MISSING_PERMISSIONS;
const twentyEightDays = client.consts.timeUnits.days.value * 28;
if (options.duration > twentyEightDays) return timeoutResponse.INVALID_DURATION;
@@ -784,7 +785,7 @@ export class BushGuildMember extends GuildMember {
*/
public async bushRemoveTimeout(options: BushPunishmentOptions): Promise<RemoveTimeoutResponse> {
// checks
- if (!this.guild.me!.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS)) return removeTimeoutResponse.MISSING_PERMISSIONS;
+ if (!this.guild.me!.permissions.has(PermissionFlagsBits.ModerateMembers)) return removeTimeoutResponse.MISSING_PERMISSIONS;
let caseID: string | undefined = undefined;
let dmSuccessEvent: boolean | undefined = undefined;
diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.ts
index bb130fc..3f8dcd2 100644
--- a/src/lib/extensions/discord.js/BushGuildMemberManager.ts
+++ b/src/lib/extensions/discord.js/BushGuildMemberManager.ts
@@ -31,7 +31,7 @@ export declare class BushGuildMemberManager
public guild: BushGuild;
/**
- * Adds a user to the guild using OAuth2. Requires the `CREATE_INSTANT_INVITE` permission.
+ * Adds a user to the guild using OAuth2. Requires the `PermissionFlagsBits.CreateInstantInvite` permission.
* @param user The user to add to the guild
* @param options Options for adding the user to the guild
*/
diff --git a/src/lib/extensions/discord.js/BushStoreChannel.ts b/src/lib/extensions/discord.js/BushStoreChannel.ts
index dbc53e8..eadc8af 100644
--- a/src/lib/extensions/discord.js/BushStoreChannel.ts
+++ b/src/lib/extensions/discord.js/BushStoreChannel.ts
@@ -14,7 +14,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { StoreChannel, type Collection, type Snowflake } from 'discord.js';
+import { PartialGroupDMChannel, StoreChannel, type Collection, type Snowflake } from 'discord.js';
import type { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -34,6 +34,7 @@ export class BushStoreChannel extends StoreChannel {
export interface BushStoreChannel extends StoreChannel {
isText(): this is BushTextChannel;
isDM(): this is BushDMChannel;
+ isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts
index 15be7bd..ad54b76 100644
--- a/src/lib/extensions/discord.js/BushTextChannel.ts
+++ b/src/lib/extensions/discord.js/BushTextChannel.ts
@@ -14,7 +14,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { TextChannel, type AllowedThreadTypeForTextChannel } from 'discord.js';
+import { PartialGroupDMChannel, TextChannel, type AllowedThreadTypeForTextChannel } from 'discord.js';
import type { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -33,6 +33,7 @@ export class BushTextChannel extends TextChannel {
export interface BushTextChannel extends TextChannel {
isText(): this is BushTextChannel;
isDM(): this is BushDMChannel;
+ isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
diff --git a/src/lib/extensions/discord.js/BushThreadChannel.ts b/src/lib/extensions/discord.js/BushThreadChannel.ts
index a342dd7..691fabf 100644
--- a/src/lib/extensions/discord.js/BushThreadChannel.ts
+++ b/src/lib/extensions/discord.js/BushThreadChannel.ts
@@ -16,7 +16,7 @@ import type {
BushVoiceBasedChannel,
BushVoiceChannel
} from '#lib';
-import { ThreadChannel, type Collection, type Snowflake } from 'discord.js';
+import { PartialGroupDMChannel, ThreadChannel, type Collection, type Snowflake } from 'discord.js';
import type { RawThreadChannelData } from 'discord.js/typings/rawDataTypes';
/**
@@ -38,6 +38,7 @@ export class BushThreadChannel extends ThreadChannel {
export interface BushThreadChannel extends ThreadChannel {
isText(): this is BushTextChannel;
isDM(): this is BushDMChannel;
+ isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.ts
index d597673..48e968f 100644
--- a/src/lib/extensions/discord.js/BushThreadMemberManager.ts
+++ b/src/lib/extensions/discord.js/BushThreadMemberManager.ts
@@ -32,7 +32,7 @@ export declare class BushThreadMemberManager
public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
/**
- * Fetches member(s) for the thread from Discord, requires access to the `GUILD_MEMBERS` gateway intent.
+ * Fetches member(s) for the thread from Discord, requires access to the `GatewayIntentBits.GuildMembers` gateway intent.
* @param options Additional options for this fetch, when a `boolean` is provided
* all members are fetched with `options.cache` set to the boolean value
*/
diff --git a/src/lib/extensions/discord.js/BushUserManager.ts b/src/lib/extensions/discord.js/BushUserManager.ts
index ae28f1d..c26dbde 100644
--- a/src/lib/extensions/discord.js/BushUserManager.ts
+++ b/src/lib/extensions/discord.js/BushUserManager.ts
@@ -4,7 +4,7 @@ import {
Message,
MessageOptions,
MessagePayload,
- UserFlags,
+ UserFlagsBitField,
UserManager,
type BaseFetchOptions,
type Snowflake
@@ -49,7 +49,7 @@ export declare class BushUserManager extends CachedManager<Snowflake, BushUser,
* @param user The UserResolvable to identify
* @param options Additional options for this fetch
*/
- public fetchFlags(user: BushUserResolvable, options?: BaseFetchOptions): Promise<UserFlags>;
+ public fetchFlags(user: BushUserResolvable, options?: BaseFetchOptions): Promise<UserFlagsBitField>;
/**
* Sends a message to a user.
diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts
index e7b69ae..df8212b 100644
--- a/src/lib/utils/BushConstants.ts
+++ b/src/lib/utils/BushConstants.ts
@@ -171,49 +171,47 @@ export class BushConstants {
},
permissions: {
- CREATE_INSTANT_INVITE: { name: 'Create Invite', important: false },
- KICK_MEMBERS: { name: 'Kick Members', important: true },
- BAN_MEMBERS: { name: 'Ban Members', important: true },
- ADMINISTRATOR: { name: 'Administrator', important: true },
- MANAGE_CHANNELS: { name: 'Manage Channels', important: true },
- MANAGE_GUILD: { name: 'Manage Server', important: true },
- ADD_REACTIONS: { name: 'Add Reactions', important: false },
- VIEW_AUDIT_LOG: { name: 'View Audit Log', important: true },
- PRIORITY_SPEAKER: { name: 'Priority Speaker', important: true },
- STREAM: { name: 'Video', important: false },
- VIEW_CHANNEL: { name: 'View Channel', important: false },
- SEND_MESSAGES: { name: 'Send Messages', important: false },
- SEND_TTS_MESSAGES: { name: 'Send Text-to-Speech Messages', important: true },
- MANAGE_MESSAGES: { name: 'Manage Messages', important: true },
- EMBED_LINKS: { name: 'Embed Links', important: false },
- ATTACH_FILES: { name: 'Attach Files', important: false },
- READ_MESSAGE_HISTORY: { name: 'Read Message History', important: false },
- MENTION_EVERYONE: { name: 'Mention @\u200Beveryone, @\u200Bhere, and All Roles', important: true }, // name has a zero-width space to prevent accidents
- USE_EXTERNAL_EMOJIS: { name: 'Use External Emoji', important: false },
- VIEW_GUILD_INSIGHTS: { name: 'View Server Insights', important: true },
- CONNECT: { name: 'Connect', important: false },
- SPEAK: { name: 'Speak', important: false },
- MUTE_MEMBERS: { name: 'Mute Members', important: true },
- DEAFEN_MEMBERS: { name: 'Deafen Members', important: true },
- MOVE_MEMBERS: { name: 'Move Members', important: true },
- USE_VAD: { name: 'Use Voice Activity', important: false },
- CHANGE_NICKNAME: { name: 'Change Nickname', important: false },
- MANAGE_NICKNAMES: { name: 'Change Nicknames', important: true },
- MANAGE_ROLES: { name: 'Manage Roles', important: true },
- MANAGE_WEBHOOKS: { name: 'Manage Webhooks', important: true },
- MANAGE_EMOJIS_AND_STICKERS: { name: 'Manage Emojis and Stickers', important: true },
- USE_APPLICATION_COMMANDS: { name: 'Use Slash Commands', important: false },
- REQUEST_TO_SPEAK: { name: 'Request to Speak', important: false },
- MANAGE_THREADS: { name: 'Manage Threads', important: true },
- USE_PUBLIC_THREADS: { name: 'Use public Threads', important: false },
- CREATE_PUBLIC_THREADS: { name: 'Create Public Threads', important: false },
- USE_PRIVATE_THREADS: { name: 'Use Private Threads', important: false },
- CREATE_PRIVATE_THREADS: { name: 'Create Private Threads', important: false },
- USE_EXTERNAL_STICKERS: { name: 'Use External Stickers', important: false },
- SEND_MESSAGES_IN_THREADS: { name: 'Send Messages In Threads', important: false },
- START_EMBEDDED_ACTIVITIES: { name: 'Start Activities', important: false },
- MODERATE_MEMBERS: { name: 'Timeout Members', important: true },
- MANAGE_EVENTS: { name: 'Manage Events', important: true }
+ CreateInstantInvite: { name: 'Create Invite', important: false },
+ KickMembers: { name: 'Kick Members', important: true },
+ BanMembers: { name: 'Ban Members', important: true },
+ Administrator: { name: 'Administrator', important: true },
+ ManageChannels: { name: 'Manage Channels', important: true },
+ ManageGuild: { name: 'Manage Server', important: true },
+ AddReactions: { name: 'Add Reactions', important: false },
+ ViewAuditLog: { name: 'View Audit Log', important: true },
+ PrioritySpeaker: { name: 'Priority Speaker', important: true },
+ Stream: { name: 'Video', important: false },
+ ViewChannel: { name: 'View Channel', important: false },
+ SendMessages: { name: 'Send Messages', important: false },
+ SendTTSMessages: { name: 'Send Text-to-Speech Messages', important: true },
+ ManageMessages: { name: 'Manage Messages', important: true },
+ EmbedLinks: { name: 'Embed Links', important: false },
+ AttachFiles: { name: 'Attach Files', important: false },
+ ReadMessageHistory: { name: 'Read Message History', important: false },
+ MentionEveryone: { name: 'Mention @\u200Beveryone, @\u200Bhere, and All Roles', important: true }, // name has a zero-width space to prevent accidents
+ UseExternalEmojis: { name: 'Use External Emoji', important: false },
+ ViewGuildInsights: { name: 'View Server Insights', important: true },
+ Connect: { name: 'Connect', important: false },
+ Speak: { name: 'Speak', important: false },
+ MuteMembers: { name: 'Mute Members', important: true },
+ DeafenMembers: { name: 'Deafen Members', important: true },
+ MoveMembers: { name: 'Move Members', important: true },
+ UseVAD: { name: 'Use Voice Activity', important: false },
+ ChangeNickname: { name: 'Change Nickname', important: false },
+ ManageNicknames: { name: 'Change Nicknames', important: true },
+ ManageRoles: { name: 'Manage Roles', important: true },
+ ManageWebhooks: { name: 'Manage Webhooks', important: true },
+ ManageEmojisAndStickers: { name: 'Manage Emojis and Stickers', important: true },
+ UseApplicationCommands: { name: 'Use Slash Commands', important: false },
+ RequestToSpeak: { name: 'Request to Speak', important: false },
+ ManageEvents: { name: 'Manage Events', important: true },
+ ManageThreads: { name: 'Manage Threads', important: true },
+ CreatePublicThreads: { name: 'Create Public Threads', important: false },
+ CreatePrivateThreads: { name: 'Create Private Threads', important: false },
+ UseExternalStickers: { name: 'Use External Stickers', important: false },
+ SendMessagesInThreads: { name: 'Send Messages In Threads', important: false },
+ StartEmbeddedActivities: { name: 'Start Activities', important: false },
+ ModerateMembers: { name: 'Timeout Members', important: true }
},
// prettier-ignore
@@ -294,20 +292,21 @@ export class BushConstants {
},
userFlags: {
- STAFF: '<:discordEmployee:848742947826434079>',
- PARTNER: '<:partneredServerOwner:848743051593777152>',
- HYPESQUAD: '<:hypeSquadEvents:848743108283072553>',
- BUG_HUNTER_LEVEL_1: '<:bugHunter:848743239850393640>',
- HYPESQUAD_ONLINE_HOUSE_1: '<:hypeSquadBravery:848742910563844127>',
- HYPESQUAD_ONLINE_HOUSE_2: '<:hypeSquadBrilliance:848742840649646101>',
- HYPESQUAD_ONLINE_HOUSE_3: '<:hypeSquadBalance:848742877537370133>',
- PREMIUM_EARLY_SUPPORTER: '<:earlySupporter:848741030102171648>',
- TEAM_PSEUDO_USER: 'TEAM_PSEUDO_USER',
- BUG_HUNTER_LEVEL_2: '<:bugHunterGold:848743283080822794>',
- VERIFIED_BOT: 'VERIFIED_BOT',
- VERIFIED_DEVELOPER: '<:earlyVerifiedBotDeveloper:848741079875846174>',
- CERTIFIED_MODERATOR: '<:discordCertifiedModerator:877224285901582366>',
- BOT_HTTP_INTERACTIONS: 'BOT_HTTP_INTERACTIONS'
+ None: '',
+ Staff: '<:discordEmployee:848742947826434079>',
+ Partner: '<:partneredServerOwner:848743051593777152>',
+ Hypesquad: '<:hypeSquadEvents:848743108283072553>',
+ BugHunterLevel1: '<:bugHunter:848743239850393640>',
+ HypeSquadOnlineHouse1: '<:hypeSquadBravery:848742910563844127>',
+ HypeSquadOnlineHouse2: '<:hypeSquadBrilliance:848742840649646101>',
+ HypeSquadOnlineHouse3: '<:hypeSquadBalance:848742877537370133>',
+ PremiumEarlySupporter: '<:earlySupporter:848741030102171648>',
+ TeamPseudoUser: 'TEAM_PSEUDO_USER',
+ BugHunterLevel2: '<:bugHunterGold:848743283080822794>',
+ VerifiedBot: 'VERIFIED_BOT',
+ VerifiedDeveloper: '<:earlyVerifiedBotDeveloper:848741079875846174>',
+ CertifiedModerator: '<:discordCertifiedModerator:877224285901582366>',
+ BotHTTPInteractions: 'BOT_HTTP_INTERACTIONS'
},
status: {
diff --git a/src/listeners/client/rateLimit.ts b/src/listeners/client/rateLimit.ts
deleted file mode 100644
index 26eaf18..0000000
--- a/src/listeners/client/rateLimit.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { BushListener, type BushClientEvents } from '#lib';
-
-export default class RateLimitListener extends BushListener {
- public constructor() {
- super('rateLimit', {
- emitter: 'client',
- event: 'rateLimit',
- category: 'client'
- });
- }
-
- public override async exec(...[message]: BushClientEvents['rateLimit']): Promise<void> {
- void client.console.superVerboseRaw('rateLimit', message);
- }
-}
diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts
index 4d9aa1b..e84d58c 100644
--- a/src/listeners/commands/commandMissingPermissions.ts
+++ b/src/listeners/commands/commandMissingPermissions.ts
@@ -1,4 +1,5 @@
import { BushListener, type BushCommandHandlerEvents } from '#lib';
+import { PermissionsString } from 'discord.js';
export default class CommandMissingPermissionsListener extends BushListener {
public constructor() {
@@ -18,7 +19,7 @@ export default class CommandMissingPermissionsListener extends BushListener {
| BushCommandHandlerEvents['missingPermissions']
| BushCommandHandlerEvents['slashMissingPermissions']
) {
- const niceMissing = (missing.includes('ADMINISTRATOR') ? (['ADMINISTRATOR'] as const) : missing).map(
+ const niceMissing = (missing.includes('Administrator') ? (['Administrator'] as PermissionsString[]) : missing).map(
(perm) => client.consts.mappings.permissions[perm]?.name ?? missing
);
diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts
index 4917402..419191a 100644
--- a/src/listeners/commands/commandStarted.ts
+++ b/src/listeners/commands/commandStarted.ts
@@ -21,8 +21,10 @@ export default class CommandStartedListener extends BushListener {
'message.id': message.id,
'message.type': message.util.isSlash ? 'slash' : 'normal',
'message.parsed.content': message.util.parsed!.content,
- 'channel.id': message.channel.isDM() ? message.channel!.recipient.id : (<GuildTextBasedChannel>message.channel)?.id,
- 'channel.name': message.channel.isDM() ? message.channel.recipient.tag : (<GuildTextBasedChannel>message.channel)?.name,
+ 'channel.id': message.channel.isDMBased() ? message.channel!.recipient.id : message.channel?.id,
+ 'channel.name': message.channel.isDMBased()
+ ? message.channel.recipient.tag
+ : (<GuildTextBasedChannel>message.channel)?.name,
'guild.id': message.guild?.id,
'guild.name': message.guild?.name,
'environment': client.config.environment
diff --git a/src/listeners/member-custom/bushBan.ts b/src/listeners/member-custom/bushBan.ts
index 77ebaaf..b58f661 100644
--- a/src/listeners/member-custom/bushBan.ts
+++ b/src/listeners/member-custom/bushBan.ts
@@ -19,7 +19,7 @@ export default class BushBanListener extends BushListener {
.setColor(util.colors.RED)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${duration ? 'Temp Ban' : 'Perm Ban'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushBlock.ts b/src/listeners/member-custom/bushBlock.ts
index d4f7c98..2d023c4 100644
--- a/src/listeners/member-custom/bushBlock.ts
+++ b/src/listeners/member-custom/bushBlock.ts
@@ -21,7 +21,7 @@ export default class BushBlockListener extends BushListener {
.setColor(util.colors.PURPLE)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${duration ? 'Temp Block' : 'Perm Block'}` })
.addField({ name: '**Channel**', value: `<#${channel.id}>` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
diff --git a/src/listeners/member-custom/bushKick.ts b/src/listeners/member-custom/bushKick.ts
index 822201d..50af0af 100644
--- a/src/listeners/member-custom/bushKick.ts
+++ b/src/listeners/member-custom/bushKick.ts
@@ -19,7 +19,7 @@ export default class BushKickListener extends BushListener {
.setColor(util.colors.RED)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Kick'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushMute.ts b/src/listeners/member-custom/bushMute.ts
index c6361b0..bfd1fc0 100644
--- a/src/listeners/member-custom/bushMute.ts
+++ b/src/listeners/member-custom/bushMute.ts
@@ -19,7 +19,7 @@ export default class BushMuteListener extends BushListener {
.setColor(util.colors.ORANGE)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${duration ? 'Temp Mute' : 'Perm Mute'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushPunishRole.ts b/src/listeners/member-custom/bushPunishRole.ts
index 7e87b65..112c4df 100644
--- a/src/listeners/member-custom/bushPunishRole.ts
+++ b/src/listeners/member-custom/bushPunishRole.ts
@@ -19,7 +19,7 @@ export default class BushPunishRoleListener extends BushListener {
.setColor(util.colors.YELLOW)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${duration ? 'Temp Punishment Role' : 'Perm Punishment Role'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushPunishRoleRemove.ts b/src/listeners/member-custom/bushPunishRoleRemove.ts
index e9d3d95..dadc841 100644
--- a/src/listeners/member-custom/bushPunishRoleRemove.ts
+++ b/src/listeners/member-custom/bushPunishRoleRemove.ts
@@ -19,7 +19,7 @@ export default class BushPunishRoleRemoveListener extends BushListener {
.setColor(util.colors.GREEN)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Remove Punishment Role'}` })
.addField({ name: '**Role**', value: `${role}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
diff --git a/src/listeners/member-custom/bushPurge.ts b/src/listeners/member-custom/bushPurge.ts
index 5c685cd..72286a0 100644
--- a/src/listeners/member-custom/bushPurge.ts
+++ b/src/listeners/member-custom/bushPurge.ts
@@ -27,7 +27,7 @@ export default class BushPurgeListener extends BushListener {
.setColor(util.colors.DARK_PURPLE)
.setTimestamp()
.setFooter({ text: `${messages.size.toLocaleString()} Messages` })
- .setAuthor({ name: moderator.tag, iconURL: moderator.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: moderator.tag, iconURL: moderator.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Purge'}` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
.addField({ name: '**Channel**', value: `<#${channel.id}> (${channel.name})` })
diff --git a/src/listeners/member-custom/bushRemoveTimeout.ts b/src/listeners/member-custom/bushRemoveTimeout.ts
index 947bec9..e3e2e09 100644
--- a/src/listeners/member-custom/bushRemoveTimeout.ts
+++ b/src/listeners/member-custom/bushRemoveTimeout.ts
@@ -19,7 +19,7 @@ export default class BushRemoveTimeoutListener extends BushListener {
.setColor(util.colors.GREEN)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Remove Timeout'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushTimeout.ts b/src/listeners/member-custom/bushTimeout.ts
index 8acc506..d7f8000 100644
--- a/src/listeners/member-custom/bushTimeout.ts
+++ b/src/listeners/member-custom/bushTimeout.ts
@@ -21,7 +21,7 @@ export default class BushTimeoutListener extends BushListener {
.setColor(util.colors.ORANGE)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Timeout'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushUnban.ts b/src/listeners/member-custom/bushUnban.ts
index d58ae21..bee8032 100644
--- a/src/listeners/member-custom/bushUnban.ts
+++ b/src/listeners/member-custom/bushUnban.ts
@@ -19,7 +19,7 @@ export default class BushUnbanListener extends BushListener {
.setColor(util.colors.GREEN)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Unban'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushUnblock.ts b/src/listeners/member-custom/bushUnblock.ts
index ead2a7d..dd076c6 100644
--- a/src/listeners/member-custom/bushUnblock.ts
+++ b/src/listeners/member-custom/bushUnblock.ts
@@ -19,7 +19,7 @@ export default class BushUnblockListener extends BushListener {
.setColor(util.colors.GREEN)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Unblock'}` })
.addField({ name: '**Channel**', value: `<#${channel.id}>` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
diff --git a/src/listeners/member-custom/bushUnmute.ts b/src/listeners/member-custom/bushUnmute.ts
index b88f450..573cbdc 100644
--- a/src/listeners/member-custom/bushUnmute.ts
+++ b/src/listeners/member-custom/bushUnmute.ts
@@ -19,7 +19,7 @@ export default class BushUnmuteListener extends BushListener {
.setColor(util.colors.GREEN)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Unmute'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/member-custom/bushUpdateModlog.ts b/src/listeners/member-custom/bushUpdateModlog.ts
index 199e32e..d9e43aa 100644
--- a/src/listeners/member-custom/bushUpdateModlog.ts
+++ b/src/listeners/member-custom/bushUpdateModlog.ts
@@ -19,7 +19,7 @@ export default class BushUpdateModlogListener extends BushListener {
.setTimestamp()
.setAuthor({
name: moderator.user.tag,
- iconURL: moderator.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Update Modlog'}` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` })
diff --git a/src/listeners/member-custom/bushUpdateSettings.ts b/src/listeners/member-custom/bushUpdateSettings.ts
index 61fdfaa..dbf3c9c 100644
--- a/src/listeners/member-custom/bushUpdateSettings.ts
+++ b/src/listeners/member-custom/bushUpdateSettings.ts
@@ -19,7 +19,7 @@ export default class BushUpdateSettingsListener extends BushListener {
if (moderator)
logEmbed.setAuthor({
name: moderator.user.tag,
- iconURL: moderator.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
});
logEmbed.addField({ name: '**Action**', value: `${'Update Settings'}` });
if (moderator) logEmbed.addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` });
diff --git a/src/listeners/member-custom/bushWarn.ts b/src/listeners/member-custom/bushWarn.ts
index 11eeb49..cbcf8db 100644
--- a/src/listeners/member-custom/bushWarn.ts
+++ b/src/listeners/member-custom/bushWarn.ts
@@ -19,7 +19,7 @@ export default class BushWarnListener extends BushListener {
.setColor(util.colors.YELLOW)
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
- .setAuthor({ name: user.tag, iconURL: user.avatarURL({ format: 'png', size: 4096 }) ?? undefined })
+ .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
.addField({ name: '**Action**', value: `${'Warn'}` })
.addField({ name: '**User**', value: `${user} (${user.tag})` })
.addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` })
diff --git a/src/listeners/message/autoThread.ts b/src/listeners/message/autoThread.ts
index 45cd337..aa17035 100644
--- a/src/listeners/message/autoThread.ts
+++ b/src/listeners/message/autoThread.ts
@@ -1,5 +1,5 @@
import { BushListener, type BushClientEvents, type BushTextChannel } from '#lib';
-import { Embed, GuildTextBasedChannel, MessageType, Permissions } from 'discord.js';
+import { Embed, GuildTextBasedChannel, MessageType, PermissionFlagsBits } from 'discord.js';
export default class autoThreadListener extends BushListener {
public constructor() {
@@ -35,7 +35,7 @@ export default class autoThreadListener extends BushListener {
// todo: make these configurable etc...
if (message.guild.id !== '516977525906341928') return; // mb
if (message.channel.id !== '714332750156660756') return; // neu-support-1
- if (!(message.channel as BushTextChannel).permissionsFor(message.guild.me!).has(Permissions.FLAGS.CREATE_PUBLIC_THREADS))
+ if (!(message.channel as BushTextChannel).permissionsFor(message.guild.me!).has(PermissionFlagsBits.CreatePublicThreads))
return;
const thread = await message
.startThread({
diff --git a/src/listeners/rest/rateLimit.ts b/src/listeners/rest/rateLimit.ts
new file mode 100644
index 0000000..600ef07
--- /dev/null
+++ b/src/listeners/rest/rateLimit.ts
@@ -0,0 +1,16 @@
+import { BushListener } from '#lib';
+import { RestEvents } from '@discordjs/rest';
+
+export default class RateLimitedListener extends BushListener {
+ public constructor() {
+ super('rateLimited', {
+ emitter: 'rest',
+ event: 'rateLimited',
+ category: 'rest'
+ });
+ }
+
+ public override async exec(...[message]: RestEvents['rateLimited']): Promise<void> {
+ void client.console.superVerboseRaw('rateLimited', message);
+ }
+}
diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts
index b908231..6048235 100644
--- a/src/listeners/track-manual-punishments/modlogSyncBan.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncBanListener extends BushListener {
public constructor() {
@@ -14,7 +14,7 @@ export default class ModlogSyncBanListener extends BushListener {
public override async exec(...[ban]: BushClientEvents['guildBanAdd']) {
if (!(await ban.guild.hasFeature('logManualPunishments'))) return;
if (!ban.guild.me) return; // bot was banned
- if (!ban.guild.me.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!ban.guild.me.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return ban.guild.error(
'modlogSyncBan',
`Could not sync the manual ban of ${ban.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -57,7 +57,7 @@ export default class ModlogSyncBanListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: ban.user.tag,
- iconURL: ban.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Ban'}` })
.addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts
index 6bf661c..814b624 100644
--- a/src/listeners/track-manual-punishments/modlogSyncKick.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncKickListener extends BushListener {
public constructor() {
@@ -14,7 +14,7 @@ export default class ModlogSyncKickListener extends BushListener {
public override async exec(...[member]: BushClientEvents['guildMemberRemove']) {
if (!(await member.guild.hasFeature('logManualPunishments'))) return;
if (!member.guild.me) return; // bot was removed from guild
- if (!member.guild.me.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!member.guild.me.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return member.guild.error(
'modlogSyncKick',
`Could not sync the potential manual kick of ${member.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -57,7 +57,7 @@ export default class ModlogSyncKickListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: member.user.tag,
- iconURL: member.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: member.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Kick'}` })
.addField({ name: '**User**', value: `${member.user} (${member.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
index fb48faa..1289f4c 100644
--- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncTimeoutListener extends BushListener {
public constructor() {
@@ -13,7 +13,7 @@ export default class ModlogSyncTimeoutListener extends BushListener {
public override async exec(...[_oldMember, newMember]: BushClientEvents['guildMemberUpdate']) {
if (!(await newMember.guild.hasFeature('logManualPunishments'))) return;
- if (!newMember.guild.me!.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!newMember.guild.me!.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return newMember.guild.error(
'modlogSyncTimeout',
`Could not sync the potential manual timeout of ${newMember.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -62,7 +62,7 @@ export default class ModlogSyncTimeoutListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: newMember.user.tag,
- iconURL: newMember.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: newMember.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${newTime ? 'Manual Timeout' : 'Manual Remove Timeout'}` })
.addField({ name: '**User**', value: `${newMember.user} (${newMember.user.tag})` })
diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
index e297fce..a92c1e9 100644
--- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
@@ -1,6 +1,6 @@
import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
import { AuditLogEvent } from 'discord-api-types';
-import { Embed, Permissions } from 'discord.js';
+import { Embed, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncUnbanListener extends BushListener {
public constructor() {
@@ -13,7 +13,7 @@ export default class ModlogSyncUnbanListener extends BushListener {
public override async exec(...[ban]: BushClientEvents['guildBanRemove']) {
if (!(await ban.guild.hasFeature('logManualPunishments'))) return;
- if (!ban.guild.me!.permissions.has(Permissions.FLAGS.VIEW_AUDIT_LOG)) {
+ if (!ban.guild.me!.permissions.has(PermissionFlagsBits.ViewAuditLog)) {
return ban.guild.error(
'modlogSyncBan',
`Could not sync the manual unban of ${ban.user.tag} to the modlog because I do not have the "View Audit Log" permission.`
@@ -56,7 +56,7 @@ export default class ModlogSyncUnbanListener extends BushListener {
.setFooter({ text: `CaseID: ${log.id}` })
.setAuthor({
name: ban.user.tag,
- iconURL: ban.user.avatarURL({ format: 'png', size: 4096 }) ?? undefined
+ iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
.addField({ name: '**Action**', value: `${'Manual Unban'}` })
.addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` })
diff --git a/tsconfig.json b/tsconfig.json
index 25615af..36b15bf 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,7 +4,9 @@
"target": "ESNext",
"moduleResolution": "Node",
"outDir": "dist",
- "lib": ["esnext", "esnext.array", "esnext.asyncIterable", "esnext.intl", "esnext.symbol"],
+ "lib": [
+ "esnext"
+ ],
"sourceMap": true,
"incremental": true,
"experimentalDecorators": true,
@@ -22,11 +24,25 @@
"preserveValueImports": true,
"removeComments": true,
"paths": {
- "#lib": ["./src/lib/index.js"],
- "#args": ["./src/arguments/index.ts"],
- "#commands": ["./src/commands/index.ts"]
+ "#lib": [
+ "./src/lib/index.js"
+ ],
+ "#args": [
+ "./src/arguments/index.ts"
+ ],
+ "#commands": [
+ "./src/commands/index.ts"
+ ]
}
},
- "include": ["src/**/*.ts", "src/**/*d.ts", "lib/**/*.ts", "ecosystem.config.cjs"],
- "exclude": ["dist", "node_modules"]
-}
+ "include": [
+ "src/**/*.ts",
+ "src/**/*d.ts",
+ "lib/**/*.ts",
+ "ecosystem.config.cjs"
+ ],
+ "exclude": [
+ "dist",
+ "node_modules"
+ ]
+} \ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 0ccdcd3..d68f0f9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -27,6 +27,13 @@ __metadata:
languageName: node
linkType: hard
+"@discordjs/collection@npm:^0.4.0":
+ version: 0.4.0
+ resolution: "@discordjs/collection@npm:0.4.0"
+ checksum: fa8fc4246921f3230eb6c5d6d4dc0caf9dd659fcc903175944edf4fb0a9ed9913fdf164733d3f1e644ef469bc79b0d38a526ee620b92169cb40e79b40b0c716b
+ languageName: node
+ linkType: hard
+
"@discordjs/collection@npm:^0.5.0":
version: 0.5.0
resolution: "@discordjs/collection@npm:0.5.0"
@@ -34,6 +41,21 @@ __metadata:
languageName: node
linkType: hard
+"@discordjs/rest@npm:^0.3.0":
+ version: 0.3.0
+ resolution: "@discordjs/rest@npm:0.3.0"
+ dependencies:
+ "@discordjs/collection": ^0.4.0
+ "@sapphire/async-queue": ^1.1.9
+ "@sapphire/snowflake": ^3.0.1
+ discord-api-types: ^0.26.1
+ form-data: ^4.0.0
+ node-fetch: ^2.6.5
+ tslib: ^2.3.1
+ checksum: 0e5724156e0375b2181036d25d8847c5b7d8ab46a3409a19dad57ec9b3301d9127917a52558d3daa7e2b513804d4de9fcd5f6d56e056cc48dd567ebf26548c6d
+ languageName: node
+ linkType: hard
+
"@eslint/eslintrc@npm:^1.0.5":
version: 1.0.5
resolution: "@eslint/eslintrc@npm:1.0.5"
@@ -59,13 +81,13 @@ __metadata:
linkType: hard
"@humanwhocodes/config-array@npm:^0.9.2":
- version: 0.9.2
- resolution: "@humanwhocodes/config-array@npm:0.9.2"
+ version: 0.9.3
+ resolution: "@humanwhocodes/config-array@npm:0.9.3"
dependencies:
"@humanwhocodes/object-schema": ^1.2.1
debug: ^4.1.1
minimatch: ^3.0.4
- checksum: 28a9e2974c50a86765cb6cc96e03d29187ea33fdaba62c4f35db89002e3cfbd340e64c9f6cf869e33e2e5cdcc06e78763458f4178d38a6f30aea1308787ca706
+ checksum: 6e5d7d274941c459bab0a14a87e372206d89fad3e4879d982edc942e8cc34da6510ea3644b8535a2a9edaa6527e91dccceabc6837ffa8ee506d66bca5d269ebc
languageName: node
linkType: hard
@@ -180,110 +202,110 @@ __metadata:
linkType: hard
"@sapphire/async-queue@npm:^1.1.9":
- version: 1.1.9
- resolution: "@sapphire/async-queue@npm:1.1.9"
- checksum: 8a4cb79e01948ee9f99f47e9fdfdfd509353d267f9e18bb8fe8e813b5d45f1fb6de08297b4557eb9a76b95bea59abaab67819175238068cc4cbc808d1d183e9d
+ version: 1.2.0
+ resolution: "@sapphire/async-queue@npm:1.2.0"
+ checksum: 9959c91fe031e9350134740b68e64798eff1f72f1417f312a4f7bebbd875035a406ba5ae1e71640c3819dec10d0f86a0588b494088f353f85701f2f1196e4560
languageName: node
linkType: hard
"@sapphire/snowflake@npm:^3.0.1":
- version: 3.0.1
- resolution: "@sapphire/snowflake@npm:3.0.1"
- checksum: 8641e9a79e0668f67acac9e60ed47ad41aede699c99f8947247e1a9d20d895a922811bdc3f7bc27851c386aa0acc52397051344877e4ac8ab21d0b3f5be0dfa1
+ version: 3.1.0
+ resolution: "@sapphire/snowflake@npm:3.1.0"
+ checksum: 979d41f531983b992e65f79a75016e92bb4f3984148bd7e2164059b4e8e18df0206c36c5a1a02f32c39c425b268f2e7871d9eef1eb5f1690f8837e451cc00812
languageName: node
linkType: hard
-"@sentry/core@npm:6.17.2":
- version: 6.17.2
- resolution: "@sentry/core@npm:6.17.2"
+"@sentry/core@npm:6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/core@npm:6.17.3"
dependencies:
- "@sentry/hub": 6.17.2
- "@sentry/minimal": 6.17.2
- "@sentry/types": 6.17.2
- "@sentry/utils": 6.17.2
+ "@sentry/hub": 6.17.3
+ "@sentry/minimal": 6.17.3
+ "@sentry/types": 6.17.3
+ "@sentry/utils": 6.17.3
tslib: ^1.9.3
- checksum: 3d0265bacf95df766db90ce582758130cf802ea4a9cc86872519aec8e240a37d69aa0f0e72be3526a6b8d4c59bd6eb0c23518d07e4b7b3477014526e45c5e29a
+ checksum: b7c1e60da81c46da8ec5142a2f67179dd3895724320de5fa76193a4ccb356eaab1e084147872c5e25453661f4e0b25da57ea7f0d86a990ef88b5382291f9f8d1
languageName: node
linkType: hard
-"@sentry/hub@npm:6.17.2":
- version: 6.17.2
- resolution: "@sentry/hub@npm:6.17.2"
+"@sentry/hub@npm:6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/hub@npm:6.17.3"
dependencies:
- "@sentry/types": 6.17.2
- "@sentry/utils": 6.17.2
+ "@sentry/types": 6.17.3
+ "@sentry/utils": 6.17.3
tslib: ^1.9.3
- checksum: 1f8e029f6e32fd3b6779103cf425bd813a1caeec91fc27f3a3675ea253a16e50a95d719fce9511d061682c81108a969f25e39eb6d59f469f4d4fd89a57d72eea
+ checksum: 3f12ef7eb8056a0e850ffcbcbf32cfd973d3604132c7d033bc05e6ebb7bebf7c90dfbc6c009a8504f7837d622e9275b45d0f5ad7dd3f9240e4e0cd0012916d96
languageName: node
linkType: hard
-"@sentry/integrations@npm:^6.16.1":
- version: 6.17.2
- resolution: "@sentry/integrations@npm:6.17.2"
+"@sentry/integrations@npm:^6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/integrations@npm:6.17.3"
dependencies:
- "@sentry/types": 6.17.2
- "@sentry/utils": 6.17.2
+ "@sentry/types": 6.17.3
+ "@sentry/utils": 6.17.3
localforage: ^1.8.1
tslib: ^1.9.3
- checksum: 7f81e93614c777e1579fdacda24d7b8da5bc7dd239c2fcbf08c45749f13906d3d110b7c796fd6761cde1812ebffcd0265d21acd961501e4acbbf9125034e299c
+ checksum: 37c23ad79cff3d47631de8fec19f426df96f522af1af20475122df9c1e2c81e518e937c95d64a16a32451f0386e385c72dbd2a8ac683d475228965f9a116aeaf
languageName: node
linkType: hard
-"@sentry/minimal@npm:6.17.2":
- version: 6.17.2
- resolution: "@sentry/minimal@npm:6.17.2"
+"@sentry/minimal@npm:6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/minimal@npm:6.17.3"
dependencies:
- "@sentry/hub": 6.17.2
- "@sentry/types": 6.17.2
+ "@sentry/hub": 6.17.3
+ "@sentry/types": 6.17.3
tslib: ^1.9.3
- checksum: 4c1d63deee6387c25b3f6fd8d377777f6010f4725230566b24ef103a26daa07a359604e5d1418e8e7f47f31680506a128dab803ecec2eab3e263fad99902e92e
+ checksum: af7866cc2a75f5914d11fbd4f3528fd32ce669756d042fafbb26df314d3b20e127780d7c30485737ff4b50930b774afdb2f7fc0b86345b43b551d36db54eefca
languageName: node
linkType: hard
-"@sentry/node@npm:^6.16.1":
- version: 6.17.2
- resolution: "@sentry/node@npm:6.17.2"
+"@sentry/node@npm:^6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/node@npm:6.17.3"
dependencies:
- "@sentry/core": 6.17.2
- "@sentry/hub": 6.17.2
- "@sentry/tracing": 6.17.2
- "@sentry/types": 6.17.2
- "@sentry/utils": 6.17.2
+ "@sentry/core": 6.17.3
+ "@sentry/hub": 6.17.3
+ "@sentry/tracing": 6.17.3
+ "@sentry/types": 6.17.3
+ "@sentry/utils": 6.17.3
cookie: ^0.4.1
https-proxy-agent: ^5.0.0
lru_map: ^0.3.3
tslib: ^1.9.3
- checksum: f2cf213ec8c208d4a53c36dae0223eb75f4e062ea7863a6a162fab022190a3875f459bc467b0b034a62d42fb53deac89fcb4ac61ac29317bbb4b30ec15ca4701
+ checksum: 3e5bd4cbce0d0ff6aa2fc813dcee675182564c93ddf25bb387d9a491c09f4199f463c7f35fe825b92ec0d841ac2dcda32bbab137648f6c05f1638b884673a354
languageName: node
linkType: hard
-"@sentry/tracing@npm:6.17.2, @sentry/tracing@npm:^6.16.1":
- version: 6.17.2
- resolution: "@sentry/tracing@npm:6.17.2"
+"@sentry/tracing@npm:6.17.3, @sentry/tracing@npm:^6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/tracing@npm:6.17.3"
dependencies:
- "@sentry/hub": 6.17.2
- "@sentry/minimal": 6.17.2
- "@sentry/types": 6.17.2
- "@sentry/utils": 6.17.2
+ "@sentry/hub": 6.17.3
+ "@sentry/minimal": 6.17.3
+ "@sentry/types": 6.17.3
+ "@sentry/utils": 6.17.3
tslib: ^1.9.3
- checksum: 87a307c2d2fcb62d4584849ba75d1e09e42e2b5dc3bfad16fbe41da6a25f89bc81fcd533c95cf4b342aa8216a744ec72fdfcfb0e2d8e10efbc2d20bcfbb3107f
+ checksum: b8755c408a7083151b39c939cfff48cffbe5d93eeba8a6c0ba87795766d5437822330dd65e52a2a2d5ce668955c17574508d65e9ca3915cf8f9cb48afbad19cc
languageName: node
linkType: hard
-"@sentry/types@npm:6.17.2":
- version: 6.17.2
- resolution: "@sentry/types@npm:6.17.2"
- checksum: 0872f84ef93547a15a9c6567a1e7ce4f79ab4649829879637aba476437c4bb025bd4b0107799620818f8c2188521d3af221b3b35663ce968e5a44dc3a3a18ccb
+"@sentry/types@npm:6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/types@npm:6.17.3"
+ checksum: b3b38e725c113bc88fb546e67d9224179a920cdd7c8a9ea1bbf086f65e55f8cdafc720219d191a86b7a2057fc2d1d44beae1849675acd81a2b9278cd37892d41
languageName: node
linkType: hard
-"@sentry/utils@npm:6.17.2":
- version: 6.17.2
- resolution: "@sentry/utils@npm:6.17.2"
+"@sentry/utils@npm:6.17.3":
+ version: 6.17.3
+ resolution: "@sentry/utils@npm:6.17.3"
dependencies:
- "@sentry/types": 6.17.2
+ "@sentry/types": 6.17.3
tslib: ^1.9.3
- checksum: 15d2885a7da1bb30b78b2de54a031130aab59cb511ad5766d80daffeb2a08c5769b015e2a2687d4435b27e4474f79cc9fd19c1ad6bc0aabb572bea2a388ae0fb
+ checksum: 7da5e7de04448de2d1443a3285b9217da8cd9fda71a945dcef1255cec6df92c8f8e4fcc7927131ae4df717648a7ef6b2a71a234b592b56e540c8ab4d19ccfc4d
languageName: node
linkType: hard
@@ -451,16 +473,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/node-fetch@npm:^2.5.12":
- version: 2.5.12
- resolution: "@types/node-fetch@npm:2.5.12"
- dependencies:
- "@types/node": "*"
- form-data: ^3.0.0
- checksum: ad63c85ba6a9477b8e057ec8682257738130d98e8ece4e31141789bd99df9d9147985cc8bc0cb5c8983ed5aa6bb95d46df23d1e055f4ad5cf8b82fc69cf626c7
- languageName: node
- linkType: hard
-
"@types/node-os-utils@npm:^1.2.0":
version: 1.2.0
resolution: "@types/node-os-utils@npm:1.2.0"
@@ -468,10 +480,10 @@ __metadata:
languageName: node
linkType: hard
-"@types/node@npm:*, @types/node@npm:^17.0.10":
- version: 17.0.12
- resolution: "@types/node@npm:17.0.12"
- checksum: f7e4c384b72648550391c2c8bd42560dfccf5b7a0506fb5842f326f8b176286be279dd63f62af621fe6d409d474ea5d312855061f512132e999f4e902a22e4db
+"@types/node@npm:*, @types/node@npm:^17.0.13":
+ version: 17.0.13
+ resolution: "@types/node@npm:17.0.13"
+ checksum: 8b87c850c1604c65e3474bd03d122914464b7970caed20f65f4a7706ab429353b896a3916be4d2581164eccda9e3dd95c338fbccf686ff85a824c40d15e8f3fa
languageName: node
linkType: hard
@@ -575,13 +587,13 @@ __metadata:
languageName: node
linkType: hard
-"@typescript-eslint/eslint-plugin@npm:^5.10.0":
- version: 5.10.1
- resolution: "@typescript-eslint/eslint-plugin@npm:5.10.1"
+"@typescript-eslint/eslint-plugin@npm:^5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/eslint-plugin@npm:5.10.2"
dependencies:
- "@typescript-eslint/scope-manager": 5.10.1
- "@typescript-eslint/type-utils": 5.10.1
- "@typescript-eslint/utils": 5.10.1
+ "@typescript-eslint/scope-manager": 5.10.2
+ "@typescript-eslint/type-utils": 5.10.2
+ "@typescript-eslint/utils": 5.10.2
debug: ^4.3.2
functional-red-black-tree: ^1.0.1
ignore: ^5.1.8
@@ -594,53 +606,53 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
- checksum: 44d71b4622c0e53bb0c576f2b94bf9274faf0c2f3d5fc0357ecec211add6ebfc96c15a5fa68aab8eede1a928f09631062517617ee83a8d228d2c81215c0156a8
+ checksum: 460808a3c7d0390a7dcc1b2e717c2c4e303a31f9161fbc8c4ecc7bec076285d636d505d2f1ca9932c7a7989ea0fc3a78023be9f342bd8c4bdfe4a9842d0c053a
languageName: node
linkType: hard
"@typescript-eslint/experimental-utils@npm:^5.0.0":
- version: 5.10.1
- resolution: "@typescript-eslint/experimental-utils@npm:5.10.1"
+ version: 5.10.2
+ resolution: "@typescript-eslint/experimental-utils@npm:5.10.2"
dependencies:
- "@typescript-eslint/utils": 5.10.1
+ "@typescript-eslint/utils": 5.10.2
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- checksum: 652209b59f19de9f6229ff9f688f7ef1c9f19a87484ca53503d4aaf150430cd1c623031c5643e3129344b239c1020c40c24992e416db9d0107cbed4a76c84408
+ checksum: 49945b0652d431d4caa3618807c69bd2585e38ffc31b72379d27f43213b793b1193948b2e23dac9aa0c7afe01d0d4dbef589a0a64caf514623b73ee89beb6a43
languageName: node
linkType: hard
-"@typescript-eslint/parser@npm:^5.10.0":
- version: 5.10.1
- resolution: "@typescript-eslint/parser@npm:5.10.1"
+"@typescript-eslint/parser@npm:^5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/parser@npm:5.10.2"
dependencies:
- "@typescript-eslint/scope-manager": 5.10.1
- "@typescript-eslint/types": 5.10.1
- "@typescript-eslint/typescript-estree": 5.10.1
+ "@typescript-eslint/scope-manager": 5.10.2
+ "@typescript-eslint/types": 5.10.2
+ "@typescript-eslint/typescript-estree": 5.10.2
debug: ^4.3.2
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
- checksum: 36e94b3fb5010f09311f1667f8beed1ece46677e738424df78e266eef0957e33671d505a7979d775e863b553d509ce8dbee6201a6994da5282ff38f8e1ae0303
+ checksum: c83e3afee090e9cc830d6c59cd87681a83ae95f2daa848040f2e67ef34f87c5ec707a571b3ccb31b67adc0447b22b62c048a6cb088e661801dacb9c2cf070a9c
languageName: node
linkType: hard
-"@typescript-eslint/scope-manager@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/scope-manager@npm:5.10.1"
+"@typescript-eslint/scope-manager@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/scope-manager@npm:5.10.2"
dependencies:
- "@typescript-eslint/types": 5.10.1
- "@typescript-eslint/visitor-keys": 5.10.1
- checksum: a4f802ca683bcb3db0e14739d02e680f0f51b6562c23380ea9e0878a70f638572650bd2dbc62f8d74bc39657c053c3e6469a0d4179d3d99bb94fd47bd14d6ecf
+ "@typescript-eslint/types": 5.10.2
+ "@typescript-eslint/visitor-keys": 5.10.2
+ checksum: 22c8ac9047a1a276e0b911eca0eee30c4f7f7089688dca36314da28143d349c504e542116d3e201d52da50b212f38b2125e3918e6ae2e2b0b57964fb1cdf8fcd
languageName: node
linkType: hard
-"@typescript-eslint/type-utils@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/type-utils@npm:5.10.1"
+"@typescript-eslint/type-utils@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/type-utils@npm:5.10.2"
dependencies:
- "@typescript-eslint/utils": 5.10.1
+ "@typescript-eslint/utils": 5.10.2
debug: ^4.3.2
tsutils: ^3.21.0
peerDependencies:
@@ -648,23 +660,23 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
- checksum: f7310e036490c47bce132ad4c8185dc253eb5afb954788335811f46ae36c0ea92816319ca1072481f9a8dbac3cd36cc22a8cdc86f2014d0882b8c4029c69d491
+ checksum: 7732c826ef6c798af0f45b85f0389688e614de16c7c2c7e446a664787df360242cf2bc9d68d6ce1993f1bfc289b5d6a75a400fc968b7ded187c30c40f978de52
languageName: node
linkType: hard
-"@typescript-eslint/types@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/types@npm:5.10.1"
- checksum: e8bbedae74637c35677aab92eceb154e8f1b100b6015d4aa20b5d52bb2e486e50733feca07610406763e1cc36c448a97ca77f058f4e07e7c61bd8d830c092030
+"@typescript-eslint/types@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/types@npm:5.10.2"
+ checksum: fa44dbd31d12f16ada6a6e7dba61ff90bf955b400f314f7378d9775cc8e13ef5da3318e89a90c3c3f75d50179e6be104ed8f90d4e77a02d6f7793b346bf25f15
languageName: node
linkType: hard
-"@typescript-eslint/typescript-estree@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/typescript-estree@npm:5.10.1"
+"@typescript-eslint/typescript-estree@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/typescript-estree@npm:5.10.2"
dependencies:
- "@typescript-eslint/types": 5.10.1
- "@typescript-eslint/visitor-keys": 5.10.1
+ "@typescript-eslint/types": 5.10.2
+ "@typescript-eslint/visitor-keys": 5.10.2
debug: ^4.3.2
globby: ^11.0.4
is-glob: ^4.0.3
@@ -673,33 +685,33 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
- checksum: 5721e99baa9b286a474a22c4b08e6ac5a0d79435e7f2a91e876e6a2135a44244f0a83ff42cc1cd2ac23cc6ee014965baaa84481e9017f703c45f22e474620c7f
+ checksum: 2fdad1448578ee5c7f5876c998de50e2fa5fd6eed9effbfa9b0cf2579afe195964f0e4ebaa5d94ae228096cddf016500e9c8cc2f60c3dff981f09ebb42e5de53
languageName: node
linkType: hard
-"@typescript-eslint/utils@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/utils@npm:5.10.1"
+"@typescript-eslint/utils@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/utils@npm:5.10.2"
dependencies:
"@types/json-schema": ^7.0.9
- "@typescript-eslint/scope-manager": 5.10.1
- "@typescript-eslint/types": 5.10.1
- "@typescript-eslint/typescript-estree": 5.10.1
+ "@typescript-eslint/scope-manager": 5.10.2
+ "@typescript-eslint/types": 5.10.2
+ "@typescript-eslint/typescript-estree": 5.10.2
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- checksum: beca5b5eb56b6236215baa409619fc8eea700e733094683c3ac39236bf442793b61fcf3ad6fe57ccec265649962d84c1951900e47bd55208ed50c4c2c7d8cf6b
+ checksum: d0dde3066f52405dffc2cbccd43d2aa2d9336510f178aa43812d616c951ea45f83693e2f6a88e3abfc94e2cc5f9eb3f2be9221a38848fe70aaffc294794c9d53
languageName: node
linkType: hard
-"@typescript-eslint/visitor-keys@npm:5.10.1":
- version: 5.10.1
- resolution: "@typescript-eslint/visitor-keys@npm:5.10.1"
+"@typescript-eslint/visitor-keys@npm:5.10.2":
+ version: 5.10.2
+ resolution: "@typescript-eslint/visitor-keys@npm:5.10.2"
dependencies:
- "@typescript-eslint/types": 5.10.1
+ "@typescript-eslint/types": 5.10.2
eslint-visitor-keys: ^3.0.0
- checksum: 7e1e1a41b2df797534ee56c0d9ae2a056e0ca0ca019b31125fd52d7deb0e802d899920031f2dbf88a951e6752d8fcbd9fa904eaeccb50cf30d2b92b54fd7879d
+ checksum: f80caa1f0d71da096e9e18728b76046286cad691b178c0d101b71e5b553ee4a427ae2c2f8b9bc789dce266f62b026b7ca88ddafd52fde4f0dbb24e05765629b7
languageName: node
linkType: hard
@@ -873,13 +885,13 @@ __metadata:
"@notenoughupdates/humanize-duration": ^4.0.1
"@notenoughupdates/simplify-number": ^1.0.1
"@notenoughupdates/wolfram-alpha-api": ^1.0.1
- "@sentry/integrations": ^6.16.1
- "@sentry/node": ^6.16.1
- "@sentry/tracing": ^6.16.1
+ "@sentry/integrations": ^6.17.3
+ "@sentry/node": ^6.17.3
+ "@sentry/tracing": ^6.17.3
"@types/eslint": ^8
"@types/express": ^4.17.13
"@types/lodash": ^4.14.178
- "@types/node": ^17.0.10
+ "@types/node": ^17.0.13
"@types/node-os-utils": ^1.2.0
"@types/numeral": ^2.0.2
"@types/pg": ^8
@@ -888,15 +900,15 @@ __metadata:
"@types/source-map-support": ^0
"@types/tinycolor2": ^1.4.3
"@types/validator": ^13.7.1
- "@typescript-eslint/eslint-plugin": ^5.10.0
- "@typescript-eslint/parser": ^5.10.0
+ "@typescript-eslint/eslint-plugin": ^5.10.2
+ "@typescript-eslint/parser": ^5.10.2
canvas: ^2.9.0
chalk: ^5.0.0
deep-lock: ^1.0.0
discord-akairo: "npm:@notenoughupdates/discord-akairo@dev"
discord-api-types: 0.26.1
discord.js: "npm:@notenoughupdates/discord.js@dev"
- eslint: ^8.7.0
+ eslint: ^8.8.0
eslint-config-prettier: ^8.3.0
eslint-plugin-deprecation: ^1.3.2
fuse.js: ^6.5.3
@@ -905,6 +917,7 @@ __metadata:
mathjs: ^10.1.0
moment: ^2.29.1
nanoid: ^3.2.0
+ node-fetch: ^3.2.0
node-os-utils: ^1.3.6
numeral: ^2.0.6
pg: ^8.7.1
@@ -912,11 +925,11 @@ __metadata:
prettier: ^2.5.1
pretty-bytes: ^5.6.0
rimraf: ^3.0.2
- sequelize: ^6.13.0
+ sequelize: 6.13.0
source-map-support: ^0.5.21
tinycolor2: ^1.4.2
tslib: ^2.3.1
- typescript: ^4.5.4
+ typescript: ^4.5.5
vm2: ^3.9.5
languageName: unknown
linkType: soft
@@ -1101,6 +1114,13 @@ __metadata:
languageName: node
linkType: hard
+"data-uri-to-buffer@npm:^4.0.0":
+ version: 4.0.0
+ resolution: "data-uri-to-buffer@npm:4.0.0"
+ checksum: a010653869abe8bb51259432894ac62c52bf79ad761d418d94396f48c346f2ae739c46b254e8bb5987bded8a653d467db1968db3a69bab1d33aa5567baa5cfc7
+ languageName: node
+ linkType: hard
+
"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3":
version: 4.3.3
resolution: "debug@npm:4.3.3"
@@ -1199,11 +1219,11 @@ __metadata:
linkType: hard
"discord-akairo@npm:@notenoughupdates/discord-akairo@dev":
- version: 9.0.10-dev.1643166025.36345a6
- resolution: "@notenoughupdates/discord-akairo@npm:9.0.10-dev.1643166025.36345a6"
+ version: 9.0.10-dev.1643600672.1c7b4f9
+ resolution: "@notenoughupdates/discord-akairo@npm:9.0.10-dev.1643600672.1c7b4f9"
dependencies:
source-map-support: ^0.5.21
- checksum: 5b72fe34df6a40db5e7f77f3b5d88bffe86492581d2aee8fed45136667b57b2cd645526f9adbbef029777b61af1cfacb1029f860783afaa40e4dfb89a474cfe1
+ checksum: f62a4bda117f41e8752a40bbe9cda73fe0739715ca072855743851db55de1a4f5d32d9353a00d92376117bc06e8143fe35e20054bceaa2c32b46e4a8d991ed58
languageName: node
linkType: hard
@@ -1215,20 +1235,18 @@ __metadata:
linkType: hard
"discord.js@npm:@notenoughupdates/discord.js@dev":
- version: 14.0.0-dev.1643172048.00d93c7
- resolution: "@notenoughupdates/discord.js@npm:14.0.0-dev.1643172048.00d93c7"
+ version: 14.0.0-dev.1643657997.31a624d
+ resolution: "@notenoughupdates/discord.js@npm:14.0.0-dev.1643657997.31a624d"
dependencies:
"@discordjs/builders": ^0.12.0
"@discordjs/collection": ^0.5.0
- "@sapphire/async-queue": ^1.1.9
+ "@discordjs/rest": ^0.3.0
"@sapphire/snowflake": ^3.0.1
- "@types/node-fetch": ^2.5.12
"@types/ws": ^8.2.2
discord-api-types: ^0.26.1
- form-data: ^4.0.0
node-fetch: ^2.6.7
ws: ^8.4.2
- checksum: a1f42634d508ed2b152baee15596c1eeb719e5013a65e76097815ce0648c398c781e16c49fcda2b3f5de37cc5f2e84f71a7bde19233a7cce82d8eb86a0b392ad
+ checksum: 89f20615356d9ca2c0eade1630c2c80eb1f606bf22cdbd51832b2777159fff47954bfca3e2c244be0a739b66eb540e861088404ed7710ae87c90f2a1e633efb0
languageName: node
linkType: hard
@@ -1371,9 +1389,9 @@ __metadata:
languageName: node
linkType: hard
-"eslint@npm:^8.7.0":
- version: 8.7.0
- resolution: "eslint@npm:8.7.0"
+"eslint@npm:^8.8.0":
+ version: 8.8.0
+ resolution: "eslint@npm:8.8.0"
dependencies:
"@eslint/eslintrc": ^1.0.5
"@humanwhocodes/config-array": ^0.9.2
@@ -1412,7 +1430,7 @@ __metadata:
v8-compile-cache: ^2.0.3
bin:
eslint: bin/eslint.js
- checksum: 1c80375a48b0fe3ccae3c6354323e4f0e92e970f23abc5b9705b90b7aef514b69ebd0a63e74962d30789986c91fa41c0e25cd2f98f19e9e2a2d36aafdfc9ccc9
+ checksum: 41a7e85bf84cf9f2d758ef3e8d08020a39a2836703728b59535684681349bd021c2c6e24174462b844a914870d707d2151e0371198899d957b444de91adaa435
languageName: node
linkType: hard
@@ -1509,6 +1527,16 @@ __metadata:
languageName: node
linkType: hard
+"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
+ version: 3.1.4
+ resolution: "fetch-blob@npm:3.1.4"
+ dependencies:
+ node-domexception: ^1.0.0
+ web-streams-polyfill: ^3.0.3
+ checksum: 81b074f38a2dbfd546dd58e482cefe14e605abd609e272804bf089d588d84f39e3e95b35640bfb376f71d5038c123d4d41be49d9cdf87e5ec8939d37738df0b6
+ languageName: node
+ linkType: hard
+
"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
@@ -1538,9 +1566,9 @@ __metadata:
linkType: hard
"flatted@npm:^3.1.0":
- version: 3.2.4
- resolution: "flatted@npm:3.2.4"
- checksum: 7d33846428ab337ec81ef9b8b9103894c1c81f5f67feb32bd4ed106fbc47da60d56edb42efd36c9f1f30a010272aeccd34ec1ffacfe9dfdff19673b1d4df481b
+ version: 3.2.5
+ resolution: "flatted@npm:3.2.5"
+ checksum: 3c436e9695ccca29620b4be5671dd72e5dd0a7500e0856611b7ca9bd8169f177f408c3b9abfa78dfe1493ee2d873e2c119080a8a9bee4e1a186a9e60ca6c89f1
languageName: node
linkType: hard
@@ -1551,17 +1579,6 @@ __metadata:
languageName: node
linkType: hard
-"form-data@npm:^3.0.0":
- version: 3.0.1
- resolution: "form-data@npm:3.0.1"
- dependencies:
- asynckit: ^0.4.0
- combined-stream: ^1.0.8
- mime-types: ^2.1.12
- checksum: b019e8d35c8afc14a2bd8a7a92fa4f525a4726b6d5a9740e8d2623c30e308fbb58dc8469f90415a856698933c8479b01646a9dff33c87cc4e76d72aedbbf860d
- languageName: node
- linkType: hard
-
"form-data@npm:^4.0.0":
version: 4.0.0
resolution: "form-data@npm:4.0.0"
@@ -1573,6 +1590,15 @@ __metadata:
languageName: node
linkType: hard
+"formdata-polyfill@npm:^4.0.10":
+ version: 4.0.10
+ resolution: "formdata-polyfill@npm:4.0.10"
+ dependencies:
+ fetch-blob: ^3.1.2
+ checksum: 82a34df292afadd82b43d4a740ce387bc08541e0a534358425193017bf9fb3567875dc5f69564984b1da979979b70703aa73dee715a17b6c229752ae736dd9db
+ languageName: node
+ linkType: hard
+
"fraction.js@npm:^4.1.2":
version: 4.1.2
resolution: "fraction.js@npm:4.1.2"
@@ -1866,9 +1892,9 @@ __metadata:
linkType: hard
"inflection@npm:^1.13.1":
- version: 1.13.1
- resolution: "inflection@npm:1.13.1"
- checksum: 0ae265f710f61320306207501931fe4248dace8e841fb911a33625df68f611bc3736d9f03be5abc5351ae3698c7830e35c400a3a092cd68e93aa3d8cc01cb73a
+ version: 1.13.2
+ resolution: "inflection@npm:1.13.2"
+ checksum: e7ad0559384ed7c526813404bde843f8f17941d47625ad60fc3b09e46efde873dd9840818007c6bd4dbe388e6248fa033d5a8c405c5fc62738c51b118a0e940f
languageName: node
linkType: hard
@@ -2316,6 +2342,13 @@ __metadata:
languageName: node
linkType: hard
+"node-domexception@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "node-domexception@npm:1.0.0"
+ checksum: ee1d37dd2a4eb26a8a92cd6b64dfc29caec72bff5e1ed9aba80c294f57a31ba4895a60fd48347cf17dd6e766da0ae87d75657dfd1f384ebfa60462c2283f5c7f
+ languageName: node
+ linkType: hard
+
"node-fetch@npm:^2.6.5, node-fetch@npm:^2.6.7":
version: 2.6.7
resolution: "node-fetch@npm:2.6.7"
@@ -2330,6 +2363,17 @@ __metadata:
languageName: node
linkType: hard
+"node-fetch@npm:^3.2.0":
+ version: 3.2.0
+ resolution: "node-fetch@npm:3.2.0"
+ dependencies:
+ data-uri-to-buffer: ^4.0.0
+ fetch-blob: ^3.1.4
+ formdata-polyfill: ^4.0.10
+ checksum: 1c809a0f64dd11cc18b49f990440e22c471da47da2a6d6b3388a83beba9d23ba7eaca1b9bf706a792bd283b824cf1a76777910859b9c28ad33a59f2ae4e44f8e
+ languageName: node
+ linkType: hard
+
"node-gyp@npm:latest":
version: 8.4.1
resolution: "node-gyp@npm:8.4.1"
@@ -2815,9 +2859,9 @@ __metadata:
languageName: node
linkType: hard
-"sequelize@npm:^6.13.0":
- version: 6.14.1
- resolution: "sequelize@npm:6.14.1"
+"sequelize@npm:6.13.0":
+ version: 6.13.0
+ resolution: "sequelize@npm:6.13.0"
dependencies:
"@types/debug": ^4.1.7
debug: ^4.3.3
@@ -2851,7 +2895,7 @@ __metadata:
optional: true
tedious:
optional: true
- checksum: e77e03241c5b22a6c6fc7b04dd0e6a63d2e9f9b7d4a825e405981fde68547f6015ecf8b8b24783448a44effc8cd471503e34d360df39d4413e110d5694c5d087
+ checksum: e9b5e5793a14f39a302f485435d33e59239aa837594f71d9a7e4ef02f1da4bcd1af168f21ae680df6ba04bc88f72d6e7b990072b3426d778bf25890495231193
languageName: node
linkType: hard
@@ -3129,7 +3173,7 @@ __metadata:
languageName: node
linkType: hard
-"typescript@npm:^4.5.4":
+"typescript@npm:^4.5.5":
version: 4.5.5
resolution: "typescript@npm:4.5.5"
bin:
@@ -3139,7 +3183,7 @@ __metadata:
languageName: node
linkType: hard
-"typescript@patch:typescript@^4.5.4#~builtin<compat/typescript>":
+"typescript@patch:typescript@^4.5.5#~builtin<compat/typescript>":
version: 4.5.5
resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53"
bin:
@@ -3222,6 +3266,13 @@ __metadata:
languageName: node
linkType: hard
+"web-streams-polyfill@npm:^3.0.3":
+ version: 3.2.0
+ resolution: "web-streams-polyfill@npm:3.2.0"
+ checksum: e23ad0649392fa0159dbfc6bb27474c308c3f332d9078cfef3c06c154165bef18732c5814126147c6c712f604216ddc950c171c854e3821f020e0d2d721a5958
+ languageName: node
+ linkType: hard
+
"webidl-conversions@npm:^3.0.0":
version: 3.0.1
resolution: "webidl-conversions@npm:3.0.1"