aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/roleWithDuration.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-20 22:50:45 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-20 22:50:45 -0500
commit8fb88c737e49321ff2b612a9d0e0e059c64c272a (patch)
tree6d22573479b7e7e047eceb85dbb7520b616a5a45 /src/arguments/roleWithDuration.ts
parentd4a401ed2315a7b5e7dfa390836f2ebae1299976 (diff)
downloadtanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.tar.gz
tanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.tar.bz2
tanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.zip
do some fixes or something
Diffstat (limited to 'src/arguments/roleWithDuration.ts')
-rw-r--r--src/arguments/roleWithDuration.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/arguments/roleWithDuration.ts b/src/arguments/roleWithDuration.ts
index 9bf4bb2..999ac1c 100644
--- a/src/arguments/roleWithDuration.ts
+++ b/src/arguments/roleWithDuration.ts
@@ -1,9 +1,7 @@
import { type BushArgumentTypeCaster } from '#lib';
+import { Role } from 'discord.js';
-export const roleWithDuration: BushArgumentTypeCaster = async (
- message,
- phrase
-): Promise<{ duration: number | null; role: string | null } | null> => {
+export const roleWithDuration: BushArgumentTypeCaster = async (message, phrase): Promise<RoleWithDuration | null> => {
// eslint-disable-next-line prefer-const
let { duration, contentWithoutTime } = client.util.parseDuration(phrase);
if (contentWithoutTime === null || contentWithoutTime === undefined) return null;
@@ -12,3 +10,8 @@ export const roleWithDuration: BushArgumentTypeCaster = async (
if (!role) return null;
return { duration, role };
};
+
+export interface RoleWithDuration {
+ duration: number | null;
+ role: Role | null;
+}