Skip to content

Commit

Permalink
Hide messages from bots w/ config toggle
Browse files Browse the repository at this point in the history
Disable showing messages from other Discord bots in-game by default. Add a config option to toggle this.
  • Loading branch information
LakeYS committed Dec 31, 2023
1 parent 38986ae commit 7799892
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"disable-misc-gmsgs": false,
"disable-non-player-chatmsgs": true,
"show-private-chat": false,
"show-discord-bot-msgs": false,
"disable-status-updates": false,
"disable-version-check": false,
"hide-prefix": false,
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@ if(!config["skip-discord-auth"]) {
return;
}

if(!config["show-discord-bot-msgs"] && msg.author.bot === true) {
return;
}

// If the bot is mentioned, pass through as if the user typed 7d!info
// Also includes overrides for the default prefix.
var mentioned = msg.content.includes("<@" + client.user.id + ">") || msg.content === "7d!info" || msg.content === "7d!help";
Expand Down

0 comments on commit 7799892

Please sign in to comment.