mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
remove environment config variable
This commit is contained in:
parent
1b382c3e95
commit
6448c71fc1
|
@ -45,15 +45,15 @@ func (app *Application) handleCommand(message twitch.PrivateMessage) {
|
|||
// If the level returned is 0 then the user was not found in the database.
|
||||
userLevel := app.GetUserLevel(message.User.Name)
|
||||
|
||||
// app.Logger.Infow("Command received",
|
||||
// // "message", message, // Pretty taxing
|
||||
// "message.Message", message.Message,
|
||||
// "message.Channel", target,
|
||||
// "userLevel", userLevel,
|
||||
// "commandName", commandName,
|
||||
// "cmdParams", cmdParams,
|
||||
// "msgLen", msgLen,
|
||||
// )
|
||||
app.Logger.Infow("Command received",
|
||||
// "message", message, // Pretty taxing
|
||||
"message.Message", message.Message,
|
||||
"message.Channel", target,
|
||||
"userLevel", userLevel,
|
||||
"commandName", commandName,
|
||||
"cmdParams", cmdParams,
|
||||
"msgLen", msgLen,
|
||||
)
|
||||
|
||||
// A `commandName` is every message starting with `()`.
|
||||
// Hardcoded commands have a priority over database commands.
|
||||
|
|
|
@ -24,7 +24,6 @@ type config struct {
|
|||
twitchClientId string
|
||||
twitchClientSecret string
|
||||
commandPrefix string
|
||||
environment string
|
||||
db struct {
|
||||
dsn string
|
||||
maxOpenConns int
|
||||
|
@ -127,6 +126,12 @@ func main() {
|
|||
// Received a PrivateMessage (normal chat message).
|
||||
app.TwitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) {
|
||||
|
||||
app.Logger.Infow("Message received",
|
||||
"message", message,
|
||||
"message.User.DisplayName", message.User.DisplayName,
|
||||
"message.Message", message.Message,
|
||||
)
|
||||
|
||||
// roomId is the Twitch UserID of the channel the message originated from.
|
||||
// If there is no roomId something went really wrong.
|
||||
roomId := message.Tags["room-id"]
|
||||
|
@ -163,7 +168,7 @@ func main() {
|
|||
app.TwitchClient.OnConnect(func() {
|
||||
app.Logger.Infow("Successfully connected to Twitch Servers",
|
||||
"Bot username", cfg.twitchUsername,
|
||||
"Environment", cfg.environment,
|
||||
"Environment", envFlag,
|
||||
"Database Open Conns", cfg.db.maxOpenConns,
|
||||
"Database Idle Conns", cfg.db.maxIdleConns,
|
||||
"Database Idle Time", cfg.db.maxIdleTime,
|
||||
|
|
Loading…
Reference in a new issue