diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-31 18:45:23 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-31 18:45:23 -0400 |
commit | a47ef150fd38fff3666faccd6f976f660fdbf9f3 (patch) | |
tree | 3f73c3d03236b09bf824469791f4ef7d2016b0b7 /src/commands/utilities | |
parent | 9aa46f79516c0c044742339c59d471b43060d84f (diff) | |
download | tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.gz tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.tar.bz2 tanzanite-a47ef150fd38fff3666faccd6f976f660fdbf9f3.zip |
cleanup and deprecated old config commands
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/serverStatus.ts | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/commands/utilities/serverStatus.ts b/src/commands/utilities/serverStatus.ts deleted file mode 100644 index 02db638..0000000 --- a/src/commands/utilities/serverStatus.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { MessageEmbed } from 'discord.js'; -import got from 'got'; -import { BushCommand, BushMessage } from '../../lib'; - -export default class ServerStatusCommand extends BushCommand { - public constructor() { - super('serverstatus', { - aliases: ['serverstatus', 'ss'], - category: 'utilities', - description: { - usage: 'serverstatus', - examples: ['serverstatus', 'ss'], - content: "Gives the status of moulberry's server" - }, - ratelimit: 4, - cooldown: 4000, - clientPermissions: ['EMBED_LINKS', 'SEND_MESSAGES'], - slash: true - }); - } - - public override async exec(message: BushMessage): Promise<void> { - const msgEmbed: MessageEmbed = new MessageEmbed() - .setTitle('Server status') - .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 = util.emojis.success; - } catch (e) { - main = util.emojis.error; - } - await message.util.edit({ embeds: [msgEmbed.setDescription(`Checking server:\n${main}`)] }); - 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(util.colors.success) - ] - }); - } else { - await message.util.edit({ - embeds: [ - msgEmbed - .addField( - 'Status', - "It appears Moulberry's server is offline, this means that everything related to prices will likely not work." - ) - .setColor(util.colors.error) - ] - }); - } - } -} |