Add ignored config.go

This commit is contained in:
Ryan Cavicchioni 2022-08-08 00:40:43 -05:00
parent bbdbe1e926
commit b2f69ed2f7
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 37 additions and 1 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
config.* config.toml
config.hcl

35
command/config.go Normal file
View File

@ -0,0 +1,35 @@
package command
const (
defaultPrefix = "!"
)
var (
defaultReactions []string = []string{"👍", "🌶️", "🤣", "😂", "🍆", "🍑", "❤️", "💦", "😍", "💩", "🔥", "🍒", "🎉", "🥳", "🎊"}
)
type (
Config struct {
Handler HandlerConfig `mapstructure:"handler"`
Prefix string `mapstructure:"prefix"`
}
HandlerConfig struct {
Reaction ReactionConfig `mapstructure:"reaction"`
Weather WeatherConfig `mapstructure:"weather"`
}
ReactionConfig struct {
Emojis []string
Channels []string
}
)
func NewConfig() Config {
var c Config
c.Prefix = defaultPrefix
c.Handler.Reaction.Emojis = defaultReactions
return c
}