Sfoglia il codice sorgente

Add check for DM prevention

ghorsington 5 anni fa
parent
commit
31a87e7bd1
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      bot/src/util.ts

+ 3 - 0
bot/src/util.ts

@@ -25,6 +25,9 @@ export function isValidImage(fileName: string) {
 }
 
 export async function isAuthorisedAsync(member : GuildMember) {
+    if(!member)
+        return false;
+        
     let repo = getRepository(KnownUser);
 
     let user = await repo.findOne({