mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
use go-twitch-irc v3 instead
This commit is contained in:
parent
8375f90265
commit
82626346ce
3 changed files with 16 additions and 7 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/gempir/go-twitch-irc/v2"
|
||||
"github.com/gempir/go-twitch-irc/v3"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
|
@ -32,8 +32,8 @@ func main() {
|
|||
log.Fatal("Error loading .env file")
|
||||
}
|
||||
|
||||
cfg.botUsername = os.Getenv("TWITCH_USER")
|
||||
cfg.botOauth = os.Getenv("TWITCH_OAUTH")
|
||||
cfg.botUsername = os.Getenv("BOT_USER")
|
||||
cfg.botOauth = os.Getenv("BOT_OAUTH")
|
||||
|
||||
logger := log.New(os.Stdout, "", log.Ldate|log.Ltime)
|
||||
|
||||
|
@ -44,5 +44,14 @@ func main() {
|
|||
logger: logger,
|
||||
}
|
||||
|
||||
app.twitchClient.Connect()
|
||||
app.twitchClient.Join("nourylul")
|
||||
app.twitchClient.Join("nourybot")
|
||||
|
||||
app.twitchClient.Say("nourylul", "xd")
|
||||
app.twitchClient.Say("nourybot", "xd")
|
||||
|
||||
err = app.twitchClient.Connect()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -3,6 +3,6 @@ module github.com/lyx0/nourybot
|
|||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/gempir/go-twitch-irc/v2 v2.8.1
|
||||
github.com/gempir/go-twitch-irc/v3 v3.1.0
|
||||
github.com/joho/godotenv v1.4.0
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,4 +1,4 @@
|
|||
github.com/gempir/go-twitch-irc/v2 v2.8.1 h1:M0Rt2ODGPEk33+UEwv2XSrnGMMwVyUoBt+MNI3ZVf8c=
|
||||
github.com/gempir/go-twitch-irc/v2 v2.8.1/go.mod h1:120d2SdlRYg8tRnZwsyNPeS+mWPn+YmNEzB7Bv/CDGE=
|
||||
github.com/gempir/go-twitch-irc/v3 v3.1.0 h1:bUVZ5mADhH7KidJVcl+z79kgLJ7sjdAk4b/ylAvaLy0=
|
||||
github.com/gempir/go-twitch-irc/v3 v3.1.0/go.mod h1:/W9KZIiyizVecp4PEb7kc4AlIyXKiCmvlXrzlpPUytU=
|
||||
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
||||
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
|
|
Loading…
Reference in a new issue