Skip to content

Commit 8bc0576

Browse files
committed
Added version command
1 parent 0c6f10f commit 8bc0576

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/components/Chat.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function () {
4747
this.obsProps = obs;
4848
this.obs = obs.obs;
4949
this.prefix = _config.default.twitchChat.prefix;
50-
this.commands = ["host", "unhost", "start", "stop", "switch", "raid", "bitrate", "refresh", "trigger", "sourceinfo", "obsinfo", "public", "mod", "notify", "autostop", "rec"];
50+
this.commands = ["host", "unhost", "start", "stop", "switch", "raid", "bitrate", "refresh", "trigger", "sourceinfo", "obsinfo", "public", "mod", "notify", "autostop", "rec", "noalbs"];
5151
this.allowAllCommands = _config.default.twitchChat.publicCommands;
5252
this.allowModsCommands = _config.default.twitchChat.modCommands;
5353
this.wait = false;
@@ -641,6 +641,11 @@ function () {
641641
value: function say(message) {
642642
this.ws.send("PRIVMSG ".concat(this.channel, " :").concat(message));
643643
}
644+
}, {
645+
key: "noalbs",
646+
value: function noalbs(a) {
647+
if (a === "version") this.say("Running NOALBS v".concat(process.env.npm_package_version));
648+
}
644649
}]);
645650

646651
return Chat;

src/components/Chat.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class Chat {
3434
"mod",
3535
"notify",
3636
"autostop",
37-
"rec"
37+
"rec",
38+
"noalbs"
3839
];
3940
this.allowAllCommands = config.twitchChat.publicCommands;
4041
this.allowModsCommands = config.twitchChat.modCommands;
@@ -452,6 +453,10 @@ class Chat {
452453
say(message) {
453454
this.ws.send(`PRIVMSG ${this.channel} :${message}`);
454455
}
456+
457+
noalbs(a) {
458+
if (a === "version") this.say(`Running NOALBS v${process.env.npm_package_version}`);
459+
}
455460
}
456461

457462
export default Chat;

0 commit comments

Comments
 (0)