diff options
Diffstat (limited to 'src/commands/utility/iss.ts')
| -rw-r--r-- | src/commands/utility/iss.ts | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/commands/utility/iss.ts b/src/commands/utility/iss.ts deleted file mode 100644 index 3bb4ff6..0000000 --- a/src/commands/utility/iss.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -//@ts-ignore no types -import emoji from 'emoji-random'; -import request from 'node-superfetch' - -module.exports = class ISSUtility extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'iss', - aliases: ['internationalspacestation', 'international-space-station'], - group: 'utility', - memberName: 'iss', - description: 'Tells you the current location of the International Space Station.', - examples: ['uwu!iss'], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - }); - } - async run(msg: CommandoMessage) { - try { - const { body } = await request.get('http://api.open-notify.org/iss-now.json') - //@ts-ignore this exists - const pos = body.iss_position - return msg.reply(`The ISS is currentaly at **${pos.latitude}, ${pos.longitude}**. ${emoji.random()}`) - } catch (err) { - return msg.reply(`Woops, an error has occurred: \`${err.message}\`. Try again later! ${emoji.random()}`) - } - } -};
\ No newline at end of file |