Versions in this module Expand all Collapse all v0 v0.0.2 Jun 4, 2026 v0.0.1 Dec 7, 2025 Changes in this version + const BotTokenType + const DefaultAPIBaseURL + const DefaultCDNBaseURL + const DefaultWSBaseURL + const SessionTokenType + func ExecuteWebhook(apiBaseURL, webhookID, webhookToken string, payload WebhookPayload) error + func Ptr[T any](v T) *T + type BotData struct + Owner string + type Channel struct + ID string + NSFW bool + type Client struct + APIBaseURL string + CDNBaseURL string + CommandHandlers map[string]func(c *Client, cmd Command) + Conn *websocket.Conn + HTTPClient *http.Client + OnMessageHandlers []func(c *Client, m Message) + Prefix string + Token string + TokenType string + UserID string + WSBaseURL string + func NewClient(token string) *Client + func (c *Client) ConnectAndRun() error + func (c *Client) FetchBotUser() (string, error) + func (c *Client) GetBotOwnerID() (string, error) + func (c *Client) GetChannel(channelID string) (*Channel, error) + func (c *Client) GetMessage(channelID, messageID string) (*Message, error) + func (c *Client) IsChannelNSFW(channelID string) (bool, error) + func (c *Client) OnCommand(name string, handler func(c *Client, cmd Command)) + func (c *Client) OnMessage(handler func(c *Client, m Message)) + func (c *Client) SendMessage(channelID string, payload SendMessagePayload) error + func (c *Client) SetAuthType(tokenType string) error + func (c *Client) SetBaseURLs(api, cdn, ws string) + func (c *Client) SetCommandPrefix(prefix string) + type Command struct + Args []string + Name string + type Embed struct + Colour *string + Description *string + IconURL *string + Media *string + Title *string + URL *string + type Masquerade struct + Avatar *string + Name *string + type Message struct + AuthorID string + ChannelID string + Content string + ID string + type SendMessagePayload struct + Content *string + Embeds []Embed + Masquerade *Masquerade + type User struct + Bot *BotData + ID string + type WebhookPayload struct + AvatarURL *string + Content *string + Embeds []Embed + Username *string