Argument examples
Are there any examples for duration arguments available? I'm struggling with duration arguments for punishments and am looking for something that would accept either a "permanent" string or a duration with the type of a string, e.g 1h, 30d, 1m
Iirc there was a plugin for this but I can't remember what the name is or where to find it.
Solution:Jump to solution
This is the closest to an example I know https://github.com/skyra-project/skyra/blob/main/src/arguments/timespan.ts
GitHub
skyra/src/arguments/timespan.ts at main · skyra-project/skyra
A multipurpose Discord Bot designed to carry out most of your server's needs with great performance and stability. - skyra-project/skyra
5 Replies
if there was a plugin then it wasnt one that sapphire publishes
Solution
This is the closest to an example I know https://github.com/skyra-project/skyra/blob/main/src/arguments/timespan.ts
GitHub
skyra/src/arguments/timespan.ts at main · skyra-project/skyra
A multipurpose Discord Bot designed to carry out most of your server's needs with great performance and stability. - skyra-project/skyra
Yeah I don't remember what it was. Maybe an utility of some sort that made milliseconds more readable for humans
Yeah it's sapphire time utilities
Oh yeah, In addition to this, are you able to shift arguments? (args.shift)
args.next
Alr ty