From 80951013e391aab140800e4f386867e6c391553f Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Sat, 27 Jun 2020 22:52:54 -0700 Subject: add ts defs so not a lot of errors left - made .todo file for epic error tracking --- src/commands/utility/romannumeral.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/commands/utility/romannumeral.ts') 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 -- cgit v1.2.3