From 34e2bddef13da5ef233aa33fd9ace8429597b64e Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Sun, 7 Nov 2021 17:33:39 +0100 Subject: [PATCH] remove helix stuff --- cmd/bot/bot.go | 2 -- cmd/main.go | 10 ---------- go.mod | 2 -- go.sum | 4 ---- pkg/config/config.go | 20 ++++++++------------ 5 files changed, 8 insertions(+), 30 deletions(-) diff --git a/cmd/bot/bot.go b/cmd/bot/bot.go index 191c065..ca8e8c9 100644 --- a/cmd/bot/bot.go +++ b/cmd/bot/bot.go @@ -4,13 +4,11 @@ import ( "time" twitch "github.com/gempir/go-twitch-irc/v2" - "github.com/nicklaw5/helix" "go.mongodb.org/mongo-driver/mongo" ) type Bot struct { TwitchClient *twitch.Client - HelixClient *helix.Client MongoClient *mongo.Client Uptime time.Time } diff --git a/cmd/main.go b/cmd/main.go index 4818d02..02d9c5f 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -10,7 +10,6 @@ import ( "github.com/lyx0/nourybot/pkg/config" "github.com/lyx0/nourybot/pkg/db" "github.com/lyx0/nourybot/pkg/handlers" - "github.com/nicklaw5/helix" log "github.com/sirupsen/logrus" ) @@ -25,17 +24,8 @@ func main() { conf := config.LoadConfig() - helixClient, err := helix.NewClient(&helix.Options{ - ClientID: conf.ClientId, - ClientSecret: conf.ClientSecret, - }) - if err != nil { - log.Fatalf("Error creating helix client: %s", err) - } - nb = &bot.Bot{ TwitchClient: twitch.NewClient(conf.Username, conf.Oauth), - HelixClient: helixClient, MongoClient: db.Connect(conf), Uptime: time.Now(), } diff --git a/go.mod b/go.mod index 99e9489..c08b916 100644 --- a/go.mod +++ b/go.mod @@ -12,10 +12,8 @@ require ( require ( github.com/go-stack/stack v1.8.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect github.com/golang/snappy v0.0.1 // indirect github.com/klauspost/compress v1.13.6 // indirect - github.com/nicklaw5/helix v1.25.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.0.2 // indirect diff --git a/go.sum b/go.sum index 31dc50e..0b36145 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,6 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= @@ -54,8 +52,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/nicklaw5/helix v1.25.0 h1:Mrz537izZVsGdM3I46uGAAlslj61frgkhS/9xQqyT/M= -github.com/nicklaw5/helix v1.25.0/go.mod h1:yvXZFapT6afIoxnAvlWiJiUMsYnoHl7tNs+t0bloAMw= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/config/config.go b/pkg/config/config.go index 1432880..4538075 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -8,12 +8,10 @@ import ( ) type Config struct { - Username string - Oauth string - ClientId string - ClientSecret string - BotUserId string - MongoURI string + Username string + Oauth string + BotUserId string + MongoURI string } func LoadConfig() *Config { @@ -24,12 +22,10 @@ func LoadConfig() *Config { } cfg := &Config{ - Username: os.Getenv("TWITCH_USER"), - Oauth: os.Getenv("TWITCH_PASS"), - ClientId: os.Getenv("CLIENT_ID"), - ClientSecret: os.Getenv("CLIENT_SECRET"), - BotUserId: os.Getenv("BOT_USER_ID"), - MongoURI: os.Getenv("MONGO_URI"), + Username: os.Getenv("TWITCH_USER"), + Oauth: os.Getenv("TWITCH_PASS"), + BotUserId: os.Getenv("BOT_USER_ID"), + MongoURI: os.Getenv("MONGO_URI"), } log.Info("Config loaded succesfully")