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
8
package-lock.json
generated
8
package-lock.json
generated
|
|
@ -3070,6 +3070,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
||||||
"integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw=="
|
"integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw=="
|
||||||
},
|
},
|
||||||
|
"ts-debounce": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-jlrN8iK/Iif5pQd+pIsH8uEexj3vvUT+BwqNrJt5xgZB+ucwVfQVAUMC8Dnx0vlk7AktHxoD9ZDYYVYUtxd5wA=="
|
||||||
|
},
|
||||||
"tunnel-agent": {
|
"tunnel-agent": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
|
|
@ -3100,7 +3105,8 @@
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz",
|
||||||
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ=="
|
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"typical": {
|
"typical": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
"mx-puppet-bridge": "0.1.0-1",
|
"mx-puppet-bridge": "0.1.0-1",
|
||||||
"steam-user": "4.18.0",
|
"steam-user": "4.18.0",
|
||||||
"steamcommunity": "3.42.0",
|
"steamcommunity": "3.42.0",
|
||||||
"steamid": "1.1.3"
|
"steamid": "1.1.3",
|
||||||
|
"ts-debounce": "2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^14.14.10",
|
"@types/node": "^14.14.10",
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import {
|
||||||
IPersona,
|
IPersona,
|
||||||
isBBCode
|
isBBCode
|
||||||
} from "./interfaces";
|
} from "./interfaces";
|
||||||
|
import { debounce } from 'ts-debounce';
|
||||||
|
|
||||||
const log = new Log("MatrixPuppet:Steam");
|
const log = new Log("MatrixPuppet:Steam");
|
||||||
|
|
||||||
|
|
@ -239,6 +240,10 @@ export class Steam {
|
||||||
client.chat.on("chatMessage", (message) => {
|
client.chat.on("chatMessage", (message) => {
|
||||||
this.handleChatMessage(puppetId, message);
|
this.handleChatMessage(puppetId, message);
|
||||||
});
|
});
|
||||||
|
community.on("sessionExpired", debounce(() => {
|
||||||
|
log.info(`steamcommunity session expired`);
|
||||||
|
client.webLogOn();
|
||||||
|
}, 60 * 1000));
|
||||||
|
|
||||||
client.on("error", (err) => {
|
client.on("error", (err) => {
|
||||||
log.error(`Failed to start up puppet ${puppetId}`, err);
|
log.error(`Failed to start up puppet ${puppetId}`, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue