Add latest binaries
This commit is contained in:
parent
0d4f91c84c
commit
813e652784
2 changed files with 1 additions and 20 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,10 +1,3 @@
|
|||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
|
|
|
|||
14
discordo.go
14
discordo.go
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/diamondburned/arikawa/v2/api"
|
||||
"github.com/diamondburned/arikawa/v2/discord"
|
||||
"github.com/diamondburned/arikawa/v2/gateway"
|
||||
"github.com/diamondburned/arikawa/v2/session"
|
||||
|
|
@ -83,14 +82,6 @@ func newSession(email string, password string, token string) *session.Session {
|
|||
var sess *session.Session
|
||||
var err error
|
||||
if email != "" && password != "" {
|
||||
api.UserAgent = `Mozilla/5.0 (X11; Linux x86_64; rv:90.0)` +
|
||||
`Gecko/20100101 Firefox/90.0`
|
||||
gateway.DefaultIdentity = gateway.IdentifyProperties{
|
||||
OS: "Linux",
|
||||
Browser: "Firefox",
|
||||
Device: "",
|
||||
}
|
||||
|
||||
sess, err = session.Login(email, password, "")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -103,10 +94,7 @@ func newSession(email string, password string, token string) *session.Session {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
if strings.HasPrefix(token, "Bot ") {
|
||||
sess.Gateway.AddIntents(gateway.IntentGuilds)
|
||||
sess.Gateway.AddIntents(gateway.IntentGuildMessages)
|
||||
} else {
|
||||
if !strings.HasPrefix(token, "Bot ") {
|
||||
sess.AddHandler(onReady)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue