diff options
Diffstat (limited to 'src/arguments/durationSeconds.ts')
-rw-r--r-- | src/arguments/durationSeconds.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arguments/durationSeconds.ts b/src/arguments/durationSeconds.ts new file mode 100644 index 0000000..6b0e91d --- /dev/null +++ b/src/arguments/durationSeconds.ts @@ -0,0 +1,6 @@ +import { BushArgumentTypeCaster } from '../lib'; + +export const durationSecondsTypeCaster: BushArgumentTypeCaster = (_, phrase): number | null => { + phrase += 's'; + return client.util.parseDuration(phrase).duration; +}; |