You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're setting up err/kick/nope handlers to log an error occurred so a human can investigate later, we're specifically interested in logging the room ID the client was in at the time of death.
Looks like at the time of those event handlers being called, everything in the room is already undefined, including the ID.
We'd like to be able to log what room ID, if any, the bot was in when it received that error and died.
functiontetrjsFatal(client,kind,reason){// client.room.id is already undefined herelogWith(client.room?.id? `Room ${client.room.id}` : `Not in room`,`FATAL ${kind}: ${reason}`);}asyncfunctionnewClient(){constclient=newtetrjs.Client();awaitclient.login(creds.token);client.on('err',reason=>tetrjsFatal(client,'err',reason));client.on('kick',reason=>tetrjsFatal(client,'kick',reason));client.on('nope',reason=>tetrjsFatal(client,'nope',reason));returnclient;}
The text was updated successfully, but these errors were encountered:
We're setting up err/kick/nope handlers to log an error occurred so a human can investigate later, we're specifically interested in logging the room ID the client was in at the time of death.
Looks like at the time of those event handlers being called, everything in the room is already undefined, including the ID.
We'd like to be able to log what room ID, if any, the bot was in when it received that error and died.
The text was updated successfully, but these errors were encountered: