diff options
32 files changed, 106 insertions, 171 deletions
diff --git a/package.json b/package.json index 2d69f8e..d764b8c 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ } }, "prettier": { - "printWidth": 128, + "printWidth": 130, "useTabs": true, "quoteProps": "consistent", "singleQuote": true, diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index d6d7c18..c928265 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -69,8 +69,7 @@ export default class BlacklistCommand extends BushCommand { if (global) { if ((action as 'blacklist' | 'unblacklist' | 'toggle') === 'toggle') { const globalDB = - (await Global.findByPk(client.config.environment)) ?? - (await Global.create({ environment: client.config.environment })); + (await Global.findByPk(client.config.environment)) ?? (await Global.create({ environment: client.config.environment })); const blacklistedUsers = globalDB.blacklistedUsers; const blacklistedChannels = globalDB.blacklistedChannels; action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist'; @@ -96,8 +95,7 @@ export default class BlacklistCommand extends BushCommand { }); // guild disable } else { - if (!message.guild) - return await message.util.reply(`${util.emojis.error} You have to be in a guild to disable commands.`); + if (!message.guild) return await message.util.reply(`${util.emojis.error} You have to be in a guild to disable commands.`); const blacklistedChannels = (await message.guild.getSetting('blacklistedChannels')) ?? []; const blacklistedUsers = (await message.guild.getSetting('blacklistedUsers')) ?? []; if ((action as 'blacklist' | 'unblacklist' | 'toggle') === 'toggle') { diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 0ca8ef8..3342456 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -51,9 +51,7 @@ export default class SettingsCommand extends BushCommand { options: [ { name: 'value', - description: `What would you like to add to the server's ${guildSettingsObj[ - setting - ].name.toLowerCase()}?'`, + description: `What would you like to add to the server's ${guildSettingsObj[setting].name.toLowerCase()}?'`, type: guildSettingsObj[setting].type.replace('-array', '').toUpperCase() as SlashArgType, required: true } @@ -88,9 +86,7 @@ export default class SettingsCommand extends BushCommand { options: [ { name: 'value', - description: `What would you like to set the server's ${guildSettingsObj[ - setting - ].name.toLowerCase()} to?'`, + description: `What would you like to set the server's ${guildSettingsObj[setting].name.toLowerCase()} to?'`, type: guildSettingsObj[setting].type.toUpperCase() as SlashArgType, required: true } @@ -186,9 +182,7 @@ export default class SettingsCommand 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('MANAGE_GUILD') && !message.member?.user.isOwner()) - return await message.util.reply( - `${util.emojis.error} You must have the **MANAGE_GUILD** permission to run this command.` - ); + return await message.util.reply(`${util.emojis.error} You must have the **MANAGE_GUILD** 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!; const value = args.value; diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 2e3ce74..521972b 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -70,8 +70,7 @@ export default class DisableCommand extends BushCommand { if (global) { if (action === 'toggle') { const disabledCommands = ( - (await Global.findByPk(client.config.environment)) ?? - (await Global.create({ environment: client.config.environment })) + (await Global.findByPk(client.config.environment)) ?? (await Global.create({ environment: client.config.environment })) ).disabledCommands; action = disabledCommands.includes(commandID) ? 'disable' : 'enable'; } diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts index e3aa20d..8ea57f9 100644 --- a/src/commands/dev/test.ts +++ b/src/commands/dev/test.ts @@ -75,7 +75,11 @@ export default class TestCommand extends BushCommand { .setTitle('Title'); const buttonRow = new MessageActionRow().addComponents( - new MessageButton({ style: jsConstants.MessageButtonStyles.LINK, label: 'Link', url: 'https://www.google.com/' }) + new MessageButton({ + style: jsConstants.MessageButtonStyles.LINK, + label: 'Link', + url: 'https://www.google.com/' + }) ); return await message.util.reply({ content: 'Test', embeds: [embed], components: [buttonRow] }); } else if (['lots of buttons'].includes(args?.feature?.toLowerCase())) { @@ -84,7 +88,11 @@ export default class TestCommand extends BushCommand { const row = new MessageActionRow(); for (let b = 1; b <= 5; b++) { const id = (a + 5 * (b - 1)).toString(); - const button = new MessageButton({ style: jsConstants.MessageButtonStyles.SECONDARY, customId: id, label: id }); + const button = new MessageButton({ + style: jsConstants.MessageButtonStyles.SECONDARY, + customId: id, + label: id + }); row.addComponents(button); } ButtonRows.push(row); @@ -126,7 +134,11 @@ export default class TestCommand extends BushCommand { const row = new MessageActionRow(); for (let b = 1; b <= 5; b++) { const id = (a + 5 * (b - 1)).toString(); - const button = new MessageButton({ style: jsConstants.MessageButtonStyles.SECONDARY, customId: id, label: id }); + const button = new MessageButton({ + style: jsConstants.MessageButtonStyles.SECONDARY, + customId: id, + label: id + }); row.addComponents(button); } ButtonRows.push(row); diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index 3a592e9..51d9984 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -97,10 +97,7 @@ export default class GuildInfoCommand extends BushCommand { ); if (guild.me?.permissions.has('MANAGE_GUILD') && guild.vanityURLCode) { const vanityInfo: Vanity = await guild.fetchVanityData(); - guildAbout.push( - `**Vanity URL:** discord.gg/${vanityInfo.code}`, - `**Vanity Uses:** ${vanityInfo.uses?.toLocaleString()}` - ); + guildAbout.push(`**Vanity URL:** discord.gg/${vanityInfo.code}`, `**Vanity Uses:** ${vanityInfo.uses?.toLocaleString()}`); } if (guild.icon) guildAbout.push(`**Icon:** [link](${guild.iconURL({ dynamic: true, size: 4096, format: 'png' })})`); @@ -112,13 +109,7 @@ export default class GuildInfoCommand extends BushCommand { // subtract 1 for @everyone role `**Roles:** ${((guild.roles.cache.size ?? 0) - 1).toLocaleString()} / 250`, `**Emojis:** ${guild.emojis.cache.size?.toLocaleString() ?? 0} / ${ - guild.premiumTier === 'TIER_3' - ? 500 - : guild.premiumTier === 'TIER_2' - ? 300 - : guild.premiumTier === 'TIER_1' - ? 100 - : 50 + guild.premiumTier === 'TIER_3' ? 500 : guild.premiumTier === 'TIER_2' ? 300 : guild.premiumTier === 'TIER_1' ? 100 : 50 }`, `**Stickers:** ${guild.stickers.cache.size?.toLocaleString() ?? 0} / ${ guild.premiumTier === 'TIER_3' ? 60 : guild.premiumTier === 'TIER_2' ? 30 : guild.premiumTier === 'TIER_1' ? 15 : 0 diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index b3c8a67..7969875 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -92,11 +92,7 @@ export default class UserInfoCommand extends BushCommand { premiumSinceDelta = member && member.premiumSince ? util.dateDelta(member.premiumSince, 2) : undefined; // General Info - const generalInfo = [ - `**Mention:** <@${user.id}>`, - `**ID:** ${user.id}`, - `**Created:** ${createdAt} (${createdAtDelta} ago)` - ]; + 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({ dynamic: true, format: 'png', size: 4096 })})`); const pronouns = await util.getPronounsOf(user); @@ -114,10 +110,7 @@ export default class UserInfoCommand extends BushCommand { if (member?.displayHexColor) serverUserInfo.push(`**Display Color:** ${member.displayHexColor}`); if (user.id == '322862723090219008' && message.guild?.id == client.consts.mappings.guilds.bush) serverUserInfo.push(`**General Deletions:** 1⅓`); - if ( - ['384620942577369088', '496409778822709251'].includes(user.id) && - message.guild?.id == client.consts.mappings.guilds.bush - ) + if (['384620942577369088', '496409778822709251'].includes(user.id) && message.guild?.id == client.consts.mappings.guilds.bush) serverUserInfo.push(`**General Deletions:** ⅓`); if (member?.nickname) serverUserInfo.push(`**Nickname:** ${member?.nickname}`); if (serverUserInfo.length) diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index faaf201..588456b 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -1,13 +1,4 @@ -import { - AllowedMentions, - BushCommand, - BushGuild, - BushMessage, - BushSlashMessage, - BushUser, - CanvasProgressBar, - Level -} from '@lib'; +import { AllowedMentions, BushCommand, BushGuild, BushMessage, BushSlashMessage, BushUser, CanvasProgressBar, Level } from '@lib'; import canvas from 'canvas'; import { MessageAttachment } from 'discord.js'; import got from 'got/dist/source'; diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index e085a8e..18138bc 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -54,8 +54,7 @@ export default class SetLevelCommand extends BushCommand { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a guild.`); if (!user.id) throw new Error('user.id is null'); - if (isNaN(level)) - return await message.util.reply(`${util.emojis.error} Provide a valid number to set the user's level to.`); + if (isNaN(level)) return await message.util.reply(`${util.emojis.error} Provide a valid number to set the user's level to.`); if (level > 6553 || level < 0) return await message.util.reply(`${util.emojis.error} You cannot set a level higher than \`6553\`.`); diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index 0a297de..8dc65f3 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -63,17 +63,12 @@ export default class EvidenceCommand extends BushCommand { ) { const entry = await ModLog.findByPk(caseID); if (!entry || entry.pseudo) return message.util.send(`${util.emojis.error} Invalid modlog entry.`); - if (entry.guild !== message.guild!.id) - return message.util.reply(`${util.emojis.error} This modlog is from another server.`); + if (entry.guild !== message.guild!.id) return message.util.reply(`${util.emojis.error} This modlog is from another server.`); if (evidence && (message as BushMessage).attachments?.size) return message.util.reply(`${util.emojis.error} Please either attach an image or a reason not both.`); - const _evidence = evidence - ? evidence - : !message.util.isSlash - ? (message as BushMessage).attachments.first()?.url - : undefined; + const _evidence = evidence ? evidence : !message.util.isSlash ? (message as BushMessage).attachments.first()?.url : undefined; if (!_evidence) return message.util.reply(`${util.emojis.error} You must provide evidence for this modlog.`); const oldEntry = entry.evidence; diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index a873784..693197a 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -38,8 +38,7 @@ export default class HideCaseCommand extends BushCommand { public override async exec(message: BushMessage | BushSlashMessage, { case_id: caseID }: { case_id: string }) { const entry = await ModLog.findByPk(caseID); if (!entry || entry.pseudo) return message.util.send(`${util.emojis.error} Invalid entry.`); - if (entry.guild !== message.guild!.id) - return message.util.reply(`${util.emojis.error} This modlog is from another server.`); + if (entry.guild !== message.guild!.id) return message.util.reply(`${util.emojis.error} This modlog is from another server.`); const action = entry.hidden ? 'no longer hidden' : 'now hidden'; const oldEntry = entry.hidden; entry.hidden = !entry.hidden; diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 34c1b76..dab6807 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -62,9 +62,7 @@ export default class KickCommand extends BushCommand { const member = await message.guild!.members.fetch(user.id); if (!member) - return await message.util.reply( - `${util.emojis.error} The user you selected is not in the server or is not a valid user.` - ); + return await message.util.reply(`${util.emojis.error} The user you selected is not in the server or is not a valid user.`); if (!message.member) throw new Error(`message.member is null`); const useForce = force && message.author.isOwner(); const canModerateResponse = await Moderation.permissionCheck(message.member, member, 'kick', true, useForce); diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 844809b..6f594a0 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -69,9 +69,7 @@ export default class MuteCommand extends BushCommand { if (reason.duration === null) reason.duration = 0; const member = await message.guild!.members.fetch(args.user.id).catch(() => null); if (!member) - return await message.util.reply( - `${util.emojis.error} The user you selected is not in the server or is not a valid user.` - ); + return await message.util.reply(`${util.emojis.error} The user you selected is not in the server or is not a valid user.`); if (!message.member) throw new Error(`message.member is null`); const useForce = args.force && message.author.isOwner(); diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts index d5d8531..3590d9f 100644 --- a/src/commands/moulberry-bush/capes.ts +++ b/src/commands/moulberry-bush/capes.ts @@ -52,7 +52,12 @@ export default class CapesCommand extends BushCommand { const capes1: { name: string; url: string; index: number; purchasable?: boolean }[] = []; client.consts.mappings.capes.forEach((mapCape) => { if (!capes.some((gitCape) => gitCape.match!.groups!.name === mapCape.name) && mapCape.custom) { - capes1.push({ name: mapCape.name, url: mapCape.custom, index: mapCape.index, purchasable: mapCape.purchasable }); + capes1.push({ + name: mapCape.name, + url: mapCape.custom, + index: mapCape.index, + purchasable: mapCape.purchasable + }); } }); capes.forEach((gitCape) => { @@ -92,12 +97,7 @@ export default class CapesCommand extends BushCommand { } } - private makeEmbed(cape: { - name: string; - url: string; - index: number; - purchasable?: boolean | undefined; - }): MessageEmbedOptions { + private makeEmbed(cape: { name: string; url: string; index: number; purchasable?: boolean | undefined }): MessageEmbedOptions { return { title: `${cape.name} cape`, color: util.colors.default, diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index 42745bb..fa421f5 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -32,8 +32,7 @@ const rules = [ }, { title: '7.) Impersonation', - description: - 'Do not try to impersonate others for the express intent of being deceitful, defamation , and/or personal gain.' + description: 'Do not try to impersonate others for the express intent of being deceitful, defamation , and/or personal gain.' }, { title: '8.) Swearing', description: 'Swearing is allowed only when not used as an insult.' }, { diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index a2ca3e2..455bbf3 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -97,7 +97,10 @@ export default class YouTubeCommand extends BushCommand { description: 'What activity would you like to play?', type: 'STRING', required: true, - choices: Object.keys(activityMap).map((key) => ({ name: key, value: activityMap[key as keyof typeof activityMap] })) + choices: Object.keys(activityMap).map((key) => ({ + name: key, + value: activityMap[key as keyof typeof activityMap] + })) } ], clientPermissions: (m) => util.clientSendAndPermCheck(m), diff --git a/src/commands/utilities/calculator.ts b/src/commands/utilities/calculator.ts index 861a356..b32b29b 100644 --- a/src/commands/utilities/calculator.ts +++ b/src/commands/utilities/calculator.ts @@ -38,10 +38,7 @@ export default class CalculatorCommand extends BushCommand { }); } public override async exec(message: BushMessage | BushSlashMessage, args: { expression: string }) { - const decodedEmbed = new MessageEmbed().addField( - '📥 Input', - await util.inspectCleanRedactCodeblock(args.expression, 'mma') - ); + const decodedEmbed = new MessageEmbed().addField('📥 Input', await util.inspectCleanRedactCodeblock(args.expression, 'mma')); try { const calculated = /^(9\s*?\+\s*?10)|(10\s*?\+\s*?9)$/.test(args.expression) ? '21' : evaluate(args.expression); decodedEmbed diff --git a/src/commands/utilities/suicide.ts b/src/commands/utilities/suicide.ts index 3709e37..8d6f002 100644 --- a/src/commands/utilities/suicide.ts +++ b/src/commands/utilities/suicide.ts @@ -49,7 +49,11 @@ export default class TemplateCommand extends BushCommand { // If the original message was a reply -> imitate it !message.util.isSlashMessage(message) && message.reference?.messageId && message.guild && message.channel ? await message.channel.messages.fetch(message.reference!.messageId!).then(async (message1) => { - await message1.reply({ embeds: [suicideEmbed], allowedMentions: AllowedMentions.users(), target: message1 }); + await message1.reply({ + embeds: [suicideEmbed], + allowedMentions: AllowedMentions.users(), + target: message1 + }); }) : await message.util.send({ embeds: [suicideEmbed], allowedMentions: AllowedMentions.users() }) ); diff --git a/src/lib/common/Moderation.ts b/src/lib/common/Moderation.ts index 29d66fa..0c7c21a 100644 --- a/src/lib/common/Moderation.ts +++ b/src/lib/common/Moderation.ts @@ -107,8 +107,7 @@ export class Moderation { if (!getCaseNumber) return { log: saveResult, caseNum: null }; - const caseNum = (await ModLog.findAll({ where: { type: options.type, user: user, guild: guild, hidden: 'false' } })) - ?.length; + const caseNum = (await ModLog.findAll({ where: { type: options.type, user: user, guild: guild, hidden: 'false' } }))?.length; return { log: saveResult, caseNum }; } diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts index fb4f84c..b993215 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts @@ -28,15 +28,9 @@ export class BushApplicationCommandManager< data: ApplicationCommandData, guildId: Snowflake ): Promise<BushApplicationCommand>; - public fetch( - id: Snowflake, - options: FetchApplicationCommandOptions & { guildId: Snowflake } - ): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options: FetchApplicationCommandOptions & { guildId: Snowflake }): Promise<BushApplicationCommand>; public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>; - public fetch( - id?: Snowflake, - options?: FetchApplicationCommandOptions - ): Promise<Collection<Snowflake, ApplicationCommandScope>>; + public fetch(id?: Snowflake, options?: FetchApplicationCommandOptions): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>; private static transformCommand( diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts index 56cdb75..b307bbc 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts @@ -10,14 +10,7 @@ import { BushGuildMember } from './BushGuildMember'; import { BushRole } from './BushRole'; import { BushUser } from './BushUser'; -export type BushGuildResolvable = - | BushGuild - | BushGuildChannel - | BushGuildMember - | BushGuildEmoji - | Invite - | BushRole - | Snowflake; +export type BushGuildResolvable = BushGuild | BushGuildChannel | BushGuildMember | BushGuildEmoji | Invite | BushRole | Snowflake; export class BushCommandInteraction extends CommandInteraction { public constructor(client: BushClient, data: RawCommandInteractionData) { diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 51c2795..487ff9a 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -77,9 +77,7 @@ export class BushGuild extends Guild { duration?: number; deleteDays?: number; evidence?: string; - }): Promise< - 'success' | 'missing permissions' | 'error banning' | 'error creating modlog entry' | 'error creating ban entry' - > { + }): Promise<'success' | 'missing permissions' | 'error banning' | 'error creating modlog entry' | 'error creating ban entry'> { // checks if (!this.me!.permissions.has('BAN_MEMBERS')) return 'missing permissions'; diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts index 34054c8..b23ff33 100644 --- a/src/lib/extensions/discord.js/BushGuildMember.ts +++ b/src/lib/extensions/discord.js/BushGuildMember.ts @@ -95,11 +95,7 @@ export class BushGuildMember extends GuildMember { : undefined; const dmSuccess = await this.send({ content: `You have been ${punishment} in **${this.guild.name}** ${ - duration !== null && duration !== undefined - ? duration - ? `for ${util.humanizeDuration(duration)} ` - : 'permanently ' - : '' + duration !== null && duration !== undefined ? (duration ? `for ${util.humanizeDuration(duration)} ` : 'permanently ') : '' }for **${reason?.trim() ?? 'No reason provided'}**.`, embeds: dmEmbed ? [dmEmbed] : undefined }).catch(() => false); @@ -231,10 +227,7 @@ export class BushGuildMember extends GuildMember { return 'success'; })(); - if ( - !['error removing role', 'error creating modlog entry', 'error removing role entry'].includes(ret) && - options.addToModlog - ) + if (!['error removing role', 'error creating modlog entry', 'error removing role entry'].includes(ret) && options.addToModlog) client.emit( 'bushPunishRoleRemove', this, diff --git a/src/listeners/client/interactionCreate.ts b/src/listeners/client/interactionCreate.ts index be6cede..40c7628 100644 --- a/src/listeners/client/interactionCreate.ts +++ b/src/listeners/client/interactionCreate.ts @@ -21,8 +21,7 @@ export default class InteractionCreateListener extends BushListener { return; } else if (interaction.isButton()) { if (interaction.customId.startsWith('paginate_') || interaction.customId.startsWith('command_')) return; - else if (interaction.customId.startsWith('automod;')) - void AutoMod.handleInteraction(interaction as BushButtonInteraction); + else if (interaction.customId.startsWith('automod;')) void AutoMod.handleInteraction(interaction as BushButtonInteraction); else return await interaction.reply({ content: 'Buttons go brrr', ephemeral: true }); } else if (interaction.isSelectMenu()) { if (interaction.customId.startsWith('command_')) return; diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 61fe206..f29c7e0 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -144,8 +144,7 @@ export default class CommandErrorListener extends BushListener { `**Channel:** <#${options.message.channel?.id}> (${options.channel})`, `**Message:** [link](${options.message.url})` ); - if (options.message?.util?.parsed?.content) - description.push(`**Command Content:** ${options.message.util.parsed.content}`); + if (options.message?.util?.parsed?.content) description.push(`**Command Content:** ${options.message.util.parsed.content}`); } description.push(...options.haste); diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 0bbf916..c8a3a6e 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -41,9 +41,9 @@ export default class CommandMissingPermissionsListener extends BushListener { } else if (type == 'user') { return await message.util .reply( - `${util.emojis.error} You are missing the ${discordFormat} permission${ - missing.length ? 's' : '' - } required for the **${command?.id}** command.` + `${util.emojis.error} You are missing the ${discordFormat} permission${missing.length ? 's' : ''} required for the **${ + command?.id + }** command.` ) .catch(() => {}); } diff --git a/src/listeners/custom/bushUpdateSettings.ts b/src/listeners/custom/bushUpdateSettings.ts index b95c077..39e76c7 100644 --- a/src/listeners/custom/bushUpdateSettings.ts +++ b/src/listeners/custom/bushUpdateSettings.ts @@ -17,10 +17,7 @@ export default class BushUpdateSettingsListener extends BushListener { const logEmbed = new MessageEmbed().setColor(util.colors.discord.BLURPLE).setTimestamp(); if (moderator) - logEmbed.setAuthor( - moderator.user.tag, - moderator.user.avatarURL({ dynamic: true, format: 'png', size: 4096 }) ?? undefined - ); + logEmbed.setAuthor(moderator.user.tag, moderator.user.avatarURL({ dynamic: true, format: 'png', size: 4096 }) ?? undefined); logEmbed.addField('**Action**', `${'Update Settings'}`); if (moderator) logEmbed.addField('**Moderator**', `${moderator} (${moderator.user.tag})`); logEmbed diff --git a/src/listeners/guild/guildCreate.ts b/src/listeners/guild/guildCreate.ts index 68e9216..622958f 100644 --- a/src/listeners/guild/guildCreate.ts +++ b/src/listeners/guild/guildCreate.ts @@ -10,10 +10,7 @@ export default class GuildCreateListener extends BushListener { } public override async exec(...[guild]: BushClientEvents['guildCreate']) { - void client.console.info( - 'guildCreate', - `Joined <<${guild.name}>> with <<${guild.memberCount?.toLocaleString()}>> members.` - ); + void client.console.info('guildCreate', `Joined <<${guild.name}>> with <<${guild.memberCount?.toLocaleString()}>> members.`); const g = await Guild.findByPk(guild.id); if (!g) void Guild.create({ id: guild.id }); } diff --git a/src/listeners/guild/guildMemberAdd.ts b/src/listeners/guild/guildMemberAdd.ts index 2b964f4..295b889 100644 --- a/src/listeners/guild/guildMemberAdd.ts +++ b/src/listeners/guild/guildMemberAdd.ts @@ -110,9 +110,7 @@ export default class GuildMemberAddListener extends BushListener { () => void client.console.warn( 'guildMemberAdd', - `Failed to assign join roles to <<${util.sanitizeWtlAndControl(member.user.tag)}>>, in <<${ - member.guild.name - }>>.` + `Failed to assign join roles to <<${util.sanitizeWtlAndControl(member.user.tag)}>>, in <<${member.guild.name}>>.` ) ); } diff --git a/src/listeners/message/autoPublisher.ts b/src/listeners/message/autoPublisher.ts index fa5cb51..a0ae39e 100644 --- a/src/listeners/message/autoPublisher.ts +++ b/src/listeners/message/autoPublisher.ts @@ -20,8 +20,7 @@ export default class autoPublisherListener extends BushListener { () => void client.logger.log('autoPublisher', `Published message <<${message.id}>> in <<${message.guild!.name}>>.`) ) .catch( - () => - void client.console.warn('autoPublisher', `Failed to publish <<${message.id}>> in <<${message.guild!.name}>>.`) + () => void client.console.warn('autoPublisher', `Failed to publish <<${message.id}>> in <<${message.guild!.name}>>.`) ); } } diff --git a/src/tasks/updateSuperUsers.ts b/src/tasks/updateSuperUsers.ts index 19dbb1e..72ae7ab 100644 --- a/src/tasks/updateSuperUsers.ts +++ b/src/tasks/updateSuperUsers.ts @@ -12,8 +12,7 @@ export default class UpdateSuperUsersTask extends BushTask { const superUsers = client.guilds.cache .get(client.config.supportGuild.id) ?.members.cache.filter( - (member) => - (member.roles.cache.has('865954009280938056') || member.permissions.has('ADMINISTRATOR')) && !member.user.bot + (member) => (member.roles.cache.has('865954009280938056') || member.permissions.has('ADMINISTRATOR')) && !member.user.bot ) .map((member) => member.id); @@ -41,23 +41,23 @@ __metadata: languageName: node linkType: hard -"@discordjs/builders@npm:^0.6.0": - version: 0.6.0 - resolution: "@discordjs/builders@npm:0.6.0" +"@discordjs/builders@npm:^0.7.0": + version: 0.7.0 + resolution: "@discordjs/builders@npm:0.7.0" dependencies: - "@sindresorhus/is": ^4.0.1 - discord-api-types: ^0.22.0 + "@sindresorhus/is": ^4.2.0 + discord-api-types: ^0.24.0 ow: ^0.27.0 ts-mixer: ^6.0.0 tslib: ^2.3.1 - checksum: a6f1517bc9c55a4156eaea8de25b0f8a064923ba93a366c6ba4ae8724a16b35918121759cb4d9097c76457f2d9f2cc583c39809f5ef5d69e11d607bb0fd1bb39 + checksum: d2c090412d25042952e241e88197b77fe8d204b724bf0d5044e2b99a0548517e9d087c688b8342029e8d05bf32b63ff2b656a1e0e70c36eba10674845d9305e4 languageName: node linkType: hard "@discordjs/collection@npm:^0.2.1": - version: 0.2.1 - resolution: "@discordjs/collection@npm:0.2.1" - checksum: e68d4bbf83b03bc18c7648d0f5c5669d1f1a394596bc2fcbb907284cff65657b28dbf165a1b8ccae20b6bc0726bc8a0a276d8adba8f9413502bb19d61b98598f + version: 0.2.4 + resolution: "@discordjs/collection@npm:0.2.4" + checksum: 3333b65b742a876e0fe09faaff1aa5052873a68f15d47baaee39b59364d888e01f12fd04296ab1badb41af87f624bc75eaafa2d6753fdc9c5bf280667f4cb3c2 languageName: node linkType: hard @@ -181,9 +181,9 @@ __metadata: linkType: hard "@sapphire/async-queue@npm:^1.1.5": - version: 1.1.7 - resolution: "@sapphire/async-queue@npm:1.1.7" - checksum: cdfd7819bc0847be3d11e663712d42a3a3b574897fb253274acdbff5433bf4ddba37cf0541233d070cdd6757ce5f565829f36abdd98257507b5a00b727b8abcf + version: 1.1.8 + resolution: "@sapphire/async-queue@npm:1.1.8" + checksum: 6a033c41dd672af51f33c262d7b901dd636b7f9c625022a5efb4da94298b5cea31e1dca8b9ab82d7f9aa124ccd7bca19aef2dde7e09a1dd0f7b179cc3cbbcef4 languageName: node linkType: hard @@ -269,7 +269,7 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.0.1": +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.0.1, @sindresorhus/is@npm:^4.2.0": version: 4.2.0 resolution: "@sindresorhus/is@npm:4.2.0" checksum: 59040dfb75c2eb6ab76e8c7ac10b7f7f6ba740f0b5ac618a89a8bcdbaf923836a8e998078d59d81f6f13f4b6bbe15bfe1bca962c877edcbe9160d1c100c56fd7 @@ -415,9 +415,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^16.10.2": - version: 16.11.4 - resolution: "@types/node@npm:16.11.4" - checksum: 96e08c0f8bb17601c18640a8eac61e2f236fe0c8a6b01a9221c10749157358fb29fdef4b5e264f72559e72f9830e6093f3ab5fef2df90afdad562ffa45ac534c + version: 16.11.6 + resolution: "@types/node@npm:16.11.6" + checksum: 6e19634766ff589d3d2f361c2196b671f8f133cdadc5ad347a621c360d8994b6c4fbccfb2ad9c60c588c593831a96497c9c6b77d2b7e91be723384b94f6368e7 languageName: node linkType: hard @@ -1183,27 +1183,27 @@ __metadata: linkType: hard "discord-akairo@npm:@notenoughupdates/discord-akairo@dev": - version: 9.0.5-dev.1635025624.7dd1846 - resolution: "@notenoughupdates/discord-akairo@npm:9.0.5-dev.1635025624.7dd1846" + version: 9.0.5-dev.1635337140.7dd1846 + resolution: "@notenoughupdates/discord-akairo@npm:9.0.5-dev.1635337140.7dd1846" dependencies: discord-akairo-message-util: "npm:@notenoughupdates/discord-akairo-message-util@latest" lodash: ^4.17.21 source-map-support: ^0.5.20 - checksum: a09082b94e96f9bf89d4be75422aa5f4f957eb5088cc39a8f5f4dcfbfcbfa279f8d3a2504a6aba6a0233813d7ef4c0b3dde261bc5acdb6490717e265bd02f014 + checksum: 5653c7f826b9d1802adaa10a6a6e6d7b559af09bcd7645acdbde3f58ed8f5775a9b3d2559c18364182f6d274b5a730a50460de6d7556ed6293ed5e746ac3dd83 languageName: node linkType: hard -"discord-api-types@npm:0.23.1, discord-api-types@npm:^0.23.1": +"discord-api-types@npm:0.23.1": version: 0.23.1 resolution: "discord-api-types@npm:0.23.1" checksum: e2ea574d51bff9f74770194338ba2b981072c6814a4da4c1e9a6b09b5b6bcf4ecf9044397fd4d2d3bf245f7573f22f1c25ff3f57cfc23ed87dfee4629091c29d languageName: node linkType: hard -"discord-api-types@npm:^0.22.0": - version: 0.22.0 - resolution: "discord-api-types@npm:0.22.0" - checksum: 673bcd960e394d8a3752bb03d50de44e74d508450e3d2cce947a69e0a6dc43c00196e18245c88dd26f3a8b0a56b40e0dbf52e058b7aabc7ed77f0f018003cb04 +"discord-api-types@npm:^0.24.0": + version: 0.24.0 + resolution: "discord-api-types@npm:0.24.0" + checksum: b1a17cb3be4ade974193cedb92fb37e51ba8f1832dfe3ec0d188ba41f255f3dab8359c9d618d32469f1e648126258f9d6ed8828dc1cb50b74d9fd9d875f3390a languageName: node linkType: hard @@ -1215,19 +1215,19 @@ __metadata: linkType: hard "discord.js@npm:@notenoughupdates/discord.js@dev": - version: 13.3.0-dev.1634990840.dfa364c - resolution: "@notenoughupdates/discord.js@npm:13.3.0-dev.1634990840.dfa364c" + version: 13.3.0-dev.1635366804.dbd7d8a + resolution: "@notenoughupdates/discord.js@npm:13.3.0-dev.1635366804.dbd7d8a" dependencies: - "@discordjs/builders": ^0.6.0 + "@discordjs/builders": ^0.7.0 "@discordjs/collection": ^0.2.1 "@discordjs/form-data": ^3.0.1 "@sapphire/async-queue": ^1.1.5 "@types/node-fetch": ^2.5.12 "@types/ws": ^8.2.0 - discord-api-types: ^0.23.1 + discord-api-types: ^0.24.0 node-fetch: ^2.6.1 ws: ^8.2.3 - checksum: aa14f69800f90e832db768a307f3a2997b1fbf441d3597e7c543b7d821e9591762686c2ee8d00278217cfe98f7eac50abd17acafd5bbd4bc044df6b2667e4687 + checksum: 98ec4aac47bd2122adab4352974c1ab81d24ea8cbf894b925b4886a7829bfafa5702c7318d512b9e97326f389e0eb50ae28e247f7b8c40f0a9a8d0cd32cdf7ab languageName: node linkType: hard @@ -1477,9 +1477,9 @@ __metadata: linkType: hard "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.2.0 - resolution: "estraverse@npm:5.2.0" - checksum: ec11b70d946bf5d7f76f91db38ef6f08109ac1b36cda293a26e678e58df4719f57f67b9ec87042afdd1f0267cee91865be3aa48d2161765a93defab5431be7b8 + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 072780882dc8416ad144f8fe199628d2b3e7bbc9989d9ed43795d2c90309a2047e6bc5979d7e2322a341163d22cfad9e21f4110597fe487519697389497e4e2b languageName: node linkType: hard @@ -1689,11 +1689,11 @@ __metadata: linkType: hard "globals@npm:^13.6.0, globals@npm:^13.9.0": - version: 13.11.0 - resolution: "globals@npm:13.11.0" + version: 13.12.0 + resolution: "globals@npm:13.12.0" dependencies: type-fest: ^0.20.2 - checksum: e9e5624154261a3e5344d2105a94886c5f2ca48028fa8258cd7b9119c5f00cf2909392817bb2d162c9a1a31b55d9b2c14e8f2271c45a22f77806f5b9322541cf + checksum: 1f959abb11117916468a1afcba527eead152900cad652c8383c4e8976daea7ec55e1ee30c086f48d1b8655719f214e9d92eca083c3a43b5543bc4056e7e5fccf languageName: node linkType: hard @@ -2926,8 +2926,8 @@ __metadata: linkType: hard "sequelize@npm:^6.6.5": - version: 6.7.0 - resolution: "sequelize@npm:6.7.0" + version: 6.8.0 + resolution: "sequelize@npm:6.8.0" dependencies: debug: ^4.1.1 dottie: ^2.0.0 @@ -2955,7 +2955,7 @@ __metadata: optional: true tedious: optional: true - checksum: 51b865d2ef2a3ac49bb8269b9e2b95fe600ae5a8c35869ba911a518996aa905c2e11743fa8c0cd5d5dba37575d821f96b2c934ff3d795f2eed37f81896086f56 + checksum: 250980ee266ff0e75f50c0b45e137d6d94b65440def9e68535feabda394fa8d43caf39d2060eed83d0d742940825cc133719246b9b547391e11c796203451cfa languageName: node linkType: hard |