mirror of
https://github.com/AynaLivePlayer/blivedm-go.git
synced 2025-12-06 11:22:50 +08:00
update example
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/AynaLivePlayer/blivedm-go/client"
|
||||
_ "github.com/AynaLivePlayer/blivedm-go/utils"
|
||||
@@ -9,14 +10,14 @@ import (
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
const roomId = 8792912
|
||||
const roomId = 3819533
|
||||
|
||||
var dumps = []string{"GUARD_BUY", "USER_TOAST_MSG"}
|
||||
|
||||
func main() {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
c := client.NewClient(roomId)
|
||||
c.SetCookie("")
|
||||
c.SetCookie(os.Getenv("bilibili_cookie"))
|
||||
for _, v := range dumps {
|
||||
vv := v
|
||||
c.RegisterCustomEventHandler(vv, func(s string) {
|
||||
|
||||
Reference in New Issue
Block a user