Fixed checking username on non-existent user.
This commit is contained in:
parent
761078bf19
commit
87f2e81794
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue