aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/discordEmoji.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/discordEmoji.ts
parentd4a401ed2315a7b5e7dfa390836f2ebae1299976 (diff)
downloadtanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.tar.gz
tanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.tar.bz2
tanzanite-8fb88c737e49321ff2b612a9d0e0e059c64c272a.zip
do some fixes or something
Diffstat (limited to 'src/arguments/discordEmoji.ts')
-rw-r--r--src/arguments/discordEmoji.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arguments/discordEmoji.ts b/src/arguments/discordEmoji.ts
index 8648f7f..a3c531c 100644
--- a/src/arguments/discordEmoji.ts
+++ b/src/arguments/discordEmoji.ts
@@ -1,9 +1,14 @@
import { type BushArgumentTypeCaster } from '#lib';
import { type Snowflake } from 'discord-api-types';
-export const discordEmoji: BushArgumentTypeCaster = (_, phrase): { name: string; id: Snowflake } | null => {
+export const discordEmoji: BushArgumentTypeCaster = (_, phrase): DiscordEmojiInfo | null => {
if (!phrase) return null;
const validEmoji: RegExpExecArray | null = client.consts.regex.discordEmoji.exec(phrase);
if (!validEmoji || !validEmoji.groups) return null;
return { name: validEmoji.groups.name, id: validEmoji.groups.id };
};
+
+export interface DiscordEmojiInfo {
+ name: string;
+ id: Snowflake;
+}