fixed compiler "unknown" type error

This commit is contained in:
mmacierzanka committed 2021-09-02 20:44:40 +02:00
1 parent fccc73f854
commit 69b91f82f3
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -176,7 +176,7 @@ export class Bot extends EventEmitter {
{ {
command: cmdMsg?.command, command: cmdMsg?.command,
user: m.member || undefined, user: m.member || undefined,
error: e, error: e as Error,
}, },
m m
); );
@@ -222,7 +222,7 @@ export class Bot extends EventEmitter {
{ {
command: cmd?.command, command: cmd?.command,
user: (i.member as GuildMember) || undefined, user: (i.member as GuildMember) || undefined,
error: e, error: e as Error,
}, },
i as CommandInteraction i as CommandInteraction
); );
@@ -234,7 +234,7 @@ export class Bot extends EventEmitter {
return true; return true;
} catch (e) { } catch (e) {
console.log("❌"); console.log("❌");
console.error(`[❌ ERROR] ${e.toString()}`); console.error(`[❌ ERROR] ${e}`);
return false; return false;
} }
} }
+1 -1
View File
@@ -98,7 +98,7 @@ export class CommandManager {
this.list.push(command); this.list.push(command);
return true; return true;
} catch (e) { } catch (e) {
console.error(`[❌ ERROR] ${e.toString()}`); console.error(`[❌ ERROR] ${e}`);
return false; return false;
} }
} }