3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-19 16:05:01 +00:00

Fix !info breaking when used without specifying a user id

This commit is contained in:
Dragory 2020-08-05 19:10:55 +03:00
parent af253af7e6
commit 775120f728

View file

@ -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;