Fix !info breaking when used without specifying a user id
This commit is contained in:
parent
7d48f77935
commit
0dc629ca84
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue