mirror of
https://github.com/icewind1991/mx-puppet-steam.git
synced 2026-06-03 17:44:09 +02:00
attempt to reconnect to steamcommunity
This commit is contained in:
parent
1291cc6ad0
commit
5225905dc1
3 changed files with 14 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ import {
|
|||
IPersona,
|
||||
isBBCode
|
||||
} from "./interfaces";
|
||||
import { debounce } from 'ts-debounce';
|
||||
|
||||
const log = new Log("MatrixPuppet:Steam");
|
||||
|
||||
|
|
@ -239,6 +240,10 @@ export class Steam {
|
|||
client.chat.on("chatMessage", (message) => {
|
||||
this.handleChatMessage(puppetId, message);
|
||||
});
|
||||
community.on("sessionExpired", debounce(() => {
|
||||
log.info(`steamcommunity session expired`);
|
||||
client.webLogOn();
|
||||
}, 60 * 1000));
|
||||
|
||||
client.on("error", (err) => {
|
||||
log.error(`Failed to start up puppet ${puppetId}`, err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue