Documentation ¶
Index ¶
- Variables
- func GetEventName(eName string) string
- type Author
- type Channel
- type Client
- type Context
- type Embed
- type EmbedAuthor
- type EmbedFields
- type EmbedFooter
- type EmbedImage
- type EmbedProvider
- type EmbedThumbnail
- type EmbedVideo
- type Event
- type EventFunc
- type Guild
- func (g *Guild) BanMember(memberid, reason string) error
- func (g *Guild) CreateRole(name, permissions string, color int, hoist, mentionable bool) error
- func (g *Guild) DeleteRole(roleId string) error
- func (g *Guild) KickMember(memberId, reason string) error
- func (g *Guild) UnbanMember(memberId, reason string) error
- type Member
- type Message
- type Options
- type User
- type Websocket
Constants ¶
This section is empty.
Variables ¶
View Source
var EVENTS = struct { READY string MESSAGE_CREATE string CHANNEL_CREATE string CHANNEL_UPDATE string CHANNEL_DELETE string GUILD_BAN_ADD string GUILD_BAN_REMOVE string GUILD_MEMBER_ADD string GUILD_MEMBER_REMOVE string GUILD_MEMBER_UPDATE string }{ "READY", "MESSAGE_CREATE", "CHANNEL_CREATE", "CHANNEL_UPDATE", "CHANNEL_DELETE", "GUILD_BAN_ADD", "GUILD_BAN_REMOVE", "GUILD_MEMBER_ADD", "GUILD_MEMBER_REMOVE", "GUILD_MEMBER_UPDATE", }
View Source
var ErrCannotRead = fmt.Errorf("failed to read gateway message")
View Source
var ErrClientCreate = fmt.Errorf("an error occurred while instantiating the client")
View Source
var ErrConnFailed = fmt.Errorf("failed to connect to gateway")
View Source
var ErrDecompressEvent = fmt.Errorf("failed to decompress event message")
View Source
var ErrEventDecode = fmt.Errorf("failed to decode even message")
View Source
var ErrExpectedHello = fmt.Errorf("gateway returned non-hello response")
View Source
var ErrHeartbeat = fmt.Errorf("failed to send heartbeat")
View Source
var ErrNoGateway = fmt.Errorf("failed to get gateway uri")
View Source
var Intents = struct { GUILDS int GUILD_MEMBERS int GUILD_BANS int GUILD_EMOJIS int GUILD_INTEGRATIONS int GUILD_WEBHOOKS int GUILD_INVITES int GUILD_VOICE_STATES int GUILD_PRESENCES int GUILD_MESSAGES int GUILD_MESSAGE_REACTIONS int GUILD_MESSAGE_TYPING int DIRECT_MESSAGES int DIRECT_MESSAGE_REACTIONS int DIRECT_MESSAGE_TYPING int ALL int }{ 1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7, 1 << 8, 1 << 9, 1 << 10, 1 << 11, 1 << 12, 1 << 13, 1 << 14, 1 << 0 & 1 << 1 & 1 << 2 & 1 << 3 & 1 << 4 & 1 << 5 & 1 << 6 & 1 << 7 & 1 << 8 & 1 << 9 & 1 << 10 & 1 << 11 & 1 << 12 & 1 << 13 & 1 << 14, }
Functions ¶
Types ¶
type Channel ¶
type Channel struct { ID string `json:"id"` Name string `json:"name"` NSFW bool `json:"nsfw"` Client *Client }
func (*Channel) SendMessage ¶
Sends a message to a specified channel.
type Client ¶
type Client struct { Options Options User User `json:"user"` // contains filtered or unexported fields }
func (*Client) Close ¶
func (c *Client) Close()
Closes the current websocket connection with Discord.
type Embed ¶
type Embed struct { Title string `json:"title"` Type string `json:"type"` Description string `json:"description"` URL string `json:"url"` Timestamp time.Time `json:"timestamp"` Color int `json:"color"` Image EmbedImage `json:"image"` Thumbnail EmbedThumbnail `json:"thumbnail"` Video EmbedVideo `json:"video"` Provider EmbedProvider `json:"provider"` Author EmbedAuthor `json:"author"` Fields []EmbedFields `json:"fields"` }
type EmbedAuthor ¶
type EmbedAuthor struct { }
type EmbedFields ¶
type EmbedFields struct { }
type EmbedFooter ¶
type EmbedFooter struct { }
type EmbedImage ¶
type EmbedImage struct { }
type EmbedProvider ¶
type EmbedProvider struct { }
type EmbedThumbnail ¶
type EmbedThumbnail struct { }
type EmbedVideo ¶
type EmbedVideo struct { }
type Event ¶
type Event struct { Type string `json:"t"` Seq int64 `json:"s"` Op int `json:"op"` Data json.RawMessage `json:"d"` Other interface{} `json:"-"` }
type Guild ¶
func (*Guild) CreateRole ¶
Creates a role
func (*Guild) KickMember ¶
Kicks (or removes) a member from the guild
func (*Guild) UnbanMember ¶
Unbans the member from the guild
Source Files ¶
Click to show internal directories.
Click to hide internal directories.