Added !poker and auth entry point
This commit is contained in:
@@ -4,9 +4,10 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"streambot_twitch/internal/auth"
|
||||
auth "streambot_twitch/internal/auth"
|
||||
"streambot_twitch/internal/chat"
|
||||
"streambot_twitch/internal/commands"
|
||||
"streambot_twitch/internal/points"
|
||||
twitchapi "streambot_twitch/internal/twitchapi"
|
||||
tests "streambot_twitch/internal/tests"
|
||||
twitch "github.com/gempir/go-twitch-irc/v4"
|
||||
@@ -14,7 +15,7 @@ import (
|
||||
|
||||
func main() {
|
||||
go func() {
|
||||
if err := oauth.StartOAuthServer(":8080"); err != nil {
|
||||
if err := auth.StartOAuthServer(":8080"); err != nil {
|
||||
log.Fatalf("OAuth server error: %v", err)
|
||||
}
|
||||
}()
|
||||
@@ -22,9 +23,9 @@ func main() {
|
||||
log.Println("OAuth server started on port 8080")
|
||||
|
||||
botUsername := os.Getenv("nz_chatterbot")
|
||||
botOAuth :+ os.Getenv("BOT_OAUTH")
|
||||
botOAuth := os.Getenv("BOT_OAUTH")
|
||||
channel := os Getenv("brycefromnz101")
|
||||
clientID := os.Getenv("TWITCH_CLIENTID")
|
||||
clientID := os.Getenv("TWITCH_CLIENT_ID")
|
||||
clientSecret := os.Getenv("TWITCH_CLIENT_SECRET")
|
||||
botChannel := botUsername
|
||||
|
||||
@@ -52,6 +53,14 @@ log.Println("OAuth server started on port 8080")
|
||||
log.Println("All startup tests passed. Starting bot. . .")
|
||||
// END of TESTS
|
||||
|
||||
// load chat points
|
||||
if err := points.LoadPoints(); err != nil {
|
||||
log.Fatalf("Failed to load points: %v", err)
|
||||
}
|
||||
|
||||
// make sure points are saved on exit
|
||||
defer points.SavePoints()
|
||||
|
||||
// load custom commands
|
||||
if err := commands.LoadCommands(); err != nil {
|
||||
log.Fatalf("Failed to Load Custom Commands: %v", err)
|
||||
|
Reference in New Issue
Block a user