From 0dc629ca84fb97ce7c820a06f5ecd1750ce2cb3e Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 5 Aug 2020 19:10:55 +0300 Subject: [PATCH] Fix !info breaking when used without specifying a user id --- backend/src/plugins/Utility/commands/InfoCmd.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/commands/InfoCmd.ts b/backend/src/plugins/Utility/commands/InfoCmd.ts index 91db6b96..68d420ee 100644 --- a/backend/src/plugins/Utility/commands/InfoCmd.ts +++ b/backend/src/plugins/Utility/commands/InfoCmd.ts @@ -16,7 +16,8 @@ export const InfoCmd = utilityCmd({ }, async run({ message, args, pluginData }) { - const embed = await getUserInfoEmbed(pluginData, args.user.id, args.compact); + const userId = args.user?.id || message.author.id; + const embed = await getUserInfoEmbed(pluginData, userId, args.compact); if (!embed) { sendErrorMessage(pluginData, message.channel, "User not found"); return;