aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/contentWithDuration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/arguments/contentWithDuration.ts')
-rw-r--r--src/arguments/contentWithDuration.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arguments/contentWithDuration.ts b/src/arguments/contentWithDuration.ts
index e69de29..8dd7621 100644
--- a/src/arguments/contentWithDuration.ts
+++ b/src/arguments/contentWithDuration.ts
@@ -0,0 +1,9 @@
+import { BushArgumentTypeCaster } from '../lib/extensions/discord-akairo/BushArgumentTypeCaster';
+import { BushMessage } from '../lib/extensions/discord.js/BushMessage';
+
+export const contentWithDurationTypeCaster: BushArgumentTypeCaster = async (
+ _message: BushMessage,
+ phrase
+): Promise<{ duration: number; contentWithoutTime: string }> => {
+ return client.util.parseDuration(phrase);
+};