Add support for recurring events and add year to channel name (#3)

This commit is contained in:
2023-03-05 13:08:18 -05:00
committed by GitHub
parent 97c9006fef
commit 228c293b70
7 changed files with 81 additions and 15 deletions

10
main.go
View File

@@ -4,14 +4,21 @@ import (
"flag"
"fmt"
"log"
"os"
"path"
"github.com/yeslayla/birdbot/app"
)
func main() {
configDir, _ := os.UserConfigDir()
defaultConfigPath := path.Join(configDir, "birdbot", "config.yaml")
var config_file string
var version bool
flag.StringVar(&config_file, "c", "birdbot.yaml", "Path to config file")
flag.StringVar(&config_file, "c", defaultConfigPath, "Path to config file")
flag.BoolVar(&version, "v", false, "List version")
flag.Parse()
@@ -21,6 +28,7 @@ func main() {
}
bot := app.NewBot()
if err := bot.Initialize(config_file); err != nil {
log.Fatal("Failed to initialize: ", err)
}