Fix several locations that expected resolveUser() to return null
This commit is contained in:
parent
d35564eac8
commit
b9dde47a9e
13 changed files with 35 additions and 13 deletions
|
@ -36,7 +36,9 @@ export const CasesUserCmd = 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 cases = await pluginData.state.cases.with("notes").getByUserId(user.id);
|
||||
const normalCases = cases.filter(c => !c.is_hidden);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue