Versions in this module Expand all Collapse all v1 v1.0.0 Aug 24, 2021 Changes in this version + var ErrCannotConnect = errors.New("cannot connect to the socket/pipe") + type Activity struct + Assets *Assets + Details *string + State *string + Timestamps *Timestamps + type Arguments struct + Activity *Activity + Pid int + type Assets struct + LargeImage string + LargeText string + SmallImage string + SmallText string + type DiscordPresence struct — darwin/amd64, linux/amd64, windows/amd64 + ClientID string + func NewDiscordPresence(ClientID string) *DiscordPresence + func (c *DiscordPresence) Close() error + func (c *DiscordPresence) Connect() error + func (c *DiscordPresence) CreateHandshake() error + func (c *DiscordPresence) Read(b []byte) (n int, err error) + func (c *DiscordPresence) Send(opcode OpCode, payload Payload) ([]byte, error) + func (c *DiscordPresence) SetActivity(activity *Activity) (string, []byte, error) + func (c *DiscordPresence) Write(b []byte) (n int, err error) + type OpCode uint32 + const Close + const Frame + const Handshake + const Ping + const Pong + type Payload struct + Args *Arguments + ClientID string + Cmd string + Data interface{} + Nonce string + Version int8 + type Timestamps struct + End int + Start int