Fixed checking username on non-existent user.

This commit is contained in:
Niels Simenon 2022-11-26 16:49:29 +01:00
parent 761078bf19
commit 87f2e81794
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ function onMessage(message, bot, games) {
}
}
if (message.type === 'message' && user.username !== config.user.username) {
if (message.type === 'message' && user?.username !== config.user.username) {
Object.values(Object.fromEntries(Object.values(games).map((game) => [game.key, game]))).forEach((game) => game.onMessage?.(message, {
...game,
bot,