generalized status type config key instead of useMobile
This commit is contained in:
parent
1a667b43d4
commit
3d401d9751
24
main.go
24
main.go
|
@ -83,20 +83,18 @@ func main() {
|
||||||
|
|
||||||
client.Identify.Intents = discordgo.IntentsAll
|
client.Identify.Intents = discordgo.IntentsAll
|
||||||
|
|
||||||
if config["useMobile"] == "true" {
|
client.Identify.Properties = discordgo.IdentifyProperties{
|
||||||
client.Identify.Properties = discordgo.IdentifyProperties{
|
OS: runtime.GOOS,
|
||||||
OS: "Android",
|
}
|
||||||
Browser: "Discord Android",
|
statusType := config["statusType"]
|
||||||
Device: "Pixel, raven",
|
if statusType == "mobile" {
|
||||||
}
|
client.Identify.Properties.Browser = "Discord Android"
|
||||||
|
} else if statusType == "embedded" {
|
||||||
|
client.Identify.Properties.Browser = "Discord Embedded"
|
||||||
|
} else if statusType == "desktop" {
|
||||||
|
client.Identify.Properties.Browser = "Discord Client"
|
||||||
} else {
|
} else {
|
||||||
// TODO: figure out how tempermental X-Super-Properties is, as in if it
|
client.Identify.Properties.Browser = "comcord"
|
||||||
// allows arbitrary values or not
|
|
||||||
client.Identify.Properties = discordgo.IdentifyProperties{
|
|
||||||
OS: runtime.GOOS,
|
|
||||||
Browser: "comcord",
|
|
||||||
Device: "comcord",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status := "online"
|
status := "online"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package state
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ComcordState struct {
|
type ComcordState struct {
|
||||||
|
|
Loading…
Reference in New Issue