rename config var

This commit is contained in:
Ryan Cavicchioni 2022-07-27 19:35:13 -05:00
parent cd783493c9
commit 348cd543fc
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -27,7 +27,7 @@ var (
defaultReactions []string = []string{"👍", "🌶️", "🤣", "😂", "🍆", "🍑", "❤️", "💦", "😍", "💩", "🔥", "🍒", "🎉", "🥳", "🎊"}
config Config
C Config
)
type (
@ -75,7 +75,7 @@ func main() {
Token, ok := viper.Get("discord_token").(string)
err = viper.Unmarshal(&config)
err = viper.Unmarshal(&C)
if err != nil {
log.Fatalf("unable to decode into struct: %v", err)
}
@ -132,8 +132,8 @@ func reactionHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
return
}
emojis := config.Handler.Reaction.Emojis
channels := config.Handler.Reaction.Channels
emojis := C.Handler.Reaction.Emojis
channels := C.Handler.Reaction.Channels
if len(emojis) == 0 {
log.Warning("emoji list is empty")