Add ignored config.go
This commit is contained in:
parent
bbdbe1e926
commit
b2f69ed2f7
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
config.*
|
config.toml
|
||||||
|
config.hcl
|
||||||
|
35
command/config.go
Normal file
35
command/config.go
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user