diff options
| author | 8cy <[email protected]> | 2020-06-27 22:52:54 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-06-27 22:52:54 -0700 |
| commit | 80951013e391aab140800e4f386867e6c391553f (patch) | |
| tree | 3d7101237ef1cd8d6fe2a2fab751a2dc55ae7d84 /src/commands/utility/iss.ts | |
| parent | more config shit (diff) | |
| download | dep-core-80951013e391aab140800e4f386867e6c391553f.tar.xz dep-core-80951013e391aab140800e4f386867e6c391553f.zip | |
add ts defs so not a lot of errors left
- made .todo file for epic error tracking
Diffstat (limited to 'src/commands/utility/iss.ts')
| -rw-r--r-- | src/commands/utility/iss.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/utility/iss.ts b/src/commands/utility/iss.ts index d49b499..3bb4ff6 100644 --- a/src/commands/utility/iss.ts +++ b/src/commands/utility/iss.ts @@ -1,9 +1,10 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; +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) { + constructor(client: CommandoClient) { super(client, { name: 'iss', aliases: ['internationalspacestation', 'international-space-station'], @@ -22,6 +23,7 @@ module.exports = class ISSUtility extends Command { 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) { |