mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Human Readable Timer Response
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.42.0",
|
||||
"version": "119.42.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user