From b2f69ed2f7a79d3f66606885e29d774584fbbae7 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Mon, 8 Aug 2022 00:40:43 -0500 Subject: [PATCH] Add ignored config.go --- .gitignore | 3 ++- command/config.go | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 command/config.go diff --git a/.gitignore b/.gitignore index 35e38bc..901f905 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -config.* +config.toml +config.hcl diff --git a/command/config.go b/command/config.go new file mode 100644 index 0000000..f2ef0f5 --- /dev/null +++ b/command/config.go @@ -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 +}