Skip to content

Commit e35f524

Browse files
committed
Fix some chat errors
1 parent d4d9738 commit e35f524

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

lib/components/Chat.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,16 @@ function () {
342342

343343
case 3:
344344
this.say("Scene successfully switched to \"".concat(sceneName, "\""));
345-
_context3.next = 9;
345+
_context3.next = 10;
346346
break;
347347

348348
case 6:
349349
_context3.prev = 6;
350350
_context3.t0 = _context3["catch"](0);
351351
log.error(_context3.t0);
352+
this.say(_context3.t0.error);
352353

353-
case 9:
354+
case 10:
354355
case "end":
355356
return _context3.stop();
356357
}
@@ -367,7 +368,11 @@ function () {
367368
}, {
368369
key: "bitrate",
369370
value: function bitrate() {
370-
this.say("Current bitrate: ".concat(this.obsProps.bitrate, " Kbps"));
371+
if (this.obsProps.bitrate != null) {
372+
this.say("Current bitrate: ".concat(this.obsProps.bitrate, " Kbps"));
373+
} else {
374+
this.say("Current bitrate: offline");
375+
}
371376
}
372377
}, {
373378
key: "sourceinfo",

src/components/Chat.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,16 @@ class Chat {
273273
this.say(`Scene successfully switched to "${sceneName}"`);
274274
} catch (e) {
275275
log.error(e);
276+
this.say(e.error);
276277
}
277278
}
278279

279280
bitrate() {
280-
this.say(`Current bitrate: ${this.obsProps.bitrate} Kbps`);
281+
if (this.obsProps.bitrate != null) {
282+
this.say(`Current bitrate: ${this.obsProps.bitrate} Kbps`);
283+
} else {
284+
this.say(`Current bitrate: offline`);
285+
}
281286
}
282287

283288
sourceinfo() {

0 commit comments

Comments
 (0)