diff --git a/config/general.go b/config/general.go index 11c1e84..7074392 100644 --- a/config/general.go +++ b/config/general.go @@ -1,17 +1,27 @@ package config +type IdentifyConfig struct { + Os string `toml:"os"` + Browser string `toml:"browser"` +} + type GeneralConfig struct { - UserAgent string `toml:"user_agent"` - FetchMessagesLimit int `toml:"fetch_messages_limit"` - Mouse bool `toml:"mouse"` - Timestamps bool `toml:"timestamps"` + UserAgent string `toml:"user_agent"` + FetchMessagesLimit int `toml:"fetch_messages_limit"` + Mouse bool `toml:"mouse"` + Timestamps bool `toml:"timestamps"` + Identify IdentifyConfig `toml:"identify"` } func newGeneralConfig() GeneralConfig { return GeneralConfig{ - UserAgent: "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0", + UserAgent: "Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0", FetchMessagesLimit: 50, Mouse: true, Timestamps: false, + Identify: IdentifyConfig{ + Os: "Linux", + Browser: "Firefox", + }, } } diff --git a/ui/app.go b/ui/app.go index 822e6ae..db32603 100644 --- a/ui/app.go +++ b/ui/app.go @@ -54,9 +54,8 @@ func (app *App) Connect(token string) error { LargeThreshold: 0, Intents: 0, Properties: discordgo.IdentifyProperties{ - OS: "Linux", - Browser: "Firefox", - Device: "", + OS: app.Config.General.Identify.Os, + Browser: app.Config.General.Identify.Browser, }, } app.Session.AddHandlerOnce(app.onSessionReady)