Add days as option in timer command
+ Remove useless comments
This commit is contained in:
parent
664598681f
commit
76da183b67
2 changed files with 6 additions and 4 deletions
|
@ -5,7 +5,7 @@ module.exports = {
|
|||
description: "Set a timer for a time in minutes.",
|
||||
moreHelp: ["Usage:"
|
||||
,"`<prefix>timer <time_in_minutes> <message_to_send>`"
|
||||
,"`<prefix>timer <time>(m|h|s) <message_to_send>`"
|
||||
,"`<prefix>timer <time>(m|h|s|d) <message_to_send>`"
|
||||
,"Bot will mention you after the time has passed, with the custom message."],
|
||||
execute({client, message, args}) {
|
||||
if(args.length < 2)
|
||||
|
|
|
@ -4,13 +4,15 @@ module.exports = function(time){
|
|||
if(!isNaN(letter)) return parseFloat(time) * 60;
|
||||
switch (letter.toUpperCase()) {
|
||||
case "H":
|
||||
timeInSeconds = timeInSeconds * 3600; // 3 600 000
|
||||
timeInSeconds = timeInSeconds * 3600;
|
||||
break;
|
||||
case "M":
|
||||
timeInSeconds = timeInSeconds * 60; // 60 000
|
||||
timeInSeconds = timeInSeconds * 60;
|
||||
break;
|
||||
case "S":
|
||||
timeInSeconds = timeInSeconds; // 1 000
|
||||
break;
|
||||
case "D":
|
||||
timeInSeconds = timeInSeconds * 86400;
|
||||
break;
|
||||
default:
|
||||
timeInSeconds = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue