Human Readable Timer Response

This commit is contained in:
Dragon Fire
2020-11-13 16:38:14 -05:00
parent 17dd3f23fb
commit f9aea25916
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = class TimerCommand extends Command {
run(msg, { time }) {
if (this.timers.has(msg.channel.id)) return msg.reply('Only one timer can be set per channel.');
const display = time > 59 ? `${time / 60} minutes` : `${time} seconds`;
const display = time > 59 ? `${Math.trunc(time / 60)} minutes, ${time % 60} seconds` : `${time} seconds`;
const timeout = setTimeout(async () => {
await msg.channel.send(`🕰️ Your **${display}** timer is finished ${msg.author}!`);
this.timers.delete(msg.channel.id);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "119.42.0",
"version": "119.42.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {