2022-08-23 16:52:36 +00:00
|
|
|
package bot
|
2022-08-08 05:40:43 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
defaultPrefix = "!"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
defaultReactions []string = []string{"👍", "🌶️", "🤣", "😂", "🍆", "🍑", "❤️", "💦", "😍", "💩", "🔥", "🍒", "🎉", "🥳", "🎊"}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
Config struct {
|
2022-08-28 14:45:34 +00:00
|
|
|
Debug bool `mapstructure:"debug"`
|
2022-08-23 00:29:42 +00:00
|
|
|
Handler HandlerConfig `mapstructure:"handler"`
|
|
|
|
Prefix string `mapstructure:"prefix"`
|
|
|
|
DiscordToken string `mapstructure:"discord_token"`
|
|
|
|
OpenWeatherMapToken string `mapstructure:"open_weather_map_token"`
|
2022-08-08 05:40:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HandlerConfig struct {
|
|
|
|
Reaction ReactionConfig `mapstructure:"reaction"`
|
|
|
|
}
|
|
|
|
|
|
|
|
ReactionConfig struct {
|
|
|
|
Emojis []string
|
|
|
|
Channels []string
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func NewConfig() Config {
|
|
|
|
var c Config
|
|
|
|
|
|
|
|
c.Prefix = defaultPrefix
|
|
|
|
c.Handler.Reaction.Emojis = defaultReactions
|
|
|
|
|
|
|
|
return c
|
|
|
|
}
|