diff --git a/cmd/state.go b/cmd/state.go index f9ee682..91c3809 100644 --- a/cmd/state.go +++ b/cmd/state.go @@ -33,6 +33,10 @@ func openState(token string, app *tview.Application, cfg *config.Config) error { BrowserUserAgent: cfg.UserAgent, } + gateway.DefaultPresence = &gateway.UpdatePresenceCommand{ + Status: cfg.Status, + } + discordState = &State{ State: ningen.New(token), cfg: cfg, diff --git a/internal/config/config.go b/internal/config/config.go index 8c29f9a..8a3e3c7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,15 +8,17 @@ import ( "github.com/BurntSushi/toml" "github.com/ayn2op/discordo/internal/consts" + "github.com/diamondburned/arikawa/v3/discord" ) type Config struct { - Mouse bool `toml:"mouse"` - HideBlockedUsers bool `toml:"hide_blocked_users"` - Timestamps bool `toml:"timestamps"` - ShowAttachmentLinks bool `toml:"show_attachment_links"` - MessagesLimit uint8 `toml:"messages_limit"` - Editor string `toml:"editor"` + Mouse bool `toml:"mouse"` + HideBlockedUsers bool `toml:"hide_blocked_users"` + Timestamps bool `toml:"timestamps"` + ShowAttachmentLinks bool `toml:"show_attachment_links"` + MessagesLimit uint8 `toml:"messages_limit"` + Editor string `toml:"editor"` + Status discord.Status `toml:"status"` Browser string `toml:"browser"` BrowserVersion string `toml:"browser_version"` @@ -36,6 +38,7 @@ func defaultConfig() *Config { MessagesLimit: 50, Editor: "default", TimestampsFormat: time.Kitchen, + Status: discord.OnlineStatus, Browser: consts.Browser, BrowserVersion: consts.BrowserVersion,