Skip to content

Commit

Permalink
Added --disable-gmsgs and --disable-chatmsgs
Browse files Browse the repository at this point in the history
  • Loading branch information
LakeYS committed Jun 30, 2017
1 parent 13d8571 commit 4c339cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Commands can be sent via DM or in the specified chat channel.
# Terminal Commands
`exit`

# Configuration
You can configure the bot with a number of arguments.
- `--disable-commands` - Disable Discord commands such as 7dtd!time. Does not disable 7dtd!info.
- `--disable-chatmsgs` - Disable chat messages. Does not disable other messages such as join/leave and deaths.
- `--disable-gmsgs` - Disable other messages. Includes deaths, leaves/joins, etc.

# How to Install - Windows
## Creating the bot account
1. Log in to the [Discord developers section](https://discordapp.com/developers/applications/me) and click "New App".
Expand Down
Empty file removed config.json
Empty file.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function handleMsgFromGame(line) {
var split = line.split(" ");
var type = split[3];

if(type == "Chat:" || type == "GMSG:") {
if((argv["disable-chatmsgs"] !== 'true' && type == "Chat:") || (argv["disable-gmsgs"] !== 'true' && type == "GMSG:")) {
// Make sure the channel exists.
if(channel !== null) {
// Cut off the timestamp and other info
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

# Replace the following arguments with your Discord and game information.

node ./index.js --password="changeme" --token="your_token_here" --channel="channelid" --disable-commands=false
node ./index.js --password="changeme" --token="your_token_here" --channel="channelid" --disable-commands=false --disable-chatmsgs=false --disable-gmsgs=false

read -p "Press enter to continue" nothing

0 comments on commit 4c339cb

Please sign in to comment.