From 18c1a8511bd28bced51f83baed6a93bad0f8a410 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Thu, 27 Jan 2022 17:59:07 +0700 Subject: [PATCH] Update Help.ts --- src/discord/Help.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/discord/Help.ts b/src/discord/Help.ts index 1f2f43c..b16ce26 100644 --- a/src/discord/Help.ts +++ b/src/discord/Help.ts @@ -7,7 +7,10 @@ const EMBEDS = { INFO: async (data: Message | Interaction) => { let GuildCache = await Cache.getGuild(data.guildId!); - //if(typeof GuildCache === 'undefined' || typeof GuildCache.prefix === 'undefined') return; + + // TODO: Better error handling + if(typeof GuildCache === 'undefined') + throw new Error("Guild not found"); let prefix = GuildCache.prefix || '>';