mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fix crash from invalid user id in !addcase
This commit is contained in:
parent
785813f495
commit
d35564eac8
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,9 @@ export const AddCaseCmd = 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`);
|
||||
}
|
||||
|
||||
// If the user exists as a guild member, make sure we can act on them first
|
||||
const member = await resolveMember(pluginData.client, pluginData.guild, user.id);
|
||||
|
|
Loading…
Add table
Reference in a new issue