diff options
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/serverStatus.ts | 14 | ||||
-rw-r--r-- | src/commands/utilities/uuid.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/viewraw.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/whoHasRole.ts | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/commands/utilities/serverStatus.ts b/src/commands/utilities/serverStatus.ts index a20f0b2..b9d6136 100644 --- a/src/commands/utilities/serverStatus.ts +++ b/src/commands/utilities/serverStatus.ts @@ -22,24 +22,24 @@ export default class ServerStatusCommand extends BushCommand { public async exec(message: BushMessage): Promise<void> { const msgEmbed: MessageEmbed = new MessageEmbed() .setTitle('Server status') - .setDescription(`Checking server:\n${this.client.util.emojis.loading}`) - .setColor(this.client.util.colors.default) + .setDescription(`Checking server:\n${util.emojis.loading}`) + .setColor(util.colors.default) .setFooter('Checking https://moulberry.codes/lowestbin.json'); await message.util.reply({ embeds: [msgEmbed] }); let main; try { await got.get('https://moulberry.codes/lowestbin.json').json(); - main = this.client.util.emojis.success; + main = util.emojis.success; } catch (e) { - main = this.client.util.emojis.error; + main = util.emojis.error; } await message.util.edit({ embeds: [msgEmbed.setDescription(`Checking server:\n${main}`)] }); - if (main == this.client.util.emojis.success) { + if (main == util.emojis.success) { await message.util.edit({ embeds: [ msgEmbed .addField('Status', 'The server is online, all features related to prices will likely work.') - .setColor(this.client.util.colors.success) + .setColor(util.colors.success) ] }); } else { @@ -50,7 +50,7 @@ export default class ServerStatusCommand extends BushCommand { 'Status', "It appears Moulberry's server is offline, this means that everything related to prices will likely not work." ) - .setColor(this.client.util.colors.error) + .setColor(util.colors.error) ] }); } diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 0b96ce1..7ff80d2 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -31,13 +31,13 @@ export default class UuidCommand extends BushCommand { // eslint-disable-next-line @typescript-eslint/no-explicit-any public async exec(message: BushMessage, { ign }: { ign: { match: any[]; matches: any[] } }): Promise<unknown> { - if (!ign) return await message.util.reply(`${this.client.util.emojis.error} Please enter a valid ign.`); + if (!ign) return await message.util.reply(`${util.emojis.error} Please enter a valid ign.`); const readableIGN = ign.match[0]; try { - const uuid = await this.client.util.findUUID(readableIGN); + const uuid = await util.findUUID(readableIGN); return await message.util.reply(`The uuid for \`${readableIGN}\` is \`${uuid}\``); } catch (e) { - return await message.util.reply(`${this.client.util.emojis.error} Could not find an uuid for \`${readableIGN}\`.`); + return await message.util.reply(`${util.emojis.error} Could not find an uuid for \`${readableIGN}\`.`); } } } diff --git a/src/commands/utilities/viewraw.ts b/src/commands/utilities/viewraw.ts index 3658bde..ca5b2de 100644 --- a/src/commands/utilities/viewraw.ts +++ b/src/commands/utilities/viewraw.ts @@ -56,7 +56,7 @@ export default class ViewRawCommand extends BushCommand { }); if (!newMessage) { return await message.util.reply( - `${this.client.util.emojis.error} There was an error fetching that message, try supplying a channel.` + `${util.emojis.error} There was an error fetching that message, try supplying a channel.` ); } } else { @@ -66,9 +66,9 @@ export default class ViewRawCommand extends BushCommand { const messageEmbed = new MessageEmbed() .setFooter(newMessage.author.tag, newMessage.author.avatarURL({ dynamic: true })) .setTimestamp(newMessage.createdTimestamp) - .setColor(newMessage.member?.roles?.color?.color || this.client.util.colors.default) + .setColor(newMessage.member?.roles?.color?.color || util.colors.default) .setTitle('Raw Message Information') - .setDescription(await this.client.util.codeblock(content, 2048, 'js')); + .setDescription(await util.codeblock(content, 2048, 'js')); return await message.util.reply({ embeds: [messageEmbed] }); } diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index 1828c95..42e8fd5 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -39,15 +39,15 @@ export default class WhoHasRoleCommand extends BushCommand { public async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise<unknown> { const roleMembers = args.role.members.map((member) => `${member.user} (${Util.escapeMarkdown(member.user.tag)})`); - const chunkedRoleMembers = this.client.util.chunk(roleMembers, 30); + const chunkedRoleMembers = util.chunk(roleMembers, 30); const embedPages = chunkedRoleMembers.map( (chunk) => new MessageEmbed({ title: `${args.role.name}'s Members`, description: chunk.join('\n'), - color: this.client.util.colors.default + color: util.colors.default }) ); - return await this.client.util.buttonPaginate(message, embedPages, null, true); + return await util.buttonPaginate(message, embedPages, null, true); } } |