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.
|
// If the level returned is 0 then the user was not found in the database.
|
||||||
userLevel := app.GetUserLevel(message.User.Name)
|
userLevel := app.GetUserLevel(message.User.Name)
|
||||||
|
|
||||||
// app.Logger.Infow("Command received",
|
app.Logger.Infow("Command received",
|
||||||
// // "message", message, // Pretty taxing
|
// "message", message, // Pretty taxing
|
||||||
// "message.Message", message.Message,
|
"message.Message", message.Message,
|
||||||
// "message.Channel", target,
|
"message.Channel", target,
|
||||||
// "userLevel", userLevel,
|
"userLevel", userLevel,
|
||||||
// "commandName", commandName,
|
"commandName", commandName,
|
||||||
// "cmdParams", cmdParams,
|
"cmdParams", cmdParams,
|
||||||
// "msgLen", msgLen,
|
"msgLen", msgLen,
|
||||||
// )
|
)
|
||||||
|
|
||||||
// A `commandName` is every message starting with `()`.
|
// A `commandName` is every message starting with `()`.
|
||||||
// Hardcoded commands have a priority over database commands.
|
// Hardcoded commands have a priority over database commands.
|
||||||
|
|
|
@ -24,7 +24,6 @@ type config struct {
|
||||||
twitchClientId string
|
twitchClientId string
|
||||||
twitchClientSecret string
|
twitchClientSecret string
|
||||||
commandPrefix string
|
commandPrefix string
|
||||||
environment string
|
|
||||||
db struct {
|
db struct {
|
||||||
dsn string
|
dsn string
|
||||||
maxOpenConns int
|
maxOpenConns int
|
||||||
|
@ -127,6 +126,12 @@ func main() {
|
||||||
// Received a PrivateMessage (normal chat message).
|
// Received a PrivateMessage (normal chat message).
|
||||||
app.TwitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) {
|
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.
|
// roomId is the Twitch UserID of the channel the message originated from.
|
||||||
// If there is no roomId something went really wrong.
|
// If there is no roomId something went really wrong.
|
||||||
roomId := message.Tags["room-id"]
|
roomId := message.Tags["room-id"]
|
||||||
|
@ -163,7 +168,7 @@ func main() {
|
||||||
app.TwitchClient.OnConnect(func() {
|
app.TwitchClient.OnConnect(func() {
|
||||||
app.Logger.Infow("Successfully connected to Twitch Servers",
|
app.Logger.Infow("Successfully connected to Twitch Servers",
|
||||||
"Bot username", cfg.twitchUsername,
|
"Bot username", cfg.twitchUsername,
|
||||||
"Environment", cfg.environment,
|
"Environment", envFlag,
|
||||||
"Database Open Conns", cfg.db.maxOpenConns,
|
"Database Open Conns", cfg.db.maxOpenConns,
|
||||||
"Database Idle Conns", cfg.db.maxIdleConns,
|
"Database Idle Conns", cfg.db.maxIdleConns,
|
||||||
"Database Idle Time", cfg.db.maxIdleTime,
|
"Database Idle Time", cfg.db.maxIdleTime,
|
||||||
|
|
Loading…
Reference in a new issue