Skip to content

Commit 18e93d7

Browse files
author
denverquane
committed
Adds env var for bot presence message
1 parent 1cefaa1 commit 18e93d7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Heroku hosting steps are are not yet updated for v3.0+ of AutoMuteUs, and as suc
155155
- `LOG_PATH`: Filesystem path for log files. Defaults to `./`
156156
- `CAPTURE_TIMEOUT`: How many seconds of no capture events received before the Bot will terminate the associated game/connection. Defaults to 36000 seconds.
157157
- `REDIS_PASS`: Your Redis database password, if necessary.
158+
- `AUTOMUTEUS_LISTENING`: What the bot displays it is "Listening to" in the online presence message. Recommend putting your custom command prefix here
158159

159160
### HIGHLY advanced. Probably don't ever touch these!
160161

discord/bot.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"github.com/denverquane/amongusdiscord/game"
66
"github.com/denverquane/amongusdiscord/storage"
77
"log"
8+
"os"
89
"strings"
910
"sync"
1011
)
@@ -113,10 +114,15 @@ func MakeAndStartBot(version, commit, token, token2, url, emojiGuildID string, n
113114

114115
log.Println("Finished identifying to the Discord API. Now ready for incoming events")
115116

117+
listeningTo := os.Getenv("AUTOMUTEUS_LISTENING")
118+
if listeningTo == "" {
119+
listeningTo = ".au help"
120+
}
121+
116122
status := &discordgo.UpdateStatusData{
117123
IdleSince: nil,
118124
Game: &discordgo.Game{
119-
Name: ".au help",
125+
Name: listeningTo,
120126
Type: discordgo.GameTypeListening,
121127
},
122128
AFK: false,

0 commit comments

Comments
 (0)