mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
upgrade to go-twitch-irc v4
This commit is contained in:
parent
0d313b7b0a
commit
f094d4c5dd
|
@ -3,7 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands"
|
"github.com/lyx0/nourybot/internal/commands"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/jakecoffman/cron"
|
"github.com/jakecoffman/cron"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands"
|
"github.com/lyx0/nourybot/internal/commands"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -46,7 +46,7 @@ func (app *Application) DebugUser(login string, message twitch.PrivateMessage) {
|
||||||
} else {
|
} else {
|
||||||
reply := fmt.Sprintf("User %v: ID %v, Login: %s, TwitchID: %v, Level: %v", login, user.ID, user.Login, user.TwitchID, user.Level)
|
reply := fmt.Sprintf("User %v: ID %v, Login: %s, TwitchID: %v, Level: %v", login, user.ID, user.Login, user.TwitchID, user.Level)
|
||||||
common.Send(message.Channel, reply, app.TwitchClient)
|
common.Send(message.Channel, reply, app.TwitchClient)
|
||||||
app.TwitchClient.Whisper(message.User.Name, reply)
|
//app.TwitchClient.Whisper(message.User.Name, reply)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
6
go.mod
6
go.mod
|
@ -5,12 +5,14 @@ go 1.20
|
||||||
require (
|
require (
|
||||||
github.com/briandowns/openweathermap v0.18.0
|
github.com/briandowns/openweathermap v0.18.0
|
||||||
github.com/dustin/go-humanize v1.0.0
|
github.com/dustin/go-humanize v1.0.0
|
||||||
github.com/gempir/go-twitch-irc/v3 v3.2.0
|
github.com/gempir/go-twitch-irc/v4 v4.0.0 // indirect
|
||||||
github.com/jakecoffman/cron v0.0.0-20190106200828-7e2009c226a5
|
github.com/jakecoffman/cron v0.0.0-20190106200828-7e2009c226a5
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/julienschmidt/httprouter v1.3.0
|
github.com/julienschmidt/httprouter v1.3.0
|
||||||
github.com/lib/pq v1.10.6
|
github.com/lib/pq v1.10.6
|
||||||
github.com/nicklaw5/helix v1.25.0
|
github.com/nicklaw5/helix v1.25.0
|
||||||
|
github.com/redis/go-redis/v9 v9.0.3
|
||||||
|
github.com/shkh/lastfm-go v0.0.0-20191215035245-89a801c244e0
|
||||||
go.uber.org/zap v1.21.0
|
go.uber.org/zap v1.21.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,8 +20,6 @@ require (
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
|
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
|
||||||
github.com/redis/go-redis/v9 v9.0.3 // indirect
|
|
||||||
github.com/shkh/lastfm-go v0.0.0-20191215035245-89a801c244e0 // indirect
|
|
||||||
go.uber.org/atomic v1.9.0 // indirect
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
go.uber.org/multierr v1.8.0 // indirect
|
go.uber.org/multierr v1.8.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
8
go.sum
8
go.sum
|
@ -2,6 +2,8 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj
|
||||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||||
github.com/briandowns/openweathermap v0.18.0 h1:JYTtJ4bKjXZRmDTe7huJ5+dZ7CsjPUw10GUzMASkNV8=
|
github.com/briandowns/openweathermap v0.18.0 h1:JYTtJ4bKjXZRmDTe7huJ5+dZ7CsjPUw10GUzMASkNV8=
|
||||||
github.com/briandowns/openweathermap v0.18.0/go.mod h1:0GLnknqicWxXnGi1IqoOaZIw+kIe5hkt+YM5WY3j8+0=
|
github.com/briandowns/openweathermap v0.18.0/go.mod h1:0GLnknqicWxXnGi1IqoOaZIw+kIe5hkt+YM5WY3j8+0=
|
||||||
|
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
|
||||||
|
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
@ -11,8 +13,10 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||||
github.com/gempir/go-twitch-irc/v3 v3.2.0 h1:ENhsa7RgBE1GMmDqe0iMkvcSYfgw6ZsXilt+sAg32/U=
|
github.com/gempir/go-twitch-irc/v4 v3.2.0 h1:ENhsa7RgBE1GMmDqe0iMkvcSYfgw6ZsXilt+sAg32/U=
|
||||||
github.com/gempir/go-twitch-irc/v3 v3.2.0/go.mod h1:/W9KZIiyizVecp4PEb7kc4AlIyXKiCmvlXrzlpPUytU=
|
github.com/gempir/go-twitch-irc/v4 v3.2.0/go.mod h1:/W9KZIiyizVecp4PEb7kc4AlIyXKiCmvlXrzlpPUytU=
|
||||||
|
github.com/gempir/go-twitch-irc/v4 v4.0.0 h1:sHVIvbWOv9nHXGEErilclxASv0AaQEr/r/f9C0B9aO8=
|
||||||
|
github.com/gempir/go-twitch-irc/v4 v4.0.0/go.mod h1:QsOMMAk470uxQ7EYD9GJBGAVqM/jDrXBNbuePfTauzg=
|
||||||
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
|
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-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||||
github.com/jakecoffman/cron v0.0.0-20190106200828-7e2009c226a5 h1:kCvm3G3u+eTRbjfLPyfsfznJtraYEfZer/UvQ6CaQhI=
|
github.com/jakecoffman/cron v0.0.0-20190106200828-7e2009c226a5 h1:kCvm3G3u+eTRbjfLPyfsfznJtraYEfZer/UvQ6CaQhI=
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/ivr"
|
"github.com/lyx0/nourybot/internal/commands/ivr"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/shkh/lastfm-go/lastfm"
|
"github.com/shkh/lastfm-go/lastfm"
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/humanize"
|
"github.com/lyx0/nourybot/internal/humanize"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
owm "github.com/briandowns/openweathermap"
|
owm "github.com/briandowns/openweathermap"
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"github.com/lyx0/nourybot/internal/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import "github.com/gempir/go-twitch-irc/v3"
|
import "github.com/gempir/go-twitch-irc/v4"
|
||||||
|
|
||||||
// ElevatedPrivsMessage is checking a given message twitch.PrivateMessage
|
// ElevatedPrivsMessage is checking a given message twitch.PrivateMessage
|
||||||
// if it came from a moderator/vip/or broadcaster and returns a bool
|
// if it came from a moderator/vip/or broadcaster and returns a bool
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue