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/romannumeral.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/romannumeral.ts')
| -rw-r--r-- | src/commands/utility/romannumeral.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/commands/utility/romannumeral.ts b/src/commands/utility/romannumeral.ts index 8dcc331..39b9320 100644 --- a/src/commands/utility/romannumeral.ts +++ b/src/commands/utility/romannumeral.ts @@ -1,9 +1,11 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; +import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; +//@ts-ignore no types import emoji from 'emoji-random' +//@ts-ignore no types import romanize from 'romanize' module.exports = class RomanNumeralUtility extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'romannumeral', aliases: [ @@ -31,12 +33,12 @@ module.exports = class RomanNumeralUtility extends Command { ] }); } - run(msg: CommandoMessage, { nNum }) { + run(msg: CommandoMessage, { nNum }: any) { if (nNum === parseInt(nNum, 10)) { msg.reply(romanize(nNum)) } - const back = value => { + const back = (value: string) => { let res = 0 const decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] @@ -50,6 +52,6 @@ module.exports = class RomanNumeralUtility extends Command { return res } - msg.reply(back(nNum) + ' ' + emoji.random()) + return msg.reply(back(nNum) + ' ' + emoji.random()) } };
\ No newline at end of file |