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