diff options
| author | ilotterytea <iltsu@alright.party> | 2025-10-11 20:59:20 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-10-11 20:59:20 +0500 |
| commit | ff00bb140ee738e3b802d77f07f9098924f3de6a (patch) | |
| tree | 4929c70a136d069fac85b56c4bd13aef53200709 /cmd/statsbot | |
| parent | d680e3d9566c622c16f299c3399b5668b9b34cb0 (diff) | |
feat: database
Diffstat (limited to 'cmd/statsbot')
| -rw-r--r-- | cmd/statsbot/main.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/statsbot/main.go b/cmd/statsbot/main.go index 4e4ac77..06f010c 100644 --- a/cmd/statsbot/main.go +++ b/cmd/statsbot/main.go @@ -4,9 +4,17 @@ import ( "log" "github.com/gempir/go-twitch-irc" + + stats "ilotterytea/tinystats/internal" ) func main() { + db, err := stats.NewDatabaseConnection("mysql", "kochan:kochan@/stats") + if err != nil { + log.Panicf("Failed to establish database connection: %v\n", err) + } + defer db.Close() + client := twitch.NewClient("justinfan65432", "12345") client.OnConnect(func() { |
