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/user/age.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/commands/user/age.ts') diff --git a/src/commands/user/age.ts b/src/commands/user/age.ts index f541d67..13ead86 100644 --- a/src/commands/user/age.ts +++ b/src/commands/user/age.ts @@ -1,10 +1,12 @@ -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 { formatDistance, formatRelative } from 'date-fns' +//@ts-ignore no types import { stripIndents } from 'common-tags' module.exports = class AgeUser extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'age', aliases: [ @@ -31,10 +33,10 @@ module.exports = class AgeUser extends Command { ] }); } - async run(msg: CommandoMessage, { uUser }) { + async run(msg: CommandoMessage, { uUser }: any) { const target = uUser || msg.author const { createdAt } = target - msg.reply(stripIndents`${formatDistance(createdAt, new Date())} old. - Created on ${formatRelative(createdAt, new Date())}`) + return msg.reply(stripIndents`${formatDistance(createdAt, new Date())} old. + Created on ${formatRelative(createdAt, new Date())} ${emoji.random()}`) } }; \ No newline at end of file -- cgit v1.2.3