aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/dev/eval.ts29
-rw-r--r--src/commands/dev/setLevel.ts5
-rw-r--r--src/commands/info/help.ts8
-rw-r--r--src/commands/info/pronouns.ts12
-rw-r--r--src/commands/moderation/ban.ts21
-rw-r--r--src/commands/moderation/kick.ts12
-rw-r--r--src/commands/moderation/role.ts43
-rw-r--r--src/commands/moulberry-bush/capePerms.ts5
-rw-r--r--src/commands/moulberry-bush/giveawayPing.ts3
-rw-r--r--src/commands/moulberry-bush/rule.ts34
-rw-r--r--src/lib/extensions/Util.ts64
-rw-r--r--src/lib/utils/AllowedMentions.ts6
12 files changed, 186 insertions, 56 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index cfe75cc..bab5f8e 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -5,7 +5,8 @@ import { inspect, promisify } from 'util';
import { exec } from 'child_process';
const clean = (text) => {
- if (typeof text === 'string') return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
+ if (typeof text === 'string')
+ return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
else return text;
};
@@ -47,7 +48,10 @@ export default class EvalCommand extends BushCommand {
});
}
- public async exec(message: Message, { depth, code, silent }: { depth: number; code: string; silent: boolean }): Promise<void> {
+ public async exec(
+ message: Message,
+ { depth, code, silent }: { depth: number; code: string; silent: boolean }
+ ): Promise<void> {
const embed: MessageEmbed = new MessageEmbed();
try {
@@ -68,15 +72,30 @@ export default class EvalCommand extends BushCommand {
output = clean(output);
embed
.setTitle('✅ Evaled code successfully')
- .addField('📥 Input', code.length > 1012 ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(code)) : '```js\n' + code + '```')
- .addField('📤 Output', output.length > 1012 ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(output)) : '```js\n' + output + '```')
+ .addField(
+ '📥 Input',
+ code.length > 1012
+ ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(code))
+ : '```js\n' + code + '```'
+ )
+ .addField(
+ '📤 Output',
+ output.length > 1012
+ ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(output))
+ : '```js\n' + output + '```'
+ )
.setColor('#66FF00')
.setFooter(message.author.username, message.author.displayAvatarURL({ dynamic: true }))
.setTimestamp();
} catch (e) {
embed
.setTitle('❌ Code was not able to be evaled')
- .addField('📥 Input', code.length > 1012 ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(code)) : '```js\n' + code + '```')
+ .addField(
+ '📥 Input',
+ code.length > 1012
+ ? 'Too large to display. Hastebin: ' + (await this.client.util.haste(code))
+ : '```js\n' + code + '```'
+ )
.addField(
'📤 Output',
e.length > 1012
diff --git a/src/commands/dev/setLevel.ts b/src/commands/dev/setLevel.ts
index 3a1bc85..e57e2f8 100644
--- a/src/commands/dev/setLevel.ts
+++ b/src/commands/dev/setLevel.ts
@@ -73,7 +73,10 @@ export default class SetLevelCommand extends BushCommand {
});
}
- async execSlash(message: CommandInteraction, { user, level }: { user: SlashCommandOption<void>; level: SlashCommandOption<number> }): Promise<void> {
+ async execSlash(
+ message: CommandInteraction,
+ { user, level }: { user: SlashCommandOption<void>; level: SlashCommandOption<number> }
+ ): Promise<void> {
await message.reply(await this.setLevel(user.user, level.value), {
allowedMentions: AllowedMentions.none()
});
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 7f6c8f4..0629bf1 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -59,10 +59,14 @@ export default class HelpCommand extends BushCommand {
const embed = new MessageEmbed()
.setColor([155, 200, 200])
.setTitle(`\`${command.description.usage ? command.description.usage : ''}\``)
- .addField('Description', `${command.description.content ? command.description.content : ''} ${command.ownerOnly ? '\n__Owner Only__' : ''}`);
+ .addField(
+ 'Description',
+ `${command.description.content ? command.description.content : ''} ${command.ownerOnly ? '\n__Owner Only__' : ''}`
+ );
if (command.aliases.length > 1) embed.addField('Aliases', `\`${command.aliases.join('` `')}\``, true);
- if (command.description.examples && command.description.examples.length) embed.addField('Examples', `\`${command.description.examples.join('`\n`')}\``, true);
+ if (command.description.examples && command.description.examples.length)
+ embed.addField('Examples', `\`${command.description.examples.join('`\n`')}\``, true);
return embed;
}
}
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index c53c542..740eb68 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -61,7 +61,9 @@ export default class PronounsCommand extends BushCommand {
}
async sendResponse(message: Message | CommandInteraction, user: User, author: boolean): Promise<void> {
try {
- const apiRes: { pronouns: pronounsType } = await got.get(`https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`).json();
+ const apiRes: { pronouns: pronounsType } = await got
+ .get(`https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`)
+ .json();
if (message instanceof Message) {
message.reply(
new MessageEmbed({
@@ -88,9 +90,13 @@ export default class PronounsCommand extends BushCommand {
} catch (e) {
if (e instanceof HTTPError && e.response.statusCode === 404) {
if (author) {
- await message.reply('You do not appear to have any pronouns set. Please go to https://pronoundb.org/ and set your pronouns.');
+ await message.reply(
+ 'You do not appear to have any pronouns set. Please go to https://pronoundb.org/ and set your pronouns.'
+ );
} else {
- await message.reply(`${user.tag} does not appear to have any pronouns set. Please tell them to go to https://pronoundb.org/ and set their pronouns.`);
+ await message.reply(
+ `${user.tag} does not appear to have any pronouns set. Please tell them to go to https://pronoundb.org/ and set their pronouns.`
+ );
}
} else throw e;
}
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index e59a528..0d57203 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -70,7 +70,12 @@ export default class BanCommand extends BushCommand {
]
});
}
- async *genResponses(message: Message | CommandInteraction, user: User, reason?: string, time?: string): AsyncIterable<string> {
+ async *genResponses(
+ message: Message | CommandInteraction,
+ user: User,
+ reason?: string,
+ time?: string
+ ): AsyncIterable<string> {
const duration = moment.duration();
let modlogEnry: Modlog;
let banEntry: Ban;
@@ -136,17 +141,21 @@ export default class BanCommand extends BushCommand {
}
try {
await user.send(
- `You were banned in ${message.guild.name} ${translatedTime.length >= 1 ? `for ${translatedTime.join(', ')}` : 'permanently'} with reason \`${
- reason || 'No reason given'
- }\``
+ `You were banned in ${message.guild.name} ${
+ translatedTime.length >= 1 ? `for ${translatedTime.join(', ')}` : 'permanently'
+ } with reason \`${reason || 'No reason given'}\``
);
} catch (e) {
yield 'Error sending message to user';
}
await message.guild.members.ban(user, {
- reason: `Banned by ${message instanceof CommandInteraction ? message.user.tag : message.author.tag} with ${reason ? `reason ${reason}` : 'no reason'}`
+ reason: `Banned by ${message instanceof CommandInteraction ? message.user.tag : message.author.tag} with ${
+ reason ? `reason ${reason}` : 'no reason'
+ }`
});
- yield `Banned <@!${user.id}> ${translatedTime.length >= 1 ? `for ${translatedTime.join(', ')}` : 'permanently'} with reason \`${reason || 'No reason given'}\``;
+ yield `Banned <@!${user.id}> ${
+ translatedTime.length >= 1 ? `for ${translatedTime.join(', ')}` : 'permanently'
+ } with reason \`${reason || 'No reason given'}\``;
} catch {
yield 'Error banning :/';
await banEntry.destroy();
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
index 182485a..c5581f6 100644
--- a/src/commands/moderation/kick.ts
+++ b/src/commands/moderation/kick.ts
@@ -46,7 +46,11 @@ export default class KickCommand extends BushCommand {
});
}
- private async *genResponses(message: Message | CommandInteraction, user: GuildMember, reason?: string): AsyncIterable<string> {
+ private async *genResponses(
+ message: Message | CommandInteraction,
+ user: GuildMember,
+ reason?: string
+ ): AsyncIterable<string> {
let modlogEnry: Modlog;
// Create guild entry so postgres doesn't get mad when I try and add a modlog entry
await Guild.findOrCreate({
@@ -77,7 +81,11 @@ export default class KickCommand extends BushCommand {
yield 'Error sending message to user';
}
try {
- await user.kick(`Kicked by ${message instanceof Message ? message.author.tag : message.user.tag} with ${reason ? `reason ${reason}` : 'no reason'}`);
+ await user.kick(
+ `Kicked by ${message instanceof Message ? message.author.tag : message.user.tag} with ${
+ reason ? `reason ${reason}` : 'no reason'
+ }`
+ );
} catch {
yield 'Error kicking :/';
await modlogEnry.destroy();
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts
index 0c7d7db..b01d578 100644
--- a/src/commands/moderation/role.ts
+++ b/src/commands/moderation/role.ts
@@ -77,17 +77,23 @@ export default class RoleCommand extends BushCommand {
if (!message.member.permissions.has('MANAGE_ROLES') && !this.client.ownerID.includes(message.author.id)) {
const mappedRole = this.client.util.moulberryBushRoleMap.find((m) => m.id === role.id);
if (!mappedRole || !this.roleWhitelist[mappedRole.name]) {
- return message.util.reply(`<:error:837123021016924261> <@&${role.id}> is not whitelisted, and you do not have manage roles permission.`, {
- allowedMentions: AllowedMentions.none()
- });
+ return message.util.reply(
+ `<:error:837123021016924261> <@&${role.id}> is not whitelisted, and you do not have manage roles permission.`,
+ {
+ allowedMentions: AllowedMentions.none()
+ }
+ );
}
const allowedRoles = this.roleWhitelist[mappedRole.name].map((r) => {
return this.client.util.moulberryBushRoleMap.find((m) => m.name === r).id;
});
if (!message.member.roles.cache.some((role) => allowedRoles.includes(role.id))) {
- return message.util.reply(`<:error:837123021016924261> <@&${role.id}> is whitelisted, but you do not have any of the roles required to manage it.`, {
- allowedMentions: AllowedMentions.none()
- });
+ return message.util.reply(
+ `<:error:837123021016924261> <@&${role.id}> is whitelisted, but you do not have any of the roles required to manage it.`,
+ {
+ allowedMentions: AllowedMentions.none()
+ }
+ );
}
}
if (!this.client.ownerID.includes(message.author.id)) {
@@ -102,9 +108,12 @@ export default class RoleCommand extends BushCommand {
});
}
if (role.managed) {
- await message.util.reply(`<:error:837123021016924261> <@&${role.id}> is managed by an integration and cannot be managed.`, {
- allowedMentions: AllowedMentions.none()
- });
+ await message.util.reply(
+ `<:error:837123021016924261> <@&${role.id}> is managed by an integration and cannot be managed.`,
+ {
+ allowedMentions: AllowedMentions.none()
+ }
+ );
}
}
// No checks if the user has MANAGE_ROLES
@@ -112,16 +121,24 @@ export default class RoleCommand extends BushCommand {
try {
await user.roles.remove(role.id);
} catch {
- return message.util.reply(`<:error:837123021016924261> Could not remove <@&${role.id}> from <@${user.id}>.`, { allowedMentions: AllowedMentions.none() });
+ return message.util.reply(`<:error:837123021016924261> Could not remove <@&${role.id}> from <@${user.id}>.`, {
+ allowedMentions: AllowedMentions.none()
+ });
}
- return message.util.reply(`<:checkmark:837109864101707807> Successfully removed <@&${role.id}> from <@${user.id}>!`, { allowedMentions: AllowedMentions.none() });
+ return message.util.reply(`<:checkmark:837109864101707807> Successfully removed <@&${role.id}> from <@${user.id}>!`, {
+ allowedMentions: AllowedMentions.none()
+ });
} else {
try {
await user.roles.add(role.id);
} catch {
- return message.util.reply(`<:error:837123021016924261> Could not add <@&${role.id}> to <@${user.id}>.`, { allowedMentions: AllowedMentions.none() });
+ return message.util.reply(`<:error:837123021016924261> Could not add <@&${role.id}> to <@${user.id}>.`, {
+ allowedMentions: AllowedMentions.none()
+ });
}
- return message.util.reply(`<:checkmark:837109864101707807> Successfully added <@&${role.id}> to <@${user.id}>!`, { allowedMentions: AllowedMentions.none() });
+ return message.util.reply(`<:checkmark:837109864101707807> Successfully added <@&${role.id}> to <@${user.id}>!`, {
+ allowedMentions: AllowedMentions.none()
+ });
}
}
}
diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts
index 79f9d6b..a0edf8c 100644
--- a/src/commands/moulberry-bush/capePerms.ts
+++ b/src/commands/moulberry-bush/capePerms.ts
@@ -95,7 +95,10 @@ export default class CapePermissionsCommand extends BushCommand {
const foundUser = capeperms.perms.find((u) => u._id === uuid);
if (foundUser == null) return `<:error:837123021016924261> \`${user}\` does not appear to have any capes.`;
const userPerm: string[] = foundUser.perms;
- const embed = this.client.util.createEmbed(this.client.util.colors.default).setTitle(`${user}'s Capes`).setDescription(userPerm.join('\n'));
+ const embed = this.client.util
+ .createEmbed(this.client.util.colors.default)
+ .setTitle(`${user}'s Capes`)
+ .setDescription(userPerm.join('\n'));
return embed;
} else {
return `<:error:837123021016924261> There was an error finding cape perms for ${user}.`;
diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts
index e11585a..34de257 100644
--- a/src/commands/moulberry-bush/giveawayPing.ts
+++ b/src/commands/moulberry-bush/giveawayPing.ts
@@ -25,7 +25,8 @@ export default class GiveawayPingCommand extends BushCommand {
});
}
public async exec(message: Message): Promise<unknown> {
- if (message.guild.id !== '516977525906341928') return message.reply("<:error:837123021016924261> This command may only be run in Moulberry's Bush.");
+ if (message.guild.id !== '516977525906341928')
+ return message.reply("<:error:837123021016924261> This command may only be run in Moulberry's Bush.");
if (!['767782084981817344', '833855738501267456'].includes(message.channel.id))
return message.reply('<:error:837123021016924261> This command may only be run in giveaway channels.');
await message.delete().catch(() => undefined);
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index e3f9e34..ba4f9e6 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -19,7 +19,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'No Spamming',
- description: 'Including but not limited to: any messages that do not contribute to the conversation, repeated messages, randomly tagging users, and chat flood.'
+ description:
+ 'Including but not limited to: any messages that do not contribute to the conversation, repeated messages, randomly tagging users, and chat flood.'
},
{
title: 'English',
@@ -27,7 +28,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Safe for Work',
- description: 'Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status and profile picture SFW.'
+ description:
+ 'Please keep NSFW and NSFL content out of this server, avoid borderline images as well as keeping your status and profile picture SFW.'
},
{
title: 'No Advertising',
@@ -35,7 +37,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: '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: 'Swearing',
@@ -43,7 +46,8 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Only ping @emergency in emergencies',
- description: 'Pinging <@&833802660209229854> for no reason will result in severe punishment. <@&833802660209229854> is only to be pinged in true emergencies.'
+ description:
+ 'Pinging <@&833802660209229854> for no reason will result in severe punishment. <@&833802660209229854> is only to be pinged in true emergencies.'
},
{
title: 'No Backseat Moderating',
@@ -51,11 +55,13 @@ export default class RuleCommand extends BushCommand {
},
{
title: 'Staff may moderate at their discretion',
- description: 'If there are loopholes in our rules, the staff team may moderate based on what they deem appropriate. The staff team holds final discretion.'
+ description:
+ 'If there are loopholes in our rules, the staff team may moderate based on what they deem appropriate. The staff team holds final discretion.'
},
{
title: "Sending media that are able to crash a user's Discord",
- description: "Sending videos, GIFs, emojis, etc. that are able to crash someone's discord will result in a **permanent** mute that cannot be appealed."
+ description:
+ "Sending videos, GIFs, emojis, etc. that are able to crash someone's discord will result in a **permanent** mute that cannot be appealed."
}
];
@@ -108,8 +114,15 @@ export default class RuleCommand extends BushCommand {
]
});
}
- private getResponse(message: Message | CommandInteraction, rule?: number, user?: User): string | MessageEmbed | [string, MessageEmbed] {
- if (message.guild.id !== '516977525906341928' && !this.client.ownerID.includes(message instanceof Message ? message.author.id : message.user.id)) {
+ private getResponse(
+ message: Message | CommandInteraction,
+ rule?: number,
+ user?: User
+ ): string | MessageEmbed | [string, MessageEmbed] {
+ if (
+ message.guild.id !== '516977525906341928' &&
+ !this.client.ownerID.includes(message instanceof Message ? message.author.id : message.user.id)
+ ) {
return "<:no:787549684196704257> This command can only be run in Moulberry's Bush.";
}
let rulesEmbed = new MessageEmbed().setColor('ef3929');
@@ -142,7 +155,10 @@ export default class RuleCommand extends BushCommand {
await message.delete().catch(() => undefined);
}
- public async execSlash(message: CommandInteraction, { rule, user }: { rule?: SlashCommandOption<number>; user?: SlashCommandOption<void> }): Promise<void> {
+ public async execSlash(
+ message: CommandInteraction,
+ { rule, user }: { rule?: SlashCommandOption<number>; user?: SlashCommandOption<void> }
+ ): Promise<void> {
const response = this.getResponse(message, rule?.value, user?.user);
if (Array.isArray(response)) {
await message.reply(response[0], {
diff --git a/src/lib/extensions/Util.ts b/src/lib/extensions/Util.ts
index 9106020..78fba12 100644
--- a/src/lib/extensions/Util.ts
+++ b/src/lib/extensions/Util.ts
@@ -5,7 +5,12 @@ import { exec } from 'child_process';
import got from 'got';
import { MessageEmbed, GuildMember, User } from 'discord.js';
import { CommandInteractionOption } from 'discord.js';
-import { ApplicationCommandOptionType, APIInteractionDataResolvedGuildMember, APIInteractionDataResolvedChannel, APIRole } from 'discord-api-types';
+import {
+ ApplicationCommandOptionType,
+ APIInteractionDataResolvedGuildMember,
+ APIInteractionDataResolvedChannel,
+ APIRole
+} from 'discord-api-types';
import { GuildChannel } from 'discord.js';
import { Role } from 'discord.js';
import chalk from 'chalk';
@@ -218,7 +223,12 @@ export class Util extends ClientUtil {
author = author.user; // Convert to User if GuildMember
}
let embed = new MessageEmbed().setTimestamp();
- if (author) embed = embed.setAuthor(author.username, author.displayAvatarURL({ dynamic: true }), `https://discord.com/users/${author.id}`);
+ if (author)
+ embed = embed.setAuthor(
+ author.username,
+ author.displayAvatarURL({ dynamic: true }),
+ `https://discord.com/users/${author.id}`
+ );
if (color) embed = embed.setColor(color);
return embed;
}
@@ -232,11 +242,18 @@ export class Util extends ClientUtil {
let fetchedGuild: Guild;
if (guild) fetchedGuild = this.client.guilds.cache.get(guild);
try {
- const registered = guild === undefined ? await this.client.application.commands.fetch() : await fetchedGuild.commands.fetch();
+ const registered =
+ guild === undefined ? await this.client.application.commands.fetch() : await fetchedGuild.commands.fetch();
for (const [, registeredCommand] of registered) {
if (!this.client.commandHandler.modules.find((cmd) => cmd.id == registeredCommand.name)?.execSlash || force) {
- guild === undefined ? await this.client.application.commands.delete(registeredCommand.id) : await fetchedGuild.commands.delete(registeredCommand.id);
- this.client.logger.verbose(chalk`{red Deleted slash command ${registeredCommand.name}${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}}`);
+ guild === undefined
+ ? await this.client.application.commands.delete(registeredCommand.id)
+ : await fetchedGuild.commands.delete(registeredCommand.id);
+ this.client.logger.verbose(
+ chalk`{red Deleted slash command ${registeredCommand.name}${
+ guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
+ }}`
+ );
}
}
@@ -253,20 +270,38 @@ export class Util extends ClientUtil {
if (found?.id && !force) {
if (slashdata.description !== found.description) {
- guild === undefined ? await this.client.application.commands.edit(found.id, slashdata) : fetchedGuild.commands.edit(found.id, slashdata);
- this.client.logger.verbose(chalk`{yellow Edited slash command ${botCommand.id}${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}}`);
+ guild === undefined
+ ? await this.client.application.commands.edit(found.id, slashdata)
+ : fetchedGuild.commands.edit(found.id, slashdata);
+ this.client.logger.verbose(
+ chalk`{yellow Edited slash command ${botCommand.id}${
+ guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
+ }}`
+ );
}
} else {
- guild === undefined ? await this.client.application.commands.create(slashdata) : fetchedGuild.commands.create(slashdata);
- this.client.logger.verbose(chalk`{green Created slash command ${botCommand.id}${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}}`);
+ guild === undefined
+ ? await this.client.application.commands.create(slashdata)
+ : fetchedGuild.commands.create(slashdata);
+ this.client.logger.verbose(
+ chalk`{green Created slash command ${botCommand.id}${
+ guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
+ }}`
+ );
}
}
}
- return this.client.logger.log(chalk.green(`Slash commands registered${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}`));
+ return this.client.logger.log(
+ chalk.green(`Slash commands registered${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}`)
+ );
} catch (e) {
console.log(chalk.red(e.stack));
- return this.client.logger.error(chalk`{red Slash commands not registered${guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''}, see above error.}`);
+ return this.client.logger.error(
+ chalk`{red Slash commands not registered${
+ guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
+ }, see above error.}`
+ );
}
}
@@ -310,7 +345,12 @@ export class CanvasProgressBar {
private p: number;
private ctx: CanvasRenderingContext2D;
- constructor(ctx: CanvasRenderingContext2D, dimension: { x: number; y: number; width: number; height: number }, color: string, percentage: number) {
+ constructor(
+ ctx: CanvasRenderingContext2D,
+ dimension: { x: number; y: number; width: number; height: number },
+ color: string,
+ percentage: number
+ ) {
({ x: this.x, y: this.y, width: this.w, height: this.h } = dimension);
this.color = color;
this.percentage = percentage;
diff --git a/src/lib/utils/AllowedMentions.ts b/src/lib/utils/AllowedMentions.ts
index 68c44d7..47e440b 100644
--- a/src/lib/utils/AllowedMentions.ts
+++ b/src/lib/utils/AllowedMentions.ts
@@ -34,7 +34,11 @@ export default class AllowedMentions {
}
public toObject(): MessageMentionOptions {
return {
- parse: [...(this.users ? ['users'] : []), ...(this.roles ? ['roles'] : []), ...(this.everyone ? ['everyone'] : [])] as MessageMentionTypes[]
+ parse: [
+ ...(this.users ? ['users'] : []),
+ ...(this.roles ? ['roles'] : []),
+ ...(this.everyone ? ['everyone'] : [])
+ ] as MessageMentionTypes[]
};
}
}