aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands/config/config.ts18
-rw-r--r--src/commands/config/features.ts4
-rw-r--r--src/commands/dev/eval.ts10
-rw-r--r--src/commands/dev/javascript.ts9
-rw-r--r--src/commands/dev/sh.ts12
-rw-r--r--src/commands/dev/test.ts18
-rw-r--r--src/commands/info/botInfo.ts4
-rw-r--r--src/commands/info/color.ts4
-rw-r--r--src/commands/info/guildInfo.ts6
-rw-r--r--src/commands/info/help.ts70
-rw-r--r--src/commands/info/links.ts6
-rw-r--r--src/commands/info/ping.ts4
-rw-r--r--src/commands/info/snowflake.ts12
-rw-r--r--src/commands/info/userInfo.ts20
-rw-r--r--src/commands/moulberry-bush/report.ts6
-rw-r--r--src/commands/moulberry-bush/rule.ts5
-rw-r--r--src/commands/moulberry-bush/serverStatus.ts14
-rw-r--r--src/commands/utilities/calculator.ts27
-rw-r--r--src/commands/utilities/decode.ts14
-rw-r--r--src/commands/utilities/highlight-show.ts36
-rw-r--r--src/commands/utilities/price.ts14
-rw-r--r--src/commands/utilities/suicide.ts4
-rw-r--r--src/commands/utilities/wolframAlpha.ts29
-rw-r--r--src/lib/common/ButtonPaginator.ts4
-rw-r--r--src/lib/common/ConfirmationPrompt.ts4
-rw-r--r--src/lib/common/DeleteButton.ts4
-rw-r--r--src/listeners/bush/appealListener.ts16
-rw-r--r--src/listeners/guild-custom/bushLockdown.ts4
-rw-r--r--src/listeners/guild-custom/bushUnlockdown.ts4
-rw-r--r--src/listeners/member-custom/bushBan.ts8
-rw-r--r--src/listeners/member-custom/bushBlock.ts8
-rw-r--r--src/listeners/member-custom/bushKick.ts6
-rw-r--r--src/listeners/member-custom/bushMute.ts8
-rw-r--r--src/listeners/member-custom/bushPunishRole.ts6
-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.ts6
-rw-r--r--src/listeners/member-custom/bushTimeout.ts6
-rw-r--r--src/listeners/member-custom/bushUnban.ts6
-rw-r--r--src/listeners/member-custom/bushUnblock.ts6
-rw-r--r--src/listeners/member-custom/bushUnmute.ts6
-rw-r--r--src/listeners/member-custom/bushUpdateModlog.ts6
-rw-r--r--src/listeners/member-custom/bushUpdateSettings.ts8
-rw-r--r--src/listeners/member-custom/bushWarn.ts8
-rw-r--r--src/listeners/message/directMessage.ts2
-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.ts4
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncUnban.ts6
-rw-r--r--src/listeners/ws/INTERACTION_CREATE.ts4
50 files changed, 235 insertions, 271 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index 66e10b6..c562add 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -320,7 +320,7 @@ export default class ConfigCommand extends BushCommand {
const desc = settingsArr.map((s) => `:wrench: **${guildSettingsObj[s].name}**`).join('\n');
settingsEmbed.setDescription(desc);
- const selMenu = new ActionRowBuilder<SelectMenuBuilder>().addComponents([
+ const selMenu = new ActionRowBuilder<SelectMenuBuilder>().addComponents(
new SelectMenuBuilder()
.addOptions(
settingsArr.map((s) =>
@@ -334,7 +334,7 @@ export default class ConfigCommand extends BushCommand {
.setMaxValues(1)
.setMinValues(1)
.setCustomId('command_settingsSel')
- ]);
+ );
return { embeds: [settingsEmbed], components: [selMenu] };
} else {
settingsEmbed.setTitle(guildSettingsObj[setting].name);
@@ -367,9 +367,9 @@ export default class ConfigCommand extends BushCommand {
: '[No Value Set]';
};
- const components = new ActionRowBuilder<ButtonBuilder>().addComponents([
+ 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}`
);
@@ -379,12 +379,10 @@ export default class ConfigCommand extends BushCommand {
message.util.isSlash ? snakeCase(setting) : setting
} ${guildSettingsObj[setting].type.includes('-array') ? 'add/remove' : 'set'} <value>" to set this setting.`
});
- settingsEmbed.addFields([
- {
- name: 'value',
- value: (await generateCurrentValue(guildSettingsObj[setting].type)) || '[No Value Set]'
- }
- ]);
+ settingsEmbed.addFields({
+ name: 'value',
+ value: (await generateCurrentValue(guildSettingsObj[setting].type)) || '[No Value Set]'
+ });
return { embeds: [settingsEmbed], components: [components] };
}
}
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index e119936..5eafb0c 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -86,7 +86,7 @@ export default class FeaturesCommand extends BushCommand {
}
public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) {
- return new ActionRowBuilder<SelectMenuBuilder>().addComponents([
+ return new ActionRowBuilder<SelectMenuBuilder>().addComponents(
new SelectMenuBuilder({
customId: 'command_selectFeature',
disabled: disable,
@@ -100,6 +100,6 @@ export default class FeaturesCommand extends BushCommand {
description: guildFeaturesObj[f].description
}))
})
- ]);
+ );
}
}
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 2be2963..ab7787d 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -262,8 +262,8 @@ export default class EvalCommand extends BushCommand {
embed.setTimestamp();
- if (inputTS) embed.addFields([{ name: ':inbox_tray: Input (typescript)', value: inputTS }]);
- embed.addFields([{ name: `:inbox_tray: Input${inputTS ? ' (transpiled javascript)' : ''}`, value: inputJS }]);
+ if (inputTS) embed.addFields({ name: ':inbox_tray: Input (typescript)', value: inputTS });
+ embed.addFields({ name: `:inbox_tray: Input${inputTS ? ' (transpiled javascript)' : ''}`, value: inputJS });
const output = await this.codeblock(rawResult, 'js', {
depth: selDepth ?? 0,
@@ -279,10 +279,10 @@ export default class EvalCommand extends BushCommand {
embed
.setTitle(`${emojis[err ? 'errorFull' : 'successFull']} ${err ? 'Uns' : 'S'}uccessfully Evaluated Expression`)
.setColor(colors[err ? 'error' : 'success'])
- .addFields([{ name: `:outbox_tray: ${err ? 'Error' : 'Output'}`, value: output }]);
+ .addFields({ name: `:outbox_tray: ${err ? 'Error' : 'Output'}`, value: output });
- if (!err && methods) embed.addFields([{ name: ':wrench: Methods', value: methods }]);
- if (!err && proto) embed.addFields([{ name: ':gear: Proto', value: proto }]);
+ if (!err && methods) embed.addFields({ name: ':wrench: Methods', value: methods });
+ if (!err && proto) embed.addFields({ name: ':gear: Proto', value: proto });
if (!silent || message.util.isSlashMessage(message)) {
await message.util.reply({ content: null, embeds: [embed] });
diff --git a/src/commands/dev/javascript.ts b/src/commands/dev/javascript.ts
index e472a5a..6b6c7e1 100644
--- a/src/commands/dev/javascript.ts
+++ b/src/commands/dev/javascript.ts
@@ -73,16 +73,13 @@ export default class JavascriptCommand extends BushCommand {
});
embed.setTitle(`${emojis.successFull} Successfully Evaluated Expression`).setColor(colors.success);
- embed.addFields([
- { name: '📥 Input', value: input },
- { name: '📤 Output', value: output }
- ]);
+ embed.addFields({ name: '📥 Input', value: input }, { name: '📤 Output', value: output });
} catch (e) {
embed.setTitle(`${emojis.errorFull} Unable to Evaluate Expression`).setColor(colors.error);
- embed.addFields([
+ embed.addFields(
{ name: '📥 Input', value: input },
{ name: '📤 Error', value: await this.client.utils.inspectCleanRedactCodeblock(e, 'js', { colors: false }) }
- ]);
+ );
}
embed.setTimestamp().setFooter({ text: message.author.tag, iconURL: message.author.displayAvatarURL() ?? undefined });
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts
index 7ffdf27..1b9ce22 100644
--- a/src/commands/dev/sh.ts
+++ b/src/commands/dev/sh.ts
@@ -59,10 +59,10 @@ export default class ShCommand extends BushCommand {
.setFooter({ text: message.author.tag, iconURL: message.author.avatarURL() ?? undefined })
.setTimestamp()
.setTitle('Shell Command')
- .addFields([
+ .addFields(
{ name: '📥 Input', value: await this.client.utils.codeblock(input, 1024, 'sh', true) },
{ name: 'Running', value: emojis.loading }
- ]);
+ );
await message.util.reply({ embeds: [embed] });
@@ -80,14 +80,12 @@ export default class ShCommand extends BushCommand {
embed.setTitle(`${emojis.successFull} Executed command successfully.`).setColor(colors.success).spliceFields(1, 1);
- if (stdout) embed.addFields([{ name: '📤 stdout', value: await this.client.utils.codeblock(stdout, 1024, 'ansi', true) }]);
- if (stderr) embed.addFields([{ name: '📤 stderr', value: await this.client.utils.codeblock(stderr, 1024, 'ansi', true) }]);
+ if (stdout) embed.addFields({ name: '📤 stdout', value: await this.client.utils.codeblock(stdout, 1024, 'ansi', true) });
+ if (stderr) embed.addFields({ name: '📤 stderr', value: await this.client.utils.codeblock(stderr, 1024, 'ansi', true) });
} catch (e) {
embed.setTitle(`${emojis.errorFull} An error occurred while executing.`).setColor(colors.error).spliceFields(1, 1);
- embed.addFields([
- { name: '📤 Output', value: await this.client.utils.codeblock(formatError(e, true), 1024, 'ansi', true) }
- ]);
+ embed.addFields({ name: '📤 Output', value: await this.client.utils.codeblock(formatError(e, true), 1024, 'ansi', true) });
}
await message.util.edit({ embeds: [embed] });
}
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 600aeac..ac0ad83 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -62,17 +62,17 @@ export default class TestCommand extends BushCommand {
if (args.feature) {
if (['button', 'buttons'].includes(args.feature?.toLowerCase())) {
- const buttonRow = new ActionRowBuilder<ButtonBuilder>().addComponents([
+ const buttonRow = new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'primaryButton', label: 'Primary' }),
new ButtonBuilder({ style: ButtonStyle.Secondary, customId: 'secondaryButton', label: 'Secondary' }),
new ButtonBuilder({ style: ButtonStyle.Success, customId: 'successButton', label: 'Success' }),
new ButtonBuilder({ style: ButtonStyle.Danger, customId: 'dangerButton', label: 'Danger' }),
new ButtonBuilder({ style: ButtonStyle.Link, label: 'Link', url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' })
- ]);
+ );
return await message.util.reply({ content: 'buttons', components: [buttonRow] });
} else if (['embed', 'button embed'].includes(args.feature?.toLowerCase())) {
const embed = new EmbedBuilder()
- .addFields([{ name: 'Field Name', value: 'Field Content' }])
+ .addFields({ name: 'Field Name', value: 'Field Content' })
.setAuthor({ name: 'Author', iconURL: 'https://www.w3schools.com/w3css/img_snowtops.jpg', url: 'https://google.com/' })
.setColor(message.member?.displayColor ?? colors.default)
.setDescription('Description')
@@ -85,9 +85,9 @@ export default class TestCommand extends BushCommand {
)
.setTitle('Title');
- const buttonRow = new ActionRowBuilder<ButtonBuilder>().addComponents([
+ const buttonRow = new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({ style: ButtonStyle.Link, label: 'Link', url: 'https://google.com/' })
- ]);
+ );
return await message.util.reply({ content: 'Test', embeds: [embed], components: [buttonRow] });
} else if (['lots of buttons'].includes(args.feature?.toLowerCase())) {
const buttonRows: ActionRowBuilder<ButtonBuilder>[] = [];
@@ -96,7 +96,7 @@ export default class TestCommand extends BushCommand {
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
const button = new ButtonBuilder({ style: ButtonStyle.Primary, customId: id, label: id });
- row.addComponents([button]);
+ row.addComponents(button);
}
buttonRows.push(row);
}
@@ -128,7 +128,7 @@ export default class TestCommand extends BushCommand {
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
const button = new ButtonBuilder({ style: ButtonStyle.Secondary, customId: id, label: id });
- row.addComponents([button]);
+ row.addComponents(button);
}
ButtonRows.push(row);
}
@@ -159,9 +159,9 @@ export default class TestCommand extends BushCommand {
const m = await message.util.reply({
content: 'Click for modal',
components: [
- new ActionRowBuilder<ButtonBuilder>().addComponents([
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({ style: ButtonStyle.Primary, label: 'Modal', customId: 'test;modal' })
- ])
+ )
]
});
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index 25b860c..f284e0f 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -49,7 +49,7 @@ export default class BotInfoCommand extends BushCommand {
if (repoUrl.includes('.git')) repoUrl = repoUrl.substring(0, repoUrl.length - 4);
const embed = new EmbedBuilder()
.setTitle('Bot Info:')
- .addFields([
+ .addFields(
{ name: '**Uptime**', value: humanizeDuration(this.client.uptime!, 2), inline: true },
{
name: '**Memory Usage**',
@@ -79,7 +79,7 @@ export default class BotInfoCommand extends BushCommand {
inline: true
},
{ name: '**Developers**', value: developers, inline: true }
- ])
+ )
.setTimestamp()
.setColor(colors.default);
await message.util.reply({ embeds: [embed] });
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 84c4b3c..7286c5c 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -63,12 +63,12 @@ export default class ColorCommand extends BushCommand {
}
const embed = new EmbedBuilder()
- .addFields([
+ .addFields(
{ name: '» Hexadecimal', value: color.toHexString() },
{ name: '» Decimal', value: `${parseInt(color.toHex(), 16)}` },
{ name: '» HSL', value: this.removePrefixAndParenthesis(color.toHslString()) },
{ name: '» RGB', value: this.removePrefixAndParenthesis(color.toRgbString()) }
- ])
+ )
.setColor(parseInt(color.toHex(), 16));
return await message.util.reply({ embeds: [embed] });
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index 060a439..dd5704f 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -168,7 +168,7 @@ export default class GuildInfoCommand extends BushCommand {
);
}
- embed.addFields([{ name: '» About', value: guildAbout.join('\n') }]);
+ embed.addFields({ name: '» About', value: guildAbout.join('\n') });
}
private generateStatsField(embed: EmbedBuilder, guild: Guild | GuildPreview) {
@@ -213,7 +213,7 @@ export default class GuildInfoCommand extends BushCommand {
`**Stickers:** ${guild.stickers.cache.size?.toLocaleString() ?? 0} / ${StickerTierMap[guild.premiumTier]}`
);
- embed.addFields([{ name: '» Stats', value: guildStats.join('\n') }]);
+ embed.addFields({ name: '» Stats', value: guildStats.join('\n') });
}
private generateSecurityField(embed: EmbedBuilder, guild: Guild | GuildPreview) {
@@ -228,7 +228,7 @@ export default class GuildInfoCommand extends BushCommand {
`**2FA Required:** ${guild.mfaLevel === GuildMFALevel.Elevated ? 'True' : 'False'}`
);
- embed.addFields([{ name: '» Security', value: guildSecurity.join('\n') }]);
+ embed.addFields({ name: '» Security', value: guildSecurity.join('\n') });
}
}
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 1a19969..ec079e7 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -103,7 +103,7 @@ export default class HelpCommand extends BushCommand {
.replace(/'(S)/g, (letter) => letter.toLowerCase());
const categoryCommands = categoryFilter.filter((cmd) => cmd.aliases.length > 0).map((cmd) => `\`${cmd.aliases[0]}\``);
if (categoryCommands.length > 0) {
- embed.addFields([{ name: `${categoryNice}`, value: `${categoryCommands.join(' ')}` }]);
+ embed.addFields({ name: `${categoryNice}`, value: `${categoryCommands.join(' ')}` });
}
}
return message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined });
@@ -129,34 +129,28 @@ export default class HelpCommand extends BushCommand {
private addCommandUsage(embed: EmbedBuilder, command: BushCommand) {
if (command.usage?.length) {
- embed.addFields([
- {
- name: `» Usage${command.usage.length > 1 ? 's' : ''}`,
- value: command.usage.map((u) => `\`${u}\``).join('\n')
- }
- ]);
+ embed.addFields({
+ name: `» Usage${command.usage.length > 1 ? 's' : ''}`,
+ value: command.usage.map((u) => `\`${u}\``).join('\n')
+ });
}
}
private addCommandExamples(embed: EmbedBuilder, command: BushCommand) {
if (command.examples?.length) {
- embed.addFields([
- {
- name: `» Example${command.examples.length > 1 ? 's' : ''}`,
- value: command.examples.map((u) => `\`${u}\``).join('\n')
- }
- ]);
+ embed.addFields({
+ name: `» Example${command.examples.length > 1 ? 's' : ''}`,
+ value: command.examples.map((u) => `\`${u}\``).join('\n')
+ });
}
}
private addCommandAliases(embed: EmbedBuilder, command: BushCommand) {
if (command.aliases?.length > 1)
- embed.addFields([
- {
- name: '» Aliases',
- value: `\`${command.aliases.join('` `')}\``
- }
- ]);
+ embed.addFields({
+ name: '» Aliases',
+ value: `\`${command.aliases.join('` `')}\``
+ });
}
private addCommandArguments(embed: EmbedBuilder, command: BushCommand, isOwner = false, isSuperUser = false) {
@@ -167,26 +161,24 @@ export default class HelpCommand extends BushCommand {
return true;
});
if (args.length) {
- embed.addFields([
- {
- name: '» Arguments',
- value: args
- .map((a) => {
- let ret = stripIndent`
+ embed.addFields({
+ name: '» Arguments',
+ value: args
+ .map((a) => {
+ let ret = stripIndent`
\`${format(a.name, !!a.optional)}\`
⠀‣ **Desc**: ${a.description}
⠀‣ **Type**: ${typeof a.type !== 'function' ? a.type : '[no readable type]'}`;
- if (a.flag?.length) ret += `\n⠀‣ **Flags**: ${a.flag.map((f) => `"${f}"`).join(', ')}`;
- ret += `\n⠀‣ **Kind**: ${a.only ?? 'text & slash'}`;
- if (a.only !== 'slash') ret += `\n⠀‣ **Match**: ${a.match}`;
- if (a.only !== 'text') ret += `\n⠀‣ **Autocomplete**: ${a.autocomplete}`;
+ if (a.flag?.length) ret += `\n⠀‣ **Flags**: ${a.flag.map((f) => `"${f}"`).join(', ')}`;
+ ret += `\n⠀‣ **Kind**: ${a.only ?? 'text & slash'}`;
+ if (a.only !== 'slash') ret += `\n⠀‣ **Match**: ${a.match}`;
+ if (a.only !== 'text') ret += `\n⠀‣ **Autocomplete**: ${a.autocomplete}`;
- return ret;
- })
- .join('\n')
- }
- ]);
+ return ret;
+ })
+ .join('\n')
+ });
}
}
@@ -213,7 +205,7 @@ export default class HelpCommand extends BushCommand {
.map((g) => format.inlineCode(this.client.guilds.cache.find((g1) => g1.id === g)?.name ?? 'Unknown'))
.join(' ')}`
);
- if (restrictions.length) embed.addFields([{ name: '» Restrictions', value: restrictions.join('\n') }]);
+ if (restrictions.length) embed.addFields({ name: '» Restrictions', value: restrictions.join('\n') });
}
}
@@ -221,15 +213,15 @@ export default class HelpCommand extends BushCommand {
const row = new ActionRowBuilder<ButtonBuilder>();
if (!this.client.config.isDevelopment && !this.client.guilds.cache.some((guild) => guild.ownerId === message.author.id)) {
- row.addComponents([new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) })]);
+ row.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) }));
}
if (!this.client.guilds.cache.get(this.client.config.supportGuild.id)?.members.cache.has(message.author.id)) {
- row.addComponents([
+ row.addComponents(
new ButtonBuilder({ style: ButtonStyle.Link, label: 'Support Server', url: this.client.config.supportGuild.invite })
- ]);
+ );
}
if (packageDotJSON?.repository)
- row.addComponents([new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })]);
+ row.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository }));
else void message.channel?.send('Error importing package.json, please report this to my developer.');
return row;
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts
index 23aa411..3671c6c 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -22,12 +22,12 @@ export default class LinksCommand extends BushCommand {
public override async exec(message: CommandMessage | SlashMessage) {
const buttonRow = new ActionRowBuilder<ButtonBuilder>();
if (!this.client.config.isDevelopment || message.author.isOwner()) {
- buttonRow.addComponents([new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) })]);
+ buttonRow.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) }));
}
- buttonRow.addComponents([
+ buttonRow.addComponents(
new ButtonBuilder({ style: ButtonStyle.Link, label: 'Support Server', url: this.client.config.supportGuild.invite }),
new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })
- ]);
+ );
return await message.util.reply({ content: 'Here are some useful links:', components: [buttonRow] });
}
}
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index 060b1f6..484c010 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -34,10 +34,10 @@ export default class PingCommand extends BushCommand {
const apiLatency = format.codeBlock(`${Math.round(message.client.ws.ping)}ms`);
const embed = new EmbedBuilder()
.setTitle('Pong! 🏓')
- .addFields([
+ .addFields(
{ name: 'Bot Latency', value: botLatency, inline: true },
{ name: 'API Latency', value: apiLatency, inline: true }
- ])
+ )
.setFooter({ text: message.author.username, iconURL: message.author.displayAvatarURL() })
.setColor(colors.default)
.setTimestamp();
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index dba1378..f30330a 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -70,7 +70,7 @@ export default class SnowflakeCommand extends BushCommand {
);
snowflakeEmbed.setTitle(`:snowflake: ${escapeMarkdown(channel.name)} \`[Channel]\``);
}
- snowflakeEmbed.addFields([{ name: '» Channel Info', value: channelInfo.join('\n') }]);
+ snowflakeEmbed.addFields({ name: '» Channel Info', value: channelInfo.join('\n') });
}
// Guild
@@ -81,7 +81,7 @@ export default class SnowflakeCommand extends BushCommand {
**Owner:** ${escapeMarkdown(this.client.users.cache.get(guild.ownerId)?.tag ?? '¯\\_(ツ)_/¯')} (${guild.ownerId})
**Members:** ${guild.memberCount?.toLocaleString()}`;
if (guild.icon) snowflakeEmbed.setThumbnail(guild.iconURL({ size: 2048 })!);
- snowflakeEmbed.addFields([{ name: '» Server Info', value: guildInfo }]);
+ snowflakeEmbed.addFields({ name: '» Server Info', value: guildInfo });
snowflakeEmbed.setTitle(`:snowflake: ${escapeMarkdown(guild.name)} \`[Server]\``);
}
@@ -92,7 +92,7 @@ export default class SnowflakeCommand extends BushCommand {
const userInfo = stripIndent`
**Name:** <@${user.id}> (${escapeMarkdown(user.tag)})`;
if (user.avatar) snowflakeEmbed.setThumbnail(user.avatarURL({ size: 2048 })!);
- snowflakeEmbed.addFields([{ name: '» User Info', value: userInfo }]);
+ snowflakeEmbed.addFields({ name: '» User Info', value: userInfo });
snowflakeEmbed.setTitle(`:snowflake: ${escapeMarkdown(user.tag)} \`[User]\``);
}
@@ -103,7 +103,7 @@ export default class SnowflakeCommand extends BushCommand {
**Name:** ${escapeMarkdown(emoji.name ?? '¯\\_(ツ)_/¯')}
**Animated:** ${emoji.animated}`;
if (emoji.url) snowflakeEmbed.setThumbnail(emoji.url);
- snowflakeEmbed.addFields([{ name: '» Emoji Info', value: emojiInfo }]);
+ snowflakeEmbed.addFields({ name: '» Emoji Info', value: emojiInfo });
snowflakeEmbed.setTitle(`:snowflake: ${escapeMarkdown(emoji.name ?? '¯\\_(ツ)_/¯')} \`[Emoji]\``);
}
@@ -118,7 +118,7 @@ export default class SnowflakeCommand extends BushCommand {
**Position:** ${role.position}
**Hex Color:** ${role.hexColor}`;
if (role.color) snowflakeEmbed.setColor(role.color);
- snowflakeEmbed.addFields([{ name: '» Role Info', value: roleInfo }]);
+ snowflakeEmbed.addFields({ name: '» Role Info', value: roleInfo });
snowflakeEmbed.setTitle(`:snowflake: ${escapeMarkdown(role.name)} \`[Role]\``);
}
@@ -130,7 +130,7 @@ export default class SnowflakeCommand extends BushCommand {
**Worker ID:** ${deconstructedSnowflake.workerId}
**Process ID:** ${deconstructedSnowflake.processId}
**Increment:** ${deconstructedSnowflake.increment}`;
- snowflakeEmbed.addFields([{ name: '» Snowflake Info', value: snowflakeInfo }]);
+ snowflakeEmbed.addFields({ name: '» Snowflake Info', value: snowflakeInfo });
return await message.util.reply({ embeds: [snowflakeEmbed] });
}
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 73a0422..3479ea3 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -145,7 +145,7 @@ export default class UserInfoCommand extends BushCommand {
if (pronouns && typeof pronouns === 'string' && pronouns !== 'Unspecified') generalInfo.push(`**Pronouns:** ${pronouns}`);
- embed.addFields([{ name: title, value: generalInfo.join('\n') }]);
+ embed.addFields({ name: title, value: generalInfo.join('\n') });
}
public static generateServerInfoField(embed: EmbedBuilder, member?: GuildMember | undefined, title = '» Server Information') {
@@ -170,7 +170,7 @@ export default class UserInfoCommand extends BushCommand {
)
serverUserInfo.push(`**General Deletions:** ⅓`);
if (member?.nickname) serverUserInfo.push(`**Nickname:** ${escapeMarkdown(member?.nickname)}`);
- if (serverUserInfo.length) embed.addFields([{ name: title, value: serverUserInfo.join('\n') }]);
+ if (serverUserInfo.length) embed.addFields({ name: title, value: serverUserInfo.join('\n') });
}
public static generatePresenceField(embed: EmbedBuilder, member?: GuildMember | undefined, title = '» Presence') {
@@ -198,7 +198,7 @@ export default class UserInfoCommand extends BushCommand {
if (activitiesNames.length)
presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${oxford(activitiesNames, 'and', '')}`);
if (customStatus && customStatus.length) presenceInfo.push(`**Custom Status:** ${escapeMarkdown(customStatus)}`);
- embed.addFields([{ name: title, value: presenceInfo.join('\n') }]);
+ embed.addFields({ name: title, value: presenceInfo.join('\n') });
enum statusEmojis {
online = '787550449435803658',
@@ -223,12 +223,10 @@ export default class UserInfoCommand extends BushCommand {
.map((role) => `${role}`);
const joined = roles.join(', ');
- embed.addFields([
- {
- name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`,
- value: joined.length > 1024 ? 'Too Many Roles to Display' + '...' : joined
- }
- ]);
+ embed.addFields({
+ name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`,
+ value: joined.length > 1024 ? 'Too Many Roles to Display' + '...' : joined
+ });
}
public static generatePermissionsField(
@@ -250,7 +248,7 @@ export default class UserInfoCommand extends BushCommand {
});
}
- if (perms.length) embed.addFields([{ name: title, value: perms.join(' ') }]);
+ if (perms.length) embed.addFields({ name: title, value: perms.join(' ') });
}
public static async generateBotField(embed: EmbedBuilder, user: User, title = '» Bot Information') {
@@ -290,6 +288,6 @@ export default class UserInfoCommand extends BushCommand {
);
}
- if (botInfo.length) embed.addFields([{ name: title, value: botInfo.join('\n') }]);
+ if (botInfo.length) embed.addFields({ name: title, value: botInfo.join('\n') });
}
}
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts
index 47e45f9..13ef2b6 100644
--- a/src/commands/moulberry-bush/report.ts
+++ b/src/commands/moulberry-bush/report.ts
@@ -79,7 +79,7 @@ export default class ReportCommand extends BushCommand {
.setTitle('New Report')
.setColor(colors.red)
.setDescription(evidence)
- .addFields([
+ .addFields(
{
name: 'Reporter',
value: stripIndent`
@@ -97,14 +97,14 @@ export default class ReportCommand extends BushCommand {
**Created:** ${timestampAndDelta(member.user.createdAt)}`,
inline: true
}
- ]);
+ );
if (message.attachments.size > 0) {
const fileName = message.attachments.first()!.name!.toLowerCase();
if (fileName.endsWith('.png') || fileName.endsWith('.jpg') || fileName.endsWith('.gif') || fileName.endsWith('.webp')) {
reportEmbed.setImage(message.attachments.first()!.url);
} else {
- reportEmbed.addFields([{ name: 'Attachment', value: message.attachments.first()!.url }]);
+ reportEmbed.addFields({ name: 'Attachment', value: message.attachments.first()!.url });
}
}
await reportChannel.send({ embeds: [reportEmbed] }).then(async (ReportMessage) => {
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index 574334a..d58b78e 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -123,11 +123,10 @@ export default class RuleCommand extends BushCommand {
}
if (rule) {
if (rules[rule - 1]?.title && rules[rule - 1]?.description)
- rulesEmbed.addFields([{ name: rules[rule - 1].title, value: rules[rule - 1].description }]);
+ rulesEmbed.addFields({ name: rules[rule - 1].title, value: rules[rule - 1].description });
} else {
for (let i = 0; i < rules.length; i++) {
- if (rules[i]?.title && rules[i]?.description)
- rulesEmbed.addFields([{ name: rules[i].title, value: rules[i].description }]);
+ if (rules[i]?.title && rules[i]?.description) rulesEmbed.addFields({ name: rules[i].title, value: rules[i].description });
}
}
await message.util.send({
diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts
index c0c0518..a4d5e45 100644
--- a/src/commands/moulberry-bush/serverStatus.ts
+++ b/src/commands/moulberry-bush/serverStatus.ts
@@ -38,7 +38,7 @@ export default class ServerStatusCommand extends BushCommand {
await message.util.edit({
embeds: [
msgEmbed
- .addFields([{ name: 'Status', value: 'The server is online, all features related to prices will likely work.' }])
+ .addFields({ name: 'Status', value: 'The server is online, all features related to prices will likely work.' })
.setColor(colors.success)
]
});
@@ -46,13 +46,11 @@ export default class ServerStatusCommand extends BushCommand {
await message.util.edit({
embeds: [
msgEmbed
- .addFields([
- {
- name: 'Status',
- value:
- "It appears Moulberry's server is offline, this means that everything related to prices will likely not work."
- }
- ])
+ .addFields({
+ name: 'Status',
+ value:
+ "It appears Moulberry's server is offline, this means that everything related to prices will likely not work."
+ })
.setColor(colors.error)
]
});
diff --git a/src/commands/utilities/calculator.ts b/src/commands/utilities/calculator.ts
index 2204fe6..f0db916 100644
--- a/src/commands/utilities/calculator.ts
+++ b/src/commands/utilities/calculator.ts
@@ -39,30 +39,27 @@ export default class CalculatorCommand extends BushCommand {
}
public override async exec(message: CommandMessage | SlashMessage, args: { expression: string }) {
- const decodedEmbed = new EmbedBuilder().addFields([
- {
- name: '📥 Input',
- value: await this.client.utils.inspectCleanRedactCodeblock(args.expression, 'mma')
- }
- ]);
+ const decodedEmbed = new EmbedBuilder().addFields({
+ name: '📥 Input',
+ value: await this.client.utils.inspectCleanRedactCodeblock(args.expression, 'mma')
+ });
try {
const calculated = /^(9\s*?\+\s*?10)|(10\s*?\+\s*?9)$/.test(args.expression) ? '21' : evaluate(args.expression);
decodedEmbed
.setTitle(`${emojis.successFull} Successfully Calculated Expression`)
.setColor(colors.success)
- .addFields([
- { name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(calculated.toString(), 'mma') }
- ]);
+ .addFields({
+ name: '📤 Output',
+ value: await this.client.utils.inspectCleanRedactCodeblock(calculated.toString(), 'mma')
+ });
} catch (error) {
decodedEmbed
.setTitle(`${emojis.errorFull} Unable to Calculate Expression`)
.setColor(colors.error)
- .addFields([
- {
- name: `📤 Error`,
- value: await this.client.utils.inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js')
- }
- ]);
+ .addFields({
+ name: `📤 Error`,
+ value: await this.client.utils.inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js')
+ });
}
return await message.util.reply({ embeds: [decodedEmbed], allowedMentions: AllowedMentions.none() });
}
diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts
index 6aabeac..065e9e5 100644
--- a/src/commands/utilities/decode.ts
+++ b/src/commands/utilities/decode.ts
@@ -63,19 +63,17 @@ export default class DecodeCommand extends BushCommand {
const encodeOrDecode = capitalize(message?.util?.parsed?.alias ?? 'decoded');
const decodedEmbed = new EmbedBuilder()
.setTitle(`${encodeOrDecode} Information`)
- .addFields([{ name: '📥 Input', value: await this.client.utils.inspectCleanRedactCodeblock(data) }]);
+ .addFields({ name: '📥 Input', value: await this.client.utils.inspectCleanRedactCodeblock(data) });
try {
const decoded = Buffer.from(data, from).toString(to);
decodedEmbed
.setColor(colors.success)
- .addFields([{ name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(decoded) }]);
+ .addFields({ name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(decoded) });
} catch (error) {
- decodedEmbed.setColor(colors.error).addFields([
- {
- name: `📤 Error ${encodeOrDecode.slice(1)}ing`,
- value: await this.client.utils.inspectCleanRedactCodeblock(formatError(error))
- }
- ]);
+ decodedEmbed.setColor(colors.error).addFields({
+ name: `📤 Error ${encodeOrDecode.slice(1)}ing`,
+ value: await this.client.utils.inspectCleanRedactCodeblock(formatError(error))
+ });
}
return await message.util.reply({ embeds: [decodedEmbed], allowedMentions: AllowedMentions.none() });
}
diff --git a/src/commands/utilities/highlight-show.ts b/src/commands/utilities/highlight-show.ts
index 48b4971..301d719 100644
--- a/src/commands/utilities/highlight-show.ts
+++ b/src/commands/utilities/highlight-show.ts
@@ -36,27 +36,23 @@ export default class HighlightShowCommand extends BushCommand {
.setColor(colors.default);
if (highlight.blacklistedChannels.length)
- embed.addFields([
- {
- name: 'Ignored Channels',
- value: highlight.blacklistedChannels
- .map((c) => `<#${c}>`)
- .join('\n')
- .substring(0, 1024),
- inline: true
- }
- ]);
+ embed.addFields({
+ name: 'Ignored Channels',
+ value: highlight.blacklistedChannels
+ .map((c) => `<#${c}>`)
+ .join('\n')
+ .substring(0, 1024),
+ inline: true
+ });
if (highlight.blacklistedUsers.length)
- embed.addFields([
- {
- name: 'Ignored Users',
- value: highlight.blacklistedUsers
- .map((u) => `<@!${u}>`)
- .join('\n')
- .substring(0, 1024),
- inline: true
- }
- ]);
+ embed.addFields({
+ name: 'Ignored Users',
+ value: highlight.blacklistedUsers
+ .map((u) => `<@!${u}>`)
+ .join('\n')
+ .substring(0, 1024),
+ inline: true
+ });
return await message.util.reply({ embeds: [embed], allowedMentions: AllowedMentions.none() });
}
diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts
index c569437..c44b47e 100644
--- a/src/commands/utilities/price.ts
+++ b/src/commands/utilities/price.ts
@@ -86,7 +86,7 @@ export default class PriceCommand extends BushCommand {
// if its a bazaar item then it there should not be any ah data
if (bazaar?.products?.[parsedItem]) {
- priceEmbed.setTitle(`Bazaar Information for ${format.input(parsedItem)}`).addFields([
+ priceEmbed.setTitle(`Bazaar Information for ${format.input(parsedItem)}`).addFields(
{ name: 'Sell Price', value: addBazaarInformation('sellPrice', 2, true) },
{ name: 'Buy Price', value: addBazaarInformation('buyPrice', 2, true) },
{
@@ -97,7 +97,7 @@ export default class PriceCommand extends BushCommand {
},
{ name: 'Current Sell Orders', value: addBazaarInformation('sellOrders', 0, true) },
{ name: 'Current Buy Orders', value: addBazaarInformation('buyOrders', 0, true) }
- ]);
+ );
return await message.util.reply({ embeds: [priceEmbed] });
}
@@ -138,12 +138,10 @@ export default class PriceCommand extends BushCommand {
}
function addPrice(name: string, price: number | undefined) {
if (price)
- priceEmbed.addFields([
- {
- name: name,
- value: price.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
- }
- ]);
+ priceEmbed.addFields({
+ name: name,
+ value: price.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+ });
}
}
diff --git a/src/commands/utilities/suicide.ts b/src/commands/utilities/suicide.ts
index d2510cc..f4c76be 100644
--- a/src/commands/utilities/suicide.ts
+++ b/src/commands/utilities/suicide.ts
@@ -27,7 +27,7 @@ export default class SuicideCommand extends BushCommand {
iconURL:
'https://media.discordapp.net/attachments/770256340639416320/854689949193076737/Medical_31-60_974.jpg?width=523&height=523'
})
- .addFields([
+ .addFields(
{
name: '**National Suicide Prevention Hotline (U.S.):**',
value: stripIndent`
@@ -43,7 +43,7 @@ export default class SuicideCommand extends BushCommand {
For Substance Abuse Support, Eating Disorder Support & Child Abuse and Domestic Violence:
[Click to go to Discord's Health & Safety Page](https://discord.com/safety/360044103771-Mental-health-on-Discord#h_01EGRGT08QSZ5BNCH2E9HN0NYV)`
}
- ]);
+ );
return message.util.send({
embeds: [suicideEmbed],
diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts
index baf764f..3cd0653 100644
--- a/src/commands/utilities/wolframAlpha.ts
+++ b/src/commands/utilities/wolframAlpha.ts
@@ -57,12 +57,10 @@ export default class WolframAlphaCommand extends BushCommand {
args.image && void message.util.reply({ content: `${emojis.loading} Loading...`, embeds: [] });
const waApi = WolframAlphaAPI(this.client.config.credentials.wolframAlphaAppId);
- const decodedEmbed = new EmbedBuilder().addFields([
- {
- name: '📥 Input',
- value: await this.client.utils.inspectCleanRedactCodeblock(args.expression)
- }
- ]);
+ const decodedEmbed = new EmbedBuilder().addFields({
+ name: '📥 Input',
+ value: await this.client.utils.inspectCleanRedactCodeblock(args.expression)
+ });
const sendOptions: MessageOptions = { content: null, allowedMentions: AllowedMentions.none() };
try {
const calculated = await (args.image
@@ -72,22 +70,21 @@ export default class WolframAlphaCommand extends BushCommand {
if (args.image) {
decodedEmbed.setImage(await this.client.utils.uploadImageToImgur(calculated.split(',')[1]));
- decodedEmbed.addFields([{ name: '📤 Output', value: '​' }]);
+ decodedEmbed.addFields({ name: '📤 Output', value: '​' });
} else {
- decodedEmbed.addFields([
- { name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(calculated.toString()) }
- ]);
+ decodedEmbed.addFields({
+ name: '📤 Output',
+ value: await this.client.utils.inspectCleanRedactCodeblock(calculated.toString())
+ });
}
} catch (error) {
decodedEmbed
.setTitle(`${emojis.errorFull} Unable to Query Expression`)
.setColor(colors.error)
- .addFields([
- {
- name: `📤 Error`,
- value: await this.client.utils.inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js')
- }
- ]);
+ .addFields({
+ name: `📤 Error`,
+ value: await this.client.utils.inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js')
+ });
}
sendOptions.embeds = [decodedEmbed];
diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts
index ed6743e..02c78ea 100644
--- a/src/lib/common/ButtonPaginator.ts
+++ b/src/lib/common/ButtonPaginator.ts
@@ -154,7 +154,7 @@ export class ButtonPaginator {
* @returns The generated {@link ActionRow}
*/
protected getPaginationRow(disableAll = false) {
- return new ActionRowBuilder<ButtonBuilder>().addComponents([
+ return new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_beginning',
@@ -185,7 +185,7 @@ export class ButtonPaginator {
emoji: PaginateEmojis.END,
disabled: disableAll || this.curPage === this.numPages - 1
})
- ]);
+ );
}
/**
diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts
index 4bea092..b87d9ef 100644
--- a/src/lib/common/ConfirmationPrompt.ts
+++ b/src/lib/common/ConfirmationPrompt.ts
@@ -16,10 +16,10 @@ export class ConfirmationPrompt {
*/
protected async send(): Promise<boolean> {
this.messageOptions.components = [
- new ActionRowBuilder<ButtonBuilder>().addComponents([
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({ style: ButtonStyle.Success, customId: 'confirmationPrompt_confirm', label: 'Yes' }),
new ButtonBuilder({ style: ButtonStyle.Danger, customId: 'confirmationPrompt_cancel', label: 'No' })
- ])
+ )
];
const msg = await this.message.channel!.send(this.messageOptions);
diff --git a/src/lib/common/DeleteButton.ts b/src/lib/common/DeleteButton.ts
index 556bc07..340d07f 100644
--- a/src/lib/common/DeleteButton.ts
+++ b/src/lib/common/DeleteButton.ts
@@ -53,14 +53,14 @@ export class DeleteButton {
*/
protected updateComponents(edit = false, disable = false): void {
this.messageOptions.components = [
- new ActionRowBuilder<ButtonBuilder>().addComponents([
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate__stop',
emoji: PaginateEmojis.STOP,
disabled: disable
})
- ])
+ )
];
if (edit) {
this.messageOptions.reply = undefined;
diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts
index b62031d..424ee48 100644
--- a/src/listeners/bush/appealListener.ts
+++ b/src/listeners/bush/appealListener.ts
@@ -35,7 +35,7 @@ export default class AppealListener extends BushListener {
.setTitle(
`${message.embeds[0].fields!.find((f) => f.name === 'What type of punishment are you appealing?')!.value} appeal`
)
- .addFields([{ name: '» User Information', value: 'Unable to fetch author, ID was likely invalid' }])
+ .addFields({ name: '» User Information', value: 'Unable to fetch author, ID was likely invalid' })
]
});
@@ -66,14 +66,12 @@ export default class AppealListener extends BushListener {
if (member.roles.cache.size > 1) UserInfoCommand.generateRolesField(embed, member);
}
- embed.addFields([
- {
- name: '» Latest Modlogs',
- value: latestModlogs.length
- ? latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join(ModlogCommand.separator)
- : 'No Modlogs Found'
- }
- ]);
+ embed.addFields({
+ name: '» Latest Modlogs',
+ value: latestModlogs.length
+ ? latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join(ModlogCommand.separator)
+ : 'No Modlogs Found'
+ });
await thread.send({ embeds: [embed] });
}
diff --git a/src/listeners/guild-custom/bushLockdown.ts b/src/listeners/guild-custom/bushLockdown.ts
index 930a8d2..51d1c3d 100644
--- a/src/listeners/guild-custom/bushLockdown.ts
+++ b/src/listeners/guild-custom/bushLockdown.ts
@@ -17,7 +17,7 @@ export default class BushLockdownListener extends BushListener {
const logEmbed = new EmbedBuilder()
.setColor(colors.Blurple)
.setTimestamp()
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Lockdown'}` },
{ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` },
@@ -27,7 +27,7 @@ export default class BushLockdownListener extends BushListener {
.map((success, channel) => `<#${channel}> ${success ? emojis.success : emojis.error}`)
.join('\n')
}
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/guild-custom/bushUnlockdown.ts b/src/listeners/guild-custom/bushUnlockdown.ts
index b5a4482..18cb792 100644
--- a/src/listeners/guild-custom/bushUnlockdown.ts
+++ b/src/listeners/guild-custom/bushUnlockdown.ts
@@ -17,7 +17,7 @@ export default class BushUnlockdownListener extends BushListener {
const logEmbed = new EmbedBuilder()
.setColor(colors.Blurple)
.setTimestamp()
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Unlockdown'}` },
{ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` },
@@ -27,7 +27,7 @@ export default class BushUnlockdownListener extends BushListener {
.map((success, channel) => `<#${channel}> ${success ? emojis.success : emojis.error}`)
.join('\n')
}
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushBan.ts b/src/listeners/member-custom/bushBan.ts
index 32610ea..525184c 100644
--- a/src/listeners/member-custom/bushBan.ts
+++ b/src/listeners/member-custom/bushBan.ts
@@ -20,14 +20,14 @@ export default class BushBanListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${duration ? 'Temp Ban' : 'Perm Ban'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (duration) logEmbed.addFields([{ name: '**Duration**', value: humanizeDuration(duration) }]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (duration) logEmbed.addFields({ name: '**Duration**', value: humanizeDuration(duration) });
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushBlock.ts b/src/listeners/member-custom/bushBlock.ts
index 6d15a2b..a3af924 100644
--- a/src/listeners/member-custom/bushBlock.ts
+++ b/src/listeners/member-custom/bushBlock.ts
@@ -20,16 +20,16 @@ export default class BushBlockListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${duration ? 'Temp Block' : 'Perm Block'}` },
{ name: '**Channel**', value: `<#${channel.id}>` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
+ );
- if (duration) logEmbed.addFields([{ name: '**Duration**', value: `${humanizeDuration(duration) || duration}` }]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ if (duration) logEmbed.addFields({ name: '**Duration**', value: `${humanizeDuration(duration) || duration}` });
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushKick.ts b/src/listeners/member-custom/bushKick.ts
index 65a6942..ff3e40e 100644
--- a/src/listeners/member-custom/bushKick.ts
+++ b/src/listeners/member-custom/bushKick.ts
@@ -20,13 +20,13 @@ export default class BushKickListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Kick'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushMute.ts b/src/listeners/member-custom/bushMute.ts
index 77ea74c..73f9490 100644
--- a/src/listeners/member-custom/bushMute.ts
+++ b/src/listeners/member-custom/bushMute.ts
@@ -20,14 +20,14 @@ export default class BushMuteListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${duration ? 'Temp Mute' : 'Perm Mute'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (duration) logEmbed.addFields([{ name: '**Duration**', value: `${humanizeDuration(duration) || duration}` }]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (duration) logEmbed.addFields({ name: '**Duration**', value: `${humanizeDuration(duration) || duration}` });
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushPunishRole.ts b/src/listeners/member-custom/bushPunishRole.ts
index 2e5b17b..1f28811 100644
--- a/src/listeners/member-custom/bushPunishRole.ts
+++ b/src/listeners/member-custom/bushPunishRole.ts
@@ -20,13 +20,13 @@ export default class BushPunishRoleListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${duration ? 'Temp Punishment Role' : 'Perm Punishment Role'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (duration) logEmbed.addFields([{ name: '**Duration**', value: humanizeDuration(duration) }]);
+ );
+ if (duration) logEmbed.addFields({ name: '**Duration**', value: humanizeDuration(duration) });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushPunishRoleRemove.ts b/src/listeners/member-custom/bushPunishRoleRemove.ts
index 7bc9863..ef1d429 100644
--- a/src/listeners/member-custom/bushPunishRoleRemove.ts
+++ b/src/listeners/member-custom/bushPunishRoleRemove.ts
@@ -20,13 +20,13 @@ export default class BushPunishRoleRemoveListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Remove Punishment Role'}` },
{ name: '**Role**', value: `${role}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
diff --git a/src/listeners/member-custom/bushPurge.ts b/src/listeners/member-custom/bushPurge.ts
index 61a65e1..75faaeb 100644
--- a/src/listeners/member-custom/bushPurge.ts
+++ b/src/listeners/member-custom/bushPurge.ts
@@ -28,7 +28,7 @@ export default class BushPurgeListener extends BushListener {
.setTimestamp()
.setFooter({ text: `${messages.size.toLocaleString()} Messages` })
.setAuthor({ name: moderator.tag, iconURL: moderator.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Purge'}` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Channel**', value: `<#${channel.id}> (${channel.name})` },
@@ -38,7 +38,7 @@ export default class BushPurgeListener extends BushListener {
haste.url ? `[haste](${haste.url})${haste.error ? `- ${haste.error}` : ''}` : `${emojis.error} ${haste.error}`
}`
}
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushRemoveTimeout.ts b/src/listeners/member-custom/bushRemoveTimeout.ts
index 742d407..c389538 100644
--- a/src/listeners/member-custom/bushRemoveTimeout.ts
+++ b/src/listeners/member-custom/bushRemoveTimeout.ts
@@ -20,13 +20,13 @@ export default class BushRemoveTimeoutListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Remove Timeout'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushTimeout.ts b/src/listeners/member-custom/bushTimeout.ts
index 4621921..82169d6 100644
--- a/src/listeners/member-custom/bushTimeout.ts
+++ b/src/listeners/member-custom/bushTimeout.ts
@@ -20,14 +20,14 @@ export default class BushTimeoutListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Timeout'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` },
{ name: '**Duration**', value: `${humanizeDuration(duration) || duration}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushUnban.ts b/src/listeners/member-custom/bushUnban.ts
index 463ce6c..40394cd 100644
--- a/src/listeners/member-custom/bushUnban.ts
+++ b/src/listeners/member-custom/bushUnban.ts
@@ -20,13 +20,13 @@ export default class BushUnbanListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Unban'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushUnblock.ts b/src/listeners/member-custom/bushUnblock.ts
index 43b7b2b..867d391 100644
--- a/src/listeners/member-custom/bushUnblock.ts
+++ b/src/listeners/member-custom/bushUnblock.ts
@@ -20,14 +20,14 @@ export default class BushUnblockListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Unblock'}` },
{ name: '**Channel**', value: `<#${channel.id}>` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushUnmute.ts b/src/listeners/member-custom/bushUnmute.ts
index 614a826..2ff53b9 100644
--- a/src/listeners/member-custom/bushUnmute.ts
+++ b/src/listeners/member-custom/bushUnmute.ts
@@ -20,13 +20,13 @@ export default class BushUnmuteListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${'Unmute'}` },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/member-custom/bushUpdateModlog.ts b/src/listeners/member-custom/bushUpdateModlog.ts
index 893bec6..1896ede 100644
--- a/src/listeners/member-custom/bushUpdateModlog.ts
+++ b/src/listeners/member-custom/bushUpdateModlog.ts
@@ -21,8 +21,8 @@ export default class BushUpdateModlogListener extends BushListener {
name: moderator.user.tag,
iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
- .addFields([
- { name: '**Action**', value: `${'Update Modlog'}` },
+ .addFields(
+ { name: '**Action**', value: 'Update Modlog' },
{ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` },
{ name: '**ModLog Changed**', value: modlogID },
{ name: '**Value Changed**', value: key },
@@ -34,7 +34,7 @@ export default class BushUpdateModlogListener extends BushListener {
name: '**New Value**',
value: await this.client.utils.inspectCleanRedactCodeblock(newModlog, undefined, undefined, 1024)
}
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
diff --git a/src/listeners/member-custom/bushUpdateSettings.ts b/src/listeners/member-custom/bushUpdateSettings.ts
index 3781a8b..a0be2f9 100644
--- a/src/listeners/member-custom/bushUpdateSettings.ts
+++ b/src/listeners/member-custom/bushUpdateSettings.ts
@@ -21,13 +21,13 @@ export default class BushUpdateSettingsListener extends BushListener {
name: moderator.user.tag,
iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
});
- logEmbed.addFields([{ name: '**Action**', value: `${'Update Settings'}` }]);
- if (moderator) logEmbed.addFields([{ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }]);
- logEmbed.addFields([
+ logEmbed.addFields({ name: '**Action**', value: `${'Update Settings'}` });
+ if (moderator) logEmbed.addFields({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` });
+ logEmbed.addFields(
{ name: '**Setting Changed**', value: setting },
{ name: '**Old Value**', value: await this.client.utils.inspectCleanRedactCodeblock(oldSettings, 'js', undefined, 1024) },
{ name: '**New Value**', value: await this.client.utils.inspectCleanRedactCodeblock(newSettings, 'js', undefined, 1024) }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
diff --git a/src/listeners/member-custom/bushWarn.ts b/src/listeners/member-custom/bushWarn.ts
index b9c1868..822a491 100644
--- a/src/listeners/member-custom/bushWarn.ts
+++ b/src/listeners/member-custom/bushWarn.ts
@@ -20,13 +20,13 @@ export default class BushWarnListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${caseID}` })
.setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined })
- .addFields([
- { name: '**Action**', value: `${'Warn'}` },
+ .addFields(
+ { name: '**Action**', value: 'Warn' },
{ name: '**User**', value: `${user} (${user.tag})` },
{ name: '**Moderator**', value: `${moderator} (${moderator.tag})` },
{ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }
- ]);
- if (dmSuccess === false) logEmbed.addFields([{ name: '**Additional Info**', value: 'Could not dm user.' }]);
+ );
+ if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' });
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/message/directMessage.ts b/src/listeners/message/directMessage.ts
index 7b599d9..91733a5 100644
--- a/src/listeners/message/directMessage.ts
+++ b/src/listeners/message/directMessage.ts
@@ -37,7 +37,7 @@ export default class DirectMessageListener extends BushListener {
if (message.attachments.filter((a) => typeof a.size == 'number').size == 1) {
dmLogEmbed.setImage(message.attachments.filter((a) => typeof a.size == 'number').first()!.proxyURL);
} else if (message.attachments.size > 0) {
- dmLogEmbed.addFields([{ name: 'Attachments', value: message.attachments.map((a) => a.proxyURL).join('\n') }]);
+ dmLogEmbed.addFields({ name: 'Attachments', value: message.attachments.map((a) => a.proxyURL).join('\n') });
}
const dmChannel = await this.client.utils.getConfigChannel('dm');
await dmChannel.send({ embeds: [dmLogEmbed] });
diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts
index a387897..3c0ff34 100644
--- a/src/listeners/track-manual-punishments/modlogSyncBan.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts
@@ -57,12 +57,12 @@ export default class ModlogSyncBanListener extends BushListener {
name: ban.user.tag,
iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
- .addFields([
- { name: '**Action**', value: `${'Manual Ban'}` },
+ .addFields(
+ { name: '**Action**', value: 'Manual Ban' },
{ name: '**User**', value: `${ban.user} (${ban.user.tag})` },
{ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` },
{ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts
index 51d3dd8..7f7e9bc 100644
--- a/src/listeners/track-manual-punishments/modlogSyncKick.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts
@@ -57,12 +57,12 @@ export default class ModlogSyncKickListener extends BushListener {
name: member.user.tag,
iconURL: member.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
- .addFields([
- { name: '**Action**', value: `${'Manual Kick'}` },
+ .addFields(
+ { name: '**Action**', value: 'Manual Kick' },
{ name: '**User**', value: `${member.user} (${member.user.tag})` },
{ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` },
{ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
index 2ce3db2..50d1331 100644
--- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
@@ -62,12 +62,12 @@ export default class ModlogSyncTimeoutListener extends BushListener {
name: newMember.user.tag,
iconURL: newMember.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
- .addFields([
+ .addFields(
{ name: '**Action**', value: `${newTime ? 'Manual Timeout' : 'Manual Remove Timeout'}` },
{ name: '**User**', value: `${newMember.user} (${newMember.user.tag})` },
{ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` },
{ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
index 2207e78..8dfd39b 100644
--- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
@@ -56,12 +56,12 @@ export default class ModlogSyncUnbanListener extends BushListener {
name: ban.user.tag,
iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined
})
- .addFields([
- { name: '**Action**', value: `${'Manual Unban'}` },
+ .addFields(
+ { name: '**Action**', value: 'Manual Unban' },
{ name: '**User**', value: `${ban.user} (${ban.user.tag})` },
{ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` },
{ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }
- ]);
+ );
return await logChannel.send({ embeds: [logEmbed] });
}
}
diff --git a/src/listeners/ws/INTERACTION_CREATE.ts b/src/listeners/ws/INTERACTION_CREATE.ts
index 0e8ee7c..20c2b3e 100644
--- a/src/listeners/ws/INTERACTION_CREATE.ts
+++ b/src/listeners/ws/INTERACTION_CREATE.ts
@@ -202,7 +202,7 @@ export default class WsInteractionCreateListener extends BushListener {
.setTimestamp()
.setFooter({ text: `CaseID: ${modlogCase}` })
.setAuthor({ name: user.tag, iconURL: user.displayAvatarURL() })
- .addFields([
+ .addFields(
{
name: `Why were you ${Moderation.punishmentToPastTense(punishment)}?`,
value: interaction.data.components![0].components[0]!.value.substring(0, 1024)
@@ -215,7 +215,7 @@ export default class WsInteractionCreateListener extends BushListener {
name: `Why should your ${punishment} be removed?`,
value: interaction.data.components![2].components[0]!.value.substring(0, 1024)
}
- ])
+ )
.toJSON() as APIEmbed;
const components = [