Fix several locations that expected resolveUser() to return null

This commit is contained in:
Dragory 2020-12-17 04:12:49 +02:00
parent d35564eac8
commit b9dde47a9e
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
13 changed files with 35 additions and 13 deletions

View file

@ -27,7 +27,7 @@ export async function banUserId(
): Promise<BanResult> {
const config = pluginData.config.get();
const user = await resolveUser(pluginData.client, userId);
if (!user) {
if (!user.id) {
return {
status: "failed",
error: "Invalid user",