mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
resolveUser: return null if the passed value is not a valid id
This commit is contained in:
parent
5215dd0738
commit
a641312853
6 changed files with 21 additions and 4 deletions
|
@ -12,6 +12,10 @@ export async function createCaseNote(pluginData: PluginData<CasesPluginType>, ar
|
|||
}
|
||||
|
||||
const mod = await resolveUser(pluginData.client, args.modId);
|
||||
if (!mod) {
|
||||
throw new RecoverablePluginError(ERRORS.INVALID_USER);
|
||||
}
|
||||
|
||||
const modName = `${mod.username}#${mod.discriminator}`;
|
||||
|
||||
let body = args.body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue