Compare commits

..

3 commits

Author SHA1 Message Date
liyunze
2c4d65e907 updated port and added password 2026-10-14 14:58:26 +08:00
liyunze
40f3da80f6 Merge branch 'main' of https://github.com/liyunze-coding/rython-task-bot-v2 2026-08-16 23:15:09 +10:00
liyunze
728b90dd43 updated streamerbot file 2026-08-16 23:13:09 +10:00
2 changed files with 21 additions and 12 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,13 +1,20 @@
// STREAMER.BOT SETTINGS // STREAMER.BOT SETTINGS
const client = new StreamerbotClient({ let client;
host: configs.streamerBotSettings.host,
port: configs.streamerBotSettings.port, try {
endpoint: configs.streamerBotSettings.endpoint, client = new StreamerbotClient({
onConnect: onConnect, host: configs.streamerBotSettings.host,
onDisconnect: onDisconnect, port: configs.streamerBotSettings.port,
onError: onError, endpoint: configs.streamerBotSettings.endpoint,
}); password: configs.streamerBotSettings.password ?? "",
onConnect,
onDisconnect,
onError,
});
} catch (err) {
onError(err);
}
client.on("General.Custom", (data) => onCustom(data)); client.on("General.Custom", (data) => onCustom(data));
if (configs.userColorSettings.autoUserColor) { if (configs.userColorSettings.autoUserColor) {
@ -56,9 +63,11 @@ function onDisconnect() {
} }
function onError(err) { function onError(err) {
showConnectionError( console.error("Streamer.bot connection error:", err);
"Connection Failed: " + (err?.message || "Unknown error"),
); showConnectionError(
"Connection Failed: " + (err?.message || "Unknown error"),
);
} }
function showConnectionError(message) { function showConnectionError(message) {