Documentation ¶
Index ¶
- Constants
- Variables
- func SnowflakeInSlice(a Snowflake, list []Snowflake) bool
- type Attachment
- func (s *Attachment) Filename() string
- func (s *Attachment) Height() int
- func (s *Attachment) ID() Snowflake
- func (s *Attachment) MarshalJSON() ([]byte, error)
- func (s *Attachment) ProxyURL() string
- func (s *Attachment) Size() int
- func (s *Attachment) URL() string
- func (s *Attachment) UnmarshalJSON(b []byte) error
- func (s *Attachment) Width() int
- type Channel
- func (s *Channel) Bitrate() int
- func (s *Channel) Delete() error
- func (s *Channel) Guild() *Guild
- func (s *Channel) GuildID() Snowflake
- func (s *Channel) ID() Snowflake
- func (s *Channel) LastMessageID() Snowflake
- func (s *Channel) MarshalJSON() ([]byte, error)
- func (s *Channel) Mention() string
- func (s *Channel) Name() string
- func (s *Channel) PermissionOverwrites() []Overwrite
- func (s *Channel) Position() int
- func (s *Channel) Recipients() []*User
- func (s *Channel) Topic() string
- func (s *Channel) Type() ChannelType
- func (s *Channel) UnmarshalJSON(b []byte) error
- func (s *Channel) UserLimit() int
- type ChannelBuilder
- type ChannelCreateEvent
- type ChannelDeleteEvent
- type ChannelType
- type ChannelUpdateEvent
- type DiscordTime
- type Embed
- type EmbedAuthor
- type EmbedField
- type EmbedFooter
- type EmbedImage
- type EmbedProvider
- type EmbedThumbnail
- type EmbedVideo
- type Emoji
- type EndPoint
- type Event
- type Game
- type GetMessagesMode
- type Guild
- func (s *Guild) AFKChannelID() Snowflake
- func (s *Guild) AFKTimeout() int
- func (s *Guild) BanUser(userID Snowflake, deleteMessageDays int) error
- func (s *Guild) BuildChannel(name string) *ChannelBuilder
- func (s *Guild) Channels() []*Channel
- func (s *Guild) DefaultMessageNotifications() int
- func (s *Guild) EmbedChannelID() Snowflake
- func (s *Guild) EmbedEnabled() bool
- func (s *Guild) Emojis() []Emoji
- func (s *Guild) Features() []string
- func (s *Guild) GetRoleUsers(roleID Snowflake) []*User
- func (s *Guild) GetUserColor(userID Snowflake) (int, bool)
- func (s *Guild) GetUserMembership(userID Snowflake) (*GuildMember, bool)
- func (s *Guild) GetUserRoles(userID Snowflake) ([]Snowflake, bool)
- func (s *Guild) ID() Snowflake
- func (s *Guild) IconHash() string
- func (s *Guild) JoinedAt() DiscordTime
- func (s *Guild) KickUser(userID Snowflake) error
- func (s *Guild) Large() bool
- func (s *Guild) MFALevel() int
- func (s *Guild) MarshalJSON() ([]byte, error)
- func (s *Guild) MemberCount() int
- func (s *Guild) Members() []*GuildMember
- func (s *Guild) Name() string
- func (s *Guild) OwnerID() Snowflake
- func (s *Guild) Presences() []Presence
- func (s *Guild) Region() string
- func (s *Guild) Role(id Snowflake) (*Role, bool)
- func (s *Guild) Roles() []*Role
- func (s *Guild) SplashHash() string
- func (s *Guild) Unavailable() bool
- func (s *Guild) UnbanUser(userID Snowflake) error
- func (s *Guild) UnmarshalJSON(b []byte) error
- func (s *Guild) VerificationLevel() int
- func (s *Guild) VoiceStates() []json.RawMessage
- type GuildBanAddEvent
- type GuildBanRemoveEvent
- type GuildCreateEvent
- type GuildDeleteEvent
- type GuildEmojisUpdateEvent
- type GuildIntegrationsUpdateEvent
- type GuildMember
- func (s *GuildMember) Deaf() bool
- func (s *GuildMember) JoinedAt() DiscordTime
- func (s *GuildMember) MarshalJSON() ([]byte, error)
- func (s *GuildMember) Mute() bool
- func (s *GuildMember) Nick() string
- func (s *GuildMember) RolesIDs() []Snowflake
- func (s *GuildMember) UnmarshalJSON(b []byte) error
- func (s *GuildMember) User() *User
- type GuildMemberAddEvent
- type GuildMemberRemoveEvent
- type GuildMemberUpdateEvent
- type GuildMembersChunkEvent
- type GuildRoleCreateEvent
- type GuildRoleDeleteEvent
- type GuildRoleUpdateEvent
- type GuildUpdateEvent
- type IDObject
- type Message
- func (s *Message) AddReaction(emoji string) error
- func (s *Message) Attachments() []Attachment
- func (s *Message) Author() *User
- func (s *Message) Channel() *Channel
- func (s *Message) ChannelID() Snowflake
- func (s *Message) Content() string
- func (s *Message) Delete() error
- func (s *Message) DeleteAllReactions() error
- func (s *Message) DeleteOwnReaction(emoji string) error
- func (s *Message) DeleteReaction(userID Snowflake, emoji string) error
- func (s *Message) Edit(content string) (err error)
- func (s *Message) EditEmbed(embed Embed) (err error)
- func (s *Message) EditEmbeddedMessage(content string, embed Embed) (err error)
- func (s *Message) EditedTimestamp() DiscordTime
- func (s *Message) Embeds() []Embed
- func (s *Message) ID() Snowflake
- func (s *Message) MarshalJSON() ([]byte, error)
- func (s *Message) MentionEveryone() bool
- func (s *Message) MentionRoles() []Snowflake
- func (s *Message) Mentions() []*User
- func (s *Message) NOnce() Snowflake
- func (s *Message) Pin() error
- func (s *Message) Pinned() bool
- func (s *Message) Reactions() []Reaction
- func (s *Message) TTS() bool
- func (s *Message) Timestamp() DiscordTime
- func (s *Message) Type() MessageType
- func (s *Message) UnmarshalJSON(b []byte) error
- func (s *Message) WebhookID() string
- type MessageCreateEvent
- type MessageDeleteBulkEvent
- type MessageDeleteEvent
- type MessagePrototype
- type MessageReactionAddEvent
- type MessageReactionRemoveEvent
- type MessageType
- type MessageUpdateEvent
- type Overwrite
- type Presence
- type PresenceUpdateEvent
- type Reaction
- type ReadyEvent
- type ResumedEvent
- type Role
- func (s *Role) Color() int
- func (s *Role) Hoist() bool
- func (s *Role) ID() Snowflake
- func (s *Role) Managed() bool
- func (s *Role) MarshalJSON() ([]byte, error)
- func (s *Role) Mentionable() bool
- func (s *Role) Name() string
- func (s *Role) Permissions() int
- func (s *Role) Position() int
- func (s *Role) UnmarshalJSON(b []byte) error
- type Session
- func (s *Session) AddGuildMemberRole(guildID, userID, roleID Snowflake) error
- func (s *Session) BanUser(guildID, userID Snowflake, deleteMessageDays int) error
- func (s *Session) BuildChannel(guildID Snowflake, name string) *ChannelBuilder
- func (s *Session) BulkDeleteMessages(channelID Snowflake, ids []Snowflake) error
- func (s *Session) Close()
- func (s *Session) Connect() error
- func (s *Session) DeleteChannel(channelID Snowflake) error
- func (s *Session) DeleteMessage(channelID, messageID Snowflake) error
- func (s *Session) EditEmbed(channelID, messageID Snowflake, embed Embed) (*Message, error)
- func (s *Session) EditEmbeddedMessage(channelID, messageID Snowflake, content string, embed Embed) (*Message, error)
- func (s *Session) EditMessage(channelID, messageID Snowflake, content string) (*Message, error)
- func (s *Session) GetDMChannel(userID Snowflake) (*Channel, error)
- func (s *Session) GetLastMessages(channelID Snowflake, limit int) ([]*Message, error)
- func (s *Session) GetMessage(channelID, messageID Snowflake) (*Message, error)
- func (s *Session) GetMessages(channelID Snowflake, mode GetMessagesMode, target Snowflake, limit int) ([]*Message, error)
- func (s *Session) KickUser(guildID, userID Snowflake) error
- func (s *Session) MessageAddReaction(channelID, messageID Snowflake, emoji string) error
- func (s *Session) MessageDeleteAllReactions(channelID, messageID Snowflake) error
- func (s *Session) MessageDeleteOwnReaction(channelID, messageID Snowflake, emoji string) error
- func (s *Session) MessageDeleteReaction(channelID, messageID, userID Snowflake, emoji string) error
- func (s *Session) PinMessage(channelID, messageID Snowflake) error
- func (s *Session) RegisterEventHandler(handler interface{})
- func (s *Session) RemoveGuildMemberRole(guildID, userID, roleID Snowflake) error
- func (s *Session) SendEmbed(channelID Snowflake, embed *Embed) (*Message, error)
- func (s *Session) SendMessage(channelID Snowflake, content string) (*Message, error)
- func (s *Session) SendMessageP(channelID Snowflake, prototype MessagePrototype) (*Message, error)
- func (s *Session) SetAvatar(imageMimeType string, reader io.Reader) (*User, error)
- func (s *Session) SetGame(game *Game)
- func (s *Session) SetStatus(status Status)
- func (s *Session) SetStatusGame(status Status, game *Game)
- func (s *Session) SetUserNick(guildID, userID Snowflake, nick string) error
- func (s *Session) SetUsername(username string) (*User, error)
- func (s *Session) Status() Status
- func (s *Session) UnbanUser(guildID, userID Snowflake) error
- type Snowflake
- type Status
- type TypingStartEvent
- type UnixTimeStamp
- type User
- func (s *User) AvatarHash() string
- func (s *User) AvatarURL() string
- func (s *User) Bot() bool
- func (s *User) Color(guild *Guild) (int, bool)
- func (s *User) DiscordJoinDate() time.Time
- func (s *User) Discriminator() string
- func (s *User) EMail() string
- func (s *User) ID() Snowflake
- func (s *User) MFAEnabled() bool
- func (s *User) MarshalJSON() ([]byte, error)
- func (s *User) Mention() string
- func (s *User) UnmarshalJSON(b []byte) error
- func (s *User) Username() string
- func (s *User) Verified() bool
- type UserUpdateEvent
Constants ¶
const ( PermissionCreateInstantInvite = 0x00000001 PermissionKickMembers = 0x00000002 PermissionBanMembers = 0x00000004 PermissionAdministrator = 0x00000008 PermissionManageChannels = 0x00000010 PermissionManageGuild = 0x00000020 PermissionAddReactions = 0x00000040 PermissionViewAuditLog = 0x00000080 PermissionReadMessages = 0x00000400 PermissionSendMessages = 0x00000800 PermissionSendTTSMessages = 0x00001000 PermissionManageMessages = 0x00002000 PermissionEmbedLinks = 0x00004000 PermissionAttachFiles = 0x00008000 PermissionReadMessageHistory = 0x00010000 PermissionMentionEveryone = 0x00020000 PermissionUseExternalEmojis = 0x00040000 PermissionConnect = 0x00100000 PermissionSpeak = 0x00200000 PermissionMuteMembers = 0x00400000 PermissionDeafenMembers = 0x00800000 PermissionMoveMembers = 0x01000000 PermissionUseVAD = 0x02000000 PermissionChangeNickname = 0x04000000 PermissionManageNicknames = 0x08000000 PermissionManageRoles = 0x10000000 PermissionManageWebhooks = 0x20000000 PermissionManageEmojis = 0x40000000 )
Variables ¶
var ( BaseUrl = "https://discordapp.com/api/v" + gatewayVersion EndPointGateway = makeEndPoint("/gateway") EndPointBotGateway = makeEndPoint("/gateway/bot") EndPointVoiceRegions = makeEndPoint("/voice/regions") EndPointChannel = makeEndPoint("/channels/:channel_id") EndPointMessages = makeEndPoint("/channels/:channel_id/messages") EndPointMessage = makeEndPoint("/channels/:channel_id/messages/:message_id") EndPointMessageBulkDelete = makeEndPoint("/channels/:channel_id/messages/bulk-delete") EndPointReactions = makeEndPoint("/channels/:channel_id/messages/:mesasge_id/reactions") EndPointReaction = makeEndPoint("/channels/:channel_id/messages/:mesasge_id/reactions/%%s/:user_id") EndPointOwnReaction = makeEndPoint("/channels/:channel_id/messages/:message_id/reactions/%%s/@me") EndPointChannelPermissions = makeEndPoint("/channels/:channel_id/permissions/:overwrite_id") EndPointChannelInvites = makeEndPoint("/channels/:channel_id/invites") EndPointChannelTyping = makeEndPoint("/channels/:channel_id/typing") EndPointChannelPins = makeEndPoint("/channels/:channel_id/pins") EndPointChannelPin = makeEndPoint("/channels/:channel_id/pins/:message_id") EndPointChannelRecipient = makeEndPoint("/channels/:channel_id/recipients/:user_id") EndPointGuilds = makeEndPoint("/guilds") EndPointGuild = makeEndPoint("/guilds/:guild_id") EndPointGuildChannels = makeEndPoint("/guilds/:guild_id/channels") EndPointGuildMembers = makeEndPoint("/guilds/:guild_id/members") EndPointGuildMember = makeEndPoint("/guilds/:guild_id/members/:user_id") EndPointGuildOwnNick = makeEndPoint("/guilds/:guild_id/members/@me/nick") EndPointGuildMemberRoles = makeEndPoint("/guilds/:guild_id/members/:user_id/roles/:role_id") EndPointGuildBans = makeEndPoint("/guilds/:guild_id/bans") EndPointGuildMemberBan = makeEndPoint("/guilds/:guild_id/bans/:user_id") EndPointGuildRoles = makeEndPoint("/guilds/:guild_id/roles") EndPointGuildRole = makeEndPoint("/guilds/:guild_id/roles/:role_id") EndPointGuildPrune = makeEndPoint("/guilds/:guild_id/prune") EndPointGuildRegions = makeEndPoint("/guilds/:guild_id/regions") EndPointGuildInvites = makeEndPoint("/guilds/:guild_id/invites") EndPointGuildIntegrations = makeEndPoint("/guilds/:guild_id/integrations") EndPointGuildIntegration = makeEndPoint("/guilds/:guild_id/integrations/:integration_id") EndPointGuildIntegrationSync = makeEndPoint("/guilds/:guild_id/integrations/:integration_id/sync") EndPointGuildEmbed = makeEndPoint("/guilds/:guild_id/embed") EndPointOwnUser = makeEndPoint("/users/@me") EndPointUser = makeEndPoint("/users/:user_id") EndPointUserAvatar = BaseUrl + "/users/%d/avatars/%s.jpg" EndPointOwnGuilds = makeEndPoint("/users/@me/guilds") EndPointOwnGuild = makeEndPoint("/users/@me/guilds/:guild_id") EndPointDMChannels = makeEndPoint("/users/@me/channels") )
Functions ¶
func SnowflakeInSlice ¶
Types ¶
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
Attachment is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Attachment) Filename ¶
func (s *Attachment) Filename() string
Filename is used to export the Filename from this struct.
func (*Attachment) Height ¶
func (s *Attachment) Height() int
Height is used to export the Height from this struct.
func (*Attachment) ID ¶
func (s *Attachment) ID() Snowflake
ID is used to export the ID from this struct.
func (*Attachment) MarshalJSON ¶
func (s *Attachment) MarshalJSON() ([]byte, error)
MarshalJSON is used to convert this object into its json representation for Discord
func (*Attachment) ProxyURL ¶
func (s *Attachment) ProxyURL() string
ProxyURL is used to export the ProxyURL from this struct.
func (*Attachment) Size ¶
func (s *Attachment) Size() int
Size is used to export the Size from this struct.
func (*Attachment) URL ¶
func (s *Attachment) URL() string
URL is used to export the URL from this struct.
func (*Attachment) UnmarshalJSON ¶
func (s *Attachment) UnmarshalJSON(b []byte) error
UnmarshalJSON is used to convert json discord objects back into their respective structs
func (*Attachment) Width ¶
func (s *Attachment) Width() int
Width is used to export the Width from this struct.
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Channel) LastMessageID ¶
LastMessageID is used to export the LastMessageID from this struct.
func (*Channel) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Channel) PermissionOverwrites ¶
PermissionOverwrites is used to export the PermissionOverwrites from this struct.
func (*Channel) Recipients ¶
Recipients is used to export the Recipients from this struct.
func (*Channel) Type ¶
func (s *Channel) Type() ChannelType
Type is used to export the Type from this struct.
func (*Channel) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type ChannelBuilder ¶
type ChannelBuilder struct { Name string `json:"name"` Type string `json:"type,omitempty"` Bitrate int `json:"bitrate,omitempty"` UserLimit int `json:"user_limit,omitempty"` PermissionOverwrites []Overwrite `json:"permission_overwrites"` // contains filtered or unexported fields }
func (*ChannelBuilder) AddMemberOverwrite ¶
func (b *ChannelBuilder) AddMemberOverwrite(id Snowflake, allow, deny int) *ChannelBuilder
func (*ChannelBuilder) AddRoleOverwrite ¶
func (b *ChannelBuilder) AddRoleOverwrite(id Snowflake, allow, deny int) *ChannelBuilder
func (*ChannelBuilder) Create ¶
func (b *ChannelBuilder) Create() (*Channel, error)
type ChannelCreateEvent ¶
type ChannelCreateEvent struct {
*Channel
}
type ChannelDeleteEvent ¶
type ChannelDeleteEvent struct {
*Channel
}
type ChannelType ¶
type ChannelType int
const ( ChannelTypeGuildText ChannelType = iota ChannelTypeDirectMessage ChannelTypeGuildVoice ChannelTypeGroupDirectMessage ChannelTypeGuildCategory )
type ChannelUpdateEvent ¶
type ChannelUpdateEvent struct {
*Channel
}
type DiscordTime ¶
func (*DiscordTime) MarshalJSON ¶
func (t *DiscordTime) MarshalJSON() ([]byte, error)
func (*DiscordTime) UnmarshalJSON ¶
func (t *DiscordTime) UnmarshalJSON(data []byte) error
type Embed ¶
type Embed struct { Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` Timestamp DiscordTime `json:"timestamp,omitempty"` Color int `json:"color,omitempty"` Image EmbedImage `json:"image,omitempty"` Thumbnail EmbedThumbnail `json:"thumbnail,omitempty"` Video EmbedVideo `json:"video,omitempty"` Provider EmbedProvider `json:"provider,omitempty"` Author EmbedAuthor `json:"author,omitempty"` Fields []EmbedField `json:"fields,omitempty"` }
type EmbedAuthor ¶
type EmbedField ¶
type EmbedFooter ¶
type EmbedFooter struct {}
type EmbedImage ¶
type EmbedProvider ¶
type EmbedThumbnail ¶
type EmbedVideo ¶
type Emoji ¶
type Emoji struct {
// contains filtered or unexported fields
}
Emoji is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Emoji) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Emoji) RequireColons ¶
RequireColons is used to export the RequireColons from this struct.
func (*Emoji) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Game) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Game) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type GetMessagesMode ¶
type GetMessagesMode int
const ( GetLastMessages GetMessagesMode = iota GetMessagesAround GetMessagesBefore GetMessagesAfter )
type Guild ¶
type Guild struct {
// contains filtered or unexported fields
}
Guild is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Guild) AFKChannelID ¶
AFKChannelID is used to export the AFKChannelID from this struct.
func (*Guild) AFKTimeout ¶
AFKTimeout is used to export the AFKTimeout from this struct.
func (*Guild) BuildChannel ¶
func (s *Guild) BuildChannel(name string) *ChannelBuilder
func (*Guild) DefaultMessageNotifications ¶
DefaultMessageNotifications is used to export the DefaultMessageNotifications from this struct.
func (*Guild) EmbedChannelID ¶
EmbedChannelID is used to export the EmbedChannelID from this struct.
func (*Guild) EmbedEnabled ¶
EmbedEnabled is used to export the EmbedEnabled from this struct.
func (*Guild) GetRoleUsers ¶
func (*Guild) GetUserMembership ¶
func (s *Guild) GetUserMembership(userID Snowflake) (*GuildMember, bool)
func (*Guild) JoinedAt ¶
func (s *Guild) JoinedAt() DiscordTime
JoinedAt is used to export the JoinedAt from this struct.
func (*Guild) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Guild) MemberCount ¶
MemberCount is used to export the MemberCount from this struct.
func (*Guild) Members ¶
func (s *Guild) Members() []*GuildMember
Members is used to export the Members from this struct.
func (*Guild) SplashHash ¶
SplashHash is used to export the SplashHash from this struct.
func (*Guild) Unavailable ¶
Unavailable is used to export the Unavailable from this struct.
func (*Guild) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
func (*Guild) VerificationLevel ¶
VerificationLevel is used to export the VerificationLevel from this struct.
func (*Guild) VoiceStates ¶
func (s *Guild) VoiceStates() []json.RawMessage
VoiceStates is used to export the VoiceStates from this struct.
type GuildBanAddEvent ¶
func (*GuildBanAddEvent) UnmarshalJSON ¶
func (e *GuildBanAddEvent) UnmarshalJSON(b []byte) error
type GuildBanRemoveEvent ¶
func (*GuildBanRemoveEvent) UnmarshalJSON ¶
func (e *GuildBanRemoveEvent) UnmarshalJSON(b []byte) error
type GuildCreateEvent ¶
type GuildCreateEvent struct {
*Guild
}
type GuildDeleteEvent ¶
type GuildDeleteEvent struct {
*Guild
}
type GuildEmojisUpdateEvent ¶
type GuildIntegrationsUpdateEvent ¶
type GuildIntegrationsUpdateEvent struct {
GuildID Snowflake `json:"guild_id"`
}
type GuildMember ¶
type GuildMember struct {
// contains filtered or unexported fields
}
GuildMember is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*GuildMember) Deaf ¶
func (s *GuildMember) Deaf() bool
Deaf is used to export the Deaf from this struct.
func (*GuildMember) JoinedAt ¶
func (s *GuildMember) JoinedAt() DiscordTime
JoinedAt is used to export the JoinedAt from this struct.
func (*GuildMember) MarshalJSON ¶
func (s *GuildMember) MarshalJSON() ([]byte, error)
MarshalJSON is used to convert this object into its json representation for Discord
func (*GuildMember) Mute ¶
func (s *GuildMember) Mute() bool
Mute is used to export the Mute from this struct.
func (*GuildMember) Nick ¶
func (s *GuildMember) Nick() string
Nick is used to export the Nick from this struct.
func (*GuildMember) RolesIDs ¶
func (s *GuildMember) RolesIDs() []Snowflake
RolesIDs is used to export the RolesIDs from this struct.
func (*GuildMember) UnmarshalJSON ¶
func (s *GuildMember) UnmarshalJSON(b []byte) error
UnmarshalJSON is used to convert json discord objects back into their respective structs
func (*GuildMember) User ¶
func (s *GuildMember) User() *User
User is used to export the User from this struct.
type GuildMemberAddEvent ¶
type GuildMemberAddEvent struct { *GuildMember GuildID Snowflake `json:"guild_id"` }
func (*GuildMemberAddEvent) UnmarshalJSON ¶
func (e *GuildMemberAddEvent) UnmarshalJSON(b []byte) error
type GuildMemberRemoveEvent ¶
type GuildMemberUpdateEvent ¶
type GuildMembersChunkEvent ¶
type GuildMembersChunkEvent struct { GuildID Snowflake `json:"guild_id"` Members []GuildMember `json:"members"` }
type GuildRoleCreateEvent ¶
type GuildRoleDeleteEvent ¶
type GuildRoleUpdateEvent ¶
type GuildUpdateEvent ¶
type GuildUpdateEvent struct {
*Guild
}
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Message) AddReaction ¶
func (*Message) Attachments ¶
func (s *Message) Attachments() []Attachment
Attachments is used to export the Attachments from this struct.
func (*Message) DeleteAllReactions ¶
func (*Message) DeleteOwnReaction ¶
func (*Message) DeleteReaction ¶
func (*Message) EditEmbeddedMessage ¶
func (*Message) EditedTimestamp ¶
func (s *Message) EditedTimestamp() DiscordTime
EditedTimestamp is used to export the EditedTimestamp from this struct.
func (*Message) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Message) MentionEveryone ¶
MentionEveryone is used to export the MentionEveryone from this struct.
func (*Message) MentionRoles ¶
MentionRoles is used to export the MentionRoles from this struct.
func (*Message) Timestamp ¶
func (s *Message) Timestamp() DiscordTime
Timestamp is used to export the Timestamp from this struct.
func (*Message) Type ¶
func (s *Message) Type() MessageType
Type is used to export the Type from this struct.
func (*Message) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type MessageCreateEvent ¶
type MessageCreateEvent struct {
*Message
}
func (*MessageCreateEvent) Channel ¶
func (e *MessageCreateEvent) Channel() *Channel
type MessageDeleteBulkEvent ¶
type MessageDeleteEvent ¶
type MessagePrototype ¶
type MessageReactionAddEvent ¶
type MessageType ¶
type MessageType int
const ( MessageTypeDefault MessageType = iota MessageTypeRecipientAdd MessageTypeRecipientRemove MessageTypeCall MessageTypeChannelNameChange MessageTypeChannelIconChange MessageTypeChannelPinnedMessage MessageTypeGuildMemberJoin )
type MessageUpdateEvent ¶
type MessageUpdateEvent struct {
*Message
}
type Presence ¶
type Presence struct {
// contains filtered or unexported fields
}
Presence is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Presence) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Presence) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type PresenceUpdateEvent ¶
type PresenceUpdateEvent struct {
*Presence
}
type Reaction ¶
type Reaction struct {
// contains filtered or unexported fields
}
Reaction is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Reaction) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Reaction) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type ReadyEvent ¶
type ResumedEvent ¶
type ResumedEvent struct {
Servers []string `json:"_trace"`
}
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*Role) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*Role) Mentionable ¶
Mentionable is used to export the Mentionable from this struct.
func (*Role) Permissions ¶
Permissions is used to export the Permissions from this struct.
func (*Role) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSelfBot ¶
func (*Session) AddGuildMemberRole ¶
func (*Session) BuildChannel ¶
func (s *Session) BuildChannel(guildID Snowflake, name string) *ChannelBuilder
func (*Session) BulkDeleteMessages ¶
func (*Session) DeleteChannel ¶
func (*Session) DeleteMessage ¶
func (*Session) EditEmbeddedMessage ¶
func (*Session) EditMessage ¶
func (*Session) GetLastMessages ¶
func (*Session) GetMessage ¶
func (*Session) GetMessages ¶
func (*Session) MessageAddReaction ¶
func (*Session) MessageDeleteAllReactions ¶
func (*Session) MessageDeleteOwnReaction ¶
func (*Session) MessageDeleteReaction ¶
func (*Session) PinMessage ¶
func (*Session) RegisterEventHandler ¶
func (s *Session) RegisterEventHandler(handler interface{})
func (*Session) RemoveGuildMemberRole ¶
func (*Session) SendMessage ¶
func (*Session) SendMessageP ¶
func (s *Session) SendMessageP(channelID Snowflake, prototype MessagePrototype) (*Message, error)
func (*Session) SetStatusGame ¶
func (*Session) SetUserNick ¶
type Snowflake ¶
type Snowflake uint64
func ParseSnowflake ¶
func (Snowflake) MarshalJSON ¶
func (*Snowflake) UnmarshalJSON ¶
type TypingStartEvent ¶
type TypingStartEvent struct { ChannelID Snowflake `json:"channel_id"` UserID Snowflake `json:"user_id"` Timestamp UnixTimeStamp `json:"timestamp"` }
type UnixTimeStamp ¶
func (UnixTimeStamp) MarshalJSON ¶
func (s UnixTimeStamp) MarshalJSON() ([]byte, error)
func (*UnixTimeStamp) UnmarshalJSON ¶
func (s *UnixTimeStamp) UnmarshalJSON(b []byte) error
type User ¶
type User struct {
// contains filtered or unexported fields
}
User is based on the Discord object with the same name. Any fields can be obtained by calling the respective getters.
func (*User) AvatarHash ¶
AvatarHash is used to export the AvatarHash from this struct.
func (*User) DiscordJoinDate ¶
func (*User) Discriminator ¶
Discriminator is used to export the Discriminator from this struct.
func (*User) MFAEnabled ¶
MFAEnabled is used to export the MFAEnabled from this struct.
func (*User) MarshalJSON ¶
MarshalJSON is used to convert this object into its json representation for Discord
func (*User) UnmarshalJSON ¶
UnmarshalJSON is used to convert json discord objects back into their respective structs
type UserUpdateEvent ¶
type UserUpdateEvent struct {
*User
}