summaryrefslogtreecommitdiff
path: root/src/commands/user/age.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-06-27 22:52:54 -0700
committer8cy <[email protected]>2020-06-27 22:52:54 -0700
commit80951013e391aab140800e4f386867e6c391553f (patch)
tree3d7101237ef1cd8d6fe2a2fab751a2dc55ae7d84 /src/commands/user/age.ts
parentmore config shit (diff)
downloaddep-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/user/age.ts')
-rw-r--r--src/commands/user/age.ts12
1 files changed, 7 insertions, 5 deletions
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