mirror of
https://github.com/danbulant/cnmc-bot
synced 2026-07-07 20:20:55 +00:00
Show if answer was after hint
This commit is contained in:
parent
bdebc9170e
commit
1bccc6009f
1 changed files with 12 additions and 0 deletions
12
src/index.js
12
src/index.js
|
|
@ -85,6 +85,18 @@ app
|
||||||
embed.setFooter(msg.author.id);
|
embed.setFooter(msg.author.id);
|
||||||
embed.addField("Try", answerCount, true);
|
embed.addField("Try", answerCount, true);
|
||||||
embed.addField("Challenge", challenge.get("type"), true);
|
embed.addField("Challenge", challenge.get("type"), true);
|
||||||
|
var hint = false;
|
||||||
|
try {
|
||||||
|
if(challenge.get("hint")) {
|
||||||
|
let hint = challenge.get("hint").split("|");
|
||||||
|
let ch = await client.channels.fetch(hint[0]);
|
||||||
|
let ms = await ch.messages.fetch(hint[1]);
|
||||||
|
if(ms.createdTimestamp < msg.createdTimestamp) {
|
||||||
|
hint = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch(e) {}
|
||||||
|
embed.addField("After hint", hint ? "Yes" : "No", true);
|
||||||
var m = await channel.send(embed);
|
var m = await channel.send(embed);
|
||||||
m.react("✅");
|
m.react("✅");
|
||||||
m.react("❌");
|
m.react("❌");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue