Skip to content

Commit 84bc758

Browse files
committed
Feat: notify setting
1 parent 2823659 commit 84bc758

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"commands": {
1313
"prefix": "!",
14+
"notify": true,
1415
"vote": {
1516
"name": "vote",
1617
"admin": true

src/backend/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,6 @@ client.on("message", (channel, userState, message, self) => {
212212
});
213213

214214
function say(channel: string, message: string) {
215-
client.say(channel, message).catch(console.error);
215+
if (config.commands.notify)
216+
client.say(channel, message).catch(console.error);
216217
}

src/backend/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface Debug {
4141

4242
export interface Commands {
4343
prefix: string;
44+
notify: boolean;
4445
vote: Command;
4546
draw: Command;
4647
drawstop: Command;

0 commit comments

Comments
 (0)