3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 00:35:02 +00:00

Fix several locations that expected resolveUser() to return null

This commit is contained in:
Dragory 2020-12-17 04:12:49 +02:00
parent 127ef260f1
commit 6872539d4d
13 changed files with 35 additions and 13 deletions

View file

@ -20,7 +20,9 @@ export const NoteCmd = modActionsCmd({
async run({ pluginData, message: msg, args }) {
const user = await resolveUser(pluginData.client, args.user);
if (!user) return sendErrorMessage(pluginData, msg.channel, `User not found`);
if (!user.id) {
return sendErrorMessage(pluginData, msg.channel, `User not found`);
}
const userName = `${user.username}#${user.discriminator}`;
const reason = formatReasonWithAttachments(args.note, msg.attachments);