aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arguments/discordEmoji.ts2
-rw-r--r--src/commands/admin/channelPermissions.ts6
-rw-r--r--src/commands/config/config.ts31
-rw-r--r--src/commands/config/features.ts17
-rw-r--r--src/commands/dev/eval.ts14
-rw-r--r--src/commands/dev/javascript.ts4
-rw-r--r--src/commands/dev/servers.ts2
-rw-r--r--src/commands/dev/sh.ts4
-rw-r--r--src/commands/dev/test.ts51
-rw-r--r--src/commands/info/avatar.ts4
-rw-r--r--src/commands/info/botInfo.ts4
-rw-r--r--src/commands/info/color.ts4
-rw-r--r--src/commands/info/guildInfo.ts16
-rw-r--r--src/commands/info/help.ts18
-rw-r--r--src/commands/info/icon.ts4
-rw-r--r--src/commands/info/links.ts10
-rw-r--r--src/commands/info/ping.ts6
-rw-r--r--src/commands/info/pronouns.ts4
-rw-r--r--src/commands/info/snowflake.ts5
-rw-r--r--src/commands/info/userInfo.ts30
-rw-r--r--src/commands/leveling/leaderboard.ts6
-rw-r--r--src/commands/leveling/level.ts4
-rw-r--r--src/commands/moulberry-bush/capePermissions.ts4
-rw-r--r--src/commands/moulberry-bush/capes.ts2
-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/calculator.ts4
-rw-r--r--src/commands/utilities/decode.ts4
-rw-r--r--src/commands/utilities/highlight-!.ts2
-rw-r--r--src/commands/utilities/highlight-matches.ts2
-rw-r--r--src/commands/utilities/highlight-show.ts4
-rw-r--r--src/commands/utilities/price.ts10
-rw-r--r--src/commands/utilities/reminders.ts2
-rw-r--r--src/commands/utilities/suicide.ts4
-rw-r--r--src/commands/utilities/viewRaw.ts6
-rw-r--r--src/commands/utilities/wolframAlpha.ts4
-rw-r--r--src/lib/common/AutoMod.ts22
-rw-r--r--src/lib/common/ButtonPaginator.ts35
-rw-r--r--src/lib/common/ConfirmationPrompt.ts8
-rw-r--r--src/lib/common/DeleteButton.ts8
-rw-r--r--src/lib/common/util/Moderation.ts8
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts24
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts18
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts5
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushButtonInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts32
-rw-r--r--src/lib/extensions/discord.js/BushChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushClientEvents.ts11
-rw-r--r--src/lib/extensions/discord.js/BushDMChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts2
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannelManager.ts32
-rw-r--r--src/lib/extensions/discord.js/BushMessageManager.ts12
-rw-r--r--src/lib/extensions/discord.js/BushModalSubmitInteraction.ts9
-rw-r--r--src/lib/extensions/discord.js/BushSelectMenuInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushStoreChannel.ts46
-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/BushVoiceChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/other.ts7
-rw-r--r--src/lib/index.ts1
-rw-r--r--src/lib/utils/BushConstants.ts59
-rw-r--r--src/lib/utils/BushLogger.ts12
-rw-r--r--src/listeners/bush/appealListener.ts6
-rw-r--r--src/listeners/bush/supportThread.ts4
-rw-r--r--src/listeners/commands/commandError.ts8
-rw-r--r--src/listeners/commands/commandStarted.ts3
-rw-r--r--src/listeners/guild-custom/bushLockdown.ts4
-rw-r--r--src/listeners/guild-custom/bushUnlockdown.ts4
-rw-r--r--src/listeners/guild/guildMemberAdd.ts4
-rw-r--r--src/listeners/guild/guildMemberRemove.ts4
-rw-r--r--src/listeners/interaction/interactionCreate.ts2
-rw-r--r--src/listeners/member-custom/bushBan.ts4
-rw-r--r--src/listeners/member-custom/bushBlock.ts4
-rw-r--r--src/listeners/member-custom/bushKick.ts4
-rw-r--r--src/listeners/member-custom/bushMute.ts4
-rw-r--r--src/listeners/member-custom/bushPunishRole.ts4
-rw-r--r--src/listeners/member-custom/bushPunishRoleRemove.ts4
-rw-r--r--src/listeners/member-custom/bushPurge.ts4
-rw-r--r--src/listeners/member-custom/bushRemoveTimeout.ts4
-rw-r--r--src/listeners/member-custom/bushTimeout.ts4
-rw-r--r--src/listeners/member-custom/bushUnban.ts4
-rw-r--r--src/listeners/member-custom/bushUnblock.ts4
-rw-r--r--src/listeners/member-custom/bushUnmute.ts4
-rw-r--r--src/listeners/member-custom/bushUpdateModlog.ts4
-rw-r--r--src/listeners/member-custom/bushUpdateSettings.ts4
-rw-r--r--src/listeners/member-custom/bushWarn.ts4
-rw-r--r--src/listeners/message/blacklistedFile.ts1
-rw-r--r--src/listeners/message/directMessage.ts4
-rw-r--r--src/listeners/other/consoleListener.ts2
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncBan.ts7
-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.ts7
-rw-r--r--src/listeners/ws/INTERACTION_CREATE.ts13
101 files changed, 388 insertions, 449 deletions
diff --git a/src/arguments/discordEmoji.ts b/src/arguments/discordEmoji.ts
index 9c4991f..3edf123 100644
--- a/src/arguments/discordEmoji.ts
+++ b/src/arguments/discordEmoji.ts
@@ -1,5 +1,5 @@
import type { BushArgumentTypeCaster } from '#lib';
-import type { Snowflake } from 'discord-api-types/v9';
+import type { Snowflake } from 'discord-api-types/v10';
export const discordEmoji: BushArgumentTypeCaster<DiscordEmojiInfo | null> = (_, phrase) => {
if (!phrase) return null;
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index 37610b3..c06b5fa 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -1,6 +1,6 @@
import { BushCommand, ButtonPaginator, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
+import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ChannelPermissionsCommand extends BushCommand {
public constructor() {
@@ -88,9 +88,9 @@ export default class ChannelPermissionsCommand extends BushCommand {
}
const failure = failedChannels.map((c) => `<#${c.id}>`).join(' ');
if (failure.length > 2000) {
- const paginate: Embed[] = [];
+ const paginate: EmbedBuilder[] = [];
for (let i = 0; i < failure.length; i += 4000) {
- paginate.push(new Embed().setDescription(failure.substring(i, Math.min(failure.length, i + 4000))));
+ paginate.push(new EmbedBuilder().setDescription(failure.substring(i, Math.min(failure.length, i + 4000))));
}
const normalMessage = `Finished changing perms! Failed channels:`;
return await ButtonPaginator.send(message, paginate, normalMessage);
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index a90a267..c1dd142 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -12,19 +12,19 @@ import {
import assert from 'assert';
import { type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo';
import {
- ActionRow,
+ ActionRowBuilder,
ApplicationCommandOptionType,
- ButtonComponent,
+ ButtonBuilder,
ButtonStyle,
Channel,
- Embed,
+ EmbedBuilder,
Formatters,
GuildMember,
InteractionUpdateOptions,
PermissionFlagsBits,
Role,
- SelectMenuComponent,
- SelectMenuOption,
+ SelectMenuBuilder,
+ UnsafeSelectMenuOptionBuilder,
User,
type Message,
type MessageComponentInteraction,
@@ -285,18 +285,21 @@ export default class ConfigCommand extends BushCommand {
case 'command_settingsSel': {
if (!interaction.isSelectMenu()) return;
- return interaction.update(
+ await interaction.update(
await this.generateMessageOptions(message, interaction.values[0] as keyof typeof guildSettingsObj)
);
+ return;
}
case 'command_settingsBack': {
if (!interaction.isButton()) return;
- return interaction.update(await this.generateMessageOptions(message));
+ await interaction.update(await this.generateMessageOptions(message));
+ return;
}
}
} else {
- return await interaction?.deferUpdate().catch(() => undefined);
+ await interaction?.deferUpdate().catch(() => undefined);
+ return;
}
});
}
@@ -307,17 +310,17 @@ export default class ConfigCommand extends BushCommand {
): Promise<MessageOptions & InteractionUpdateOptions> {
assert(message.inGuild());
- const settingsEmbed = new Embed().setColor(util.colors.default);
+ const settingsEmbed = new EmbedBuilder().setColor(util.colors.default);
if (!setting) {
settingsEmbed.setTitle(`${message.guild.name}'s Settings`);
const desc = settingsArr.map((s) => `:wrench: **${guildSettingsObj[s].name}**`).join('\n');
settingsEmbed.setDescription(desc);
- const selMenu = new ActionRow().addComponents(
- new SelectMenuComponent()
+ const selMenu = new ActionRowBuilder<SelectMenuBuilder>().addComponents(
+ new SelectMenuBuilder()
.addOptions(
...settingsArr.map((s) =>
- new SelectMenuOption()
+ new UnsafeSelectMenuOptionBuilder()
.setLabel(guildSettingsObj[s].name)
.setValue(s)
.setDescription(guildSettingsObj[s].description)
@@ -360,8 +363,8 @@ export default class ConfigCommand extends BushCommand {
: '[No Value Set]';
};
- const components = new ActionRow().addComponents(
- new ButtonComponent({ style: ButtonStyle.Primary, customId: 'command_settingsBack', label: 'Back' })
+ const components = new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'command_settingsBack', label: 'Back' })
);
settingsEmbed.setDescription(
`${Formatters.italic(guildSettingsObj[setting].description)}\n\n**Type:** ${guildSettingsObj[setting].type}`
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index c022a3a..5218bcf 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -8,11 +8,11 @@ import {
} from '#lib';
import assert from 'assert';
import {
- ActionRow,
+ ActionRowBuilder,
ComponentType,
- Embed,
+ EmbedBuilder,
PermissionFlagsBits,
- SelectMenuComponent,
+ SelectMenuBuilder,
type Message,
type SelectMenuInteraction
} from 'discord.js';
@@ -35,7 +35,7 @@ export default class FeaturesCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage) {
assert(message.inGuild());
- const featureEmbed = new Embed().setTitle(`${message.guild.name}'s Features`).setColor(util.colors.default);
+ const featureEmbed = new EmbedBuilder().setTitle(`${message.guild.name}'s Features`).setColor(util.colors.default);
const enabledFeatures = await message.guild.getSetting('enabledFeatures');
this.generateDescription(guildFeaturesArr, enabledFeatures, featureEmbed);
@@ -62,7 +62,8 @@ export default class FeaturesCommand extends BushCommand {
await interaction.update({ embeds: [featureEmbed] }).catch(() => undefined);
return;
} else {
- return await interaction?.deferUpdate().catch(() => undefined);
+ await interaction?.deferUpdate().catch(() => undefined);
+ return;
}
});
@@ -71,7 +72,7 @@ export default class FeaturesCommand extends BushCommand {
});
}
- public generateDescription(allFeatures: GuildFeatures[], currentFeatures: GuildFeatures[], embed: Embed): void {
+ public generateDescription(allFeatures: GuildFeatures[], currentFeatures: GuildFeatures[], embed: EmbedBuilder): void {
embed.setDescription(
allFeatures
.map(
@@ -83,8 +84,8 @@ export default class FeaturesCommand extends BushCommand {
}
public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) {
- return new ActionRow().addComponents(
- new SelectMenuComponent({
+ return new ActionRowBuilder<SelectMenuBuilder>().addComponents(
+ new SelectMenuBuilder({
customId: 'command_selectFeature',
disabled: disable,
maxValues: 1,
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 8742246..a32aa8e 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -21,6 +21,7 @@ import { exec } from 'child_process';
import {
ActionRow,
ApplicationCommandOptionType,
+ Attachment,
ButtonComponent,
ButtonInteraction,
Collection,
@@ -29,12 +30,14 @@ import {
ContextMenuCommandInteraction,
DMChannel,
Embed,
+ EmbedBuilder,
Emoji,
Interaction,
InteractionCollector,
Message,
- MessageAttachment,
MessageCollector,
+ OAuth2Scopes,
+ PermissionFlagsBits,
PermissionsBitField,
ReactionCollector,
SelectMenuComponent,
@@ -54,7 +57,7 @@ const { transpile } = ts,
/* eslint-enable @typescript-eslint/no-unused-vars */
// prettier-ignore
-util.assertAll(ActivePunishment, BushCommand, BushMessage, BushSlashMessage, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, Canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, Interaction, InteractionCollector, Message, MessageAttachment, MessageCollector, PermissionsBitField, ReactionCollector, SelectMenuComponent, Util, path, ts, fileURLToPath, promisify, assert, got, transpile, emojis, colors, sh, SnowflakeUtil, __dirname);
+util.assertAll(ActivePunishment, BushCommand, BushMessage, BushSlashMessage, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, Canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, Interaction, InteractionCollector, Message, Attachment, MessageCollector, OAuth2Scopes, PermissionFlagsBits, PermissionsBitField, ReactionCollector, SelectMenuComponent, Util, path, ts, fileURLToPath, promisify, assert, got, transpile, emojis, colors, sh, SnowflakeUtil, __dirname);
export default class EvalCommand extends BushCommand {
public constructor() {
@@ -226,7 +229,10 @@ export default class EvalCommand extends BushCommand {
lang: isTypescript ? ('ts' as const) : ('js' as const)
};
- const embed = new Embed().setFooter({ text: message.author.tag, iconURL: message.author.displayAvatarURL() ?? undefined });
+ const embed = new EmbedBuilder().setFooter({
+ text: message.author.tag,
+ iconURL: message.author