mirror of
https://github.com/liyunze-coding/rython-task-bot-v2.git
synced 2026-11-06 08:43:33 +00:00
updated port and added password
This commit is contained in:
parent
40f3da80f6
commit
2c4d65e907
2 changed files with 21 additions and 12 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +1,20 @@
|
|||
// STREAMER.BOT SETTINGS
|
||||
|
||||
const client = new StreamerbotClient({
|
||||
host: configs.streamerBotSettings.host,
|
||||
port: configs.streamerBotSettings.port,
|
||||
endpoint: configs.streamerBotSettings.endpoint,
|
||||
onConnect: onConnect,
|
||||
onDisconnect: onDisconnect,
|
||||
onError: onError,
|
||||
});
|
||||
let client;
|
||||
|
||||
try {
|
||||
client = new StreamerbotClient({
|
||||
host: configs.streamerBotSettings.host,
|
||||
port: configs.streamerBotSettings.port,
|
||||
endpoint: configs.streamerBotSettings.endpoint,
|
||||
password: configs.streamerBotSettings.password ?? "",
|
||||
onConnect,
|
||||
onDisconnect,
|
||||
onError,
|
||||
});
|
||||
} catch (err) {
|
||||
onError(err);
|
||||
}
|
||||
|
||||
client.on("General.Custom", (data) => onCustom(data));
|
||||
if (configs.userColorSettings.autoUserColor) {
|
||||
|
|
@ -56,9 +63,11 @@ function onDisconnect() {
|
|||
}
|
||||
|
||||
function onError(err) {
|
||||
showConnectionError(
|
||||
"Connection Failed: " + (err?.message || "Unknown error"),
|
||||
);
|
||||
console.error("Streamer.bot connection error:", err);
|
||||
|
||||
showConnectionError(
|
||||
"Connection Failed: " + (err?.message || "Unknown error"),
|
||||
);
|
||||
}
|
||||
|
||||
function showConnectionError(message) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue