We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb41fb4 commit d295903Copy full SHA for d295903
typings/index.test-d.ts
@@ -9,20 +9,12 @@ afk1.removeUser('12345678');
9
10
// 2
11
const afk: AfkClient = new AfkClient();
12
-import moment from 'moment';
13
14
afk.setUser('12345678', [Date.now(), "test"]);
15
const users = afk.findUser('12345678');
16
17
-const afkMessages = afk.getReason("12345678");
18
-
19
-if (afkMessages) {
20
- const [time, reason] = afkMessages;
21
- const timeago = moment(time).fromNow();
22
- console.log("AFK Message:", `${users} ${reason} ${timeago}`);
23
-} else {
24
- console.log(`No AFK message found for ${users}]`);
25
-}
+const reason = afk.getReason("12345678");
+console.log("AFK Message:", `${users} ${reason}`);
26
27
afk.removeUser('12345678');
28
0 commit comments