aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/config/blacklist.ts6
-rw-r--r--src/commands/config/config.ts12
-rw-r--r--src/commands/config/disable.ts3
-rw-r--r--src/commands/dev/test.ts18
-rw-r--r--src/commands/info/guildInfo.ts13
-rw-r--r--src/commands/info/userInfo.ts11
-rw-r--r--src/commands/leveling/level.ts11
-rw-r--r--src/commands/leveling/setLevel.ts3
-rw-r--r--src/commands/moderation/evidence.ts9
-rw-r--r--src/commands/moderation/hideCase.ts3
-rw-r--r--src/commands/moderation/kick.ts4
-rw-r--r--src/commands/moderation/mute.ts4
-rw-r--r--src/commands/moulberry-bush/capes.ts14
-rw-r--r--src/commands/moulberry-bush/rule.ts3
-rw-r--r--src/commands/utilities/activity.ts5
-rw-r--r--src/commands/utilities/calculator.ts5
-rw-r--r--src/commands/utilities/suicide.ts6
-rw-r--r--src/lib/common/Moderation.ts3
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts10
-rw-r--r--src/lib/extensions/discord.js/BushCommandInteraction.ts9
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts4
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts11
-rw-r--r--src/listeners/client/interactionCreate.ts3
-rw-r--r--src/listeners/commands/commandError.ts3
-rw-r--r--src/listeners/commands/commandMissingPermissions.ts6
-rw-r--r--src/listeners/custom/bushUpdateSettings.ts5
-rw-r--r--src/listeners/guild/guildCreate.ts5
-rw-r--r--src/listeners/guild/guildMemberAdd.ts4
-rw-r--r--src/listeners/message/autoPublisher.ts3
-rw-r--r--src/tasks/updateSuperUsers.ts3
30 files changed, 67 insertions, 132 deletions
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);