A timer command will help you to generate a message after a specific time.
- npm i discord.js
- npm i node.js
- npm i ms
Timer.js should be inserted in your Commands-file
- Find more about Commands-file right here
- You'll need to define a prefix
- Use timer following your prefix
- Indicate how long you want the timer to last
Global usage:
<your_prefix / timer / timer_period>
Set the timer:
periods = s, m, h, d
s
-> seconds
m
-> minutes
h
-> hours
d
-> days
Example (prefix = "/" | time = 24 hours)
:
/timer 86400s OR
/timer 1440m OR
/timer 24h OR
/timer 1d (will set a new timer for a day)
- The following code Is not up to date (running under V11)
- You can learn more V12 It by following this link