Versions in this module Expand all Collapse all v0 v0.18.0 Dec 27, 2017 Changes in this version + const ErrCodeBotsCannotUseEndpoint + const ErrCodeCanOnlyPinMessageToOriginatingChannel + const ErrCodeCannotEditFromAnotherUser + const ErrCodeCannotExecuteActionOnDMChannel + const ErrCodeCannotExecuteActionOnSystemMessage + const ErrCodeCannotSendEmptyMessage + const ErrCodeCannotSendMessagesInVoiceChannel + const ErrCodeCannotSendMessagesToThisUser + const ErrCodeChannelVerificationLevelTooHigh + const ErrCodeEmbedCisabled + const ErrCodeInvalidAccountType + const ErrCodeInvalidAuthenticationToken + const ErrCodeInvalidFormBody + const ErrCodeInvalidOAuthState + const ErrCodeInviteAcceptedToGuildApplicationsBotNotIn + const ErrCodeMaximumFriendsReached + const ErrCodeMaximumGuildRolesReached + const ErrCodeMaximumGuildsReached + const ErrCodeMaximumPinsReached + const ErrCodeMessageProvidedTooOldForBulkDelete + const ErrCodeMissingAccess + const ErrCodeMissingPermissions + const ErrCodeNoteTooLong + const ErrCodeOAuth2ApplicationDoesNotHaveBot + const ErrCodeOAuth2ApplicationLimitReached + const ErrCodeOnlyBotsCanUseEndpoint + const ErrCodeReactionBlocked + const ErrCodeTooFewOrTooManyMessagesToDelete + const ErrCodeTooManyReactions + const ErrCodeUnauthorized + const ErrCodeUnknownAccount + const ErrCodeUnknownApplication + const ErrCodeUnknownChannel + const ErrCodeUnknownEmoji + const ErrCodeUnknownGuild + const ErrCodeUnknownIntegration + const ErrCodeUnknownInvite + const ErrCodeUnknownMember + const ErrCodeUnknownMessage + const ErrCodeUnknownOverwrite + const ErrCodeUnknownProvider + const ErrCodeUnknownRole + const ErrCodeUnknownToken + const ErrCodeUnknownUser + const FailedHeartbeatAcks + const LogDebug + const LogError + const LogInformational + const LogWarning + const PermissionAddReactions + const PermissionAdministrator + const PermissionAll + const PermissionAllChannel + const PermissionAllText + const PermissionAllVoice + const PermissionAttachFiles + const PermissionBanMembers + const PermissionChangeNickname + const PermissionCreateInstantInvite + const PermissionEmbedLinks + const PermissionKickMembers + const PermissionManageChannels + const PermissionManageEmojis + const PermissionManageMessages + const PermissionManageNicknames + const PermissionManageRoles + const PermissionManageServer + const PermissionManageWebhooks + const PermissionMentionEveryone + const PermissionReadMessageHistory + const PermissionReadMessages + const PermissionSendMessages + const PermissionSendTTSMessages + const PermissionUseExternalEmojis + const PermissionViewAuditLogs + const PermissionVoiceConnect + const PermissionVoiceDeafenMembers + const PermissionVoiceMoveMembers + const PermissionVoiceMuteMembers + const PermissionVoiceSpeak + const PermissionVoiceUseVAD + const VERSION + var APIVersion = "6" + var EndpointAPI = EndpointDiscord + "api/v" + APIVersion + "/" + var EndpointApplication = func(aID string) string + var EndpointApplications = EndpointOauth2 + "applications" + var EndpointApplicationsBot = func(aID string) string + var EndpointAuth = EndpointAPI + "auth/" + var EndpointCDN = "https://cdn.discordapp.com/" + var EndpointCDNAttachments = EndpointCDN + "attachments/" + var EndpointCDNAvatars = EndpointCDN + "avatars/" + var EndpointCDNChannelIcons = EndpointCDN + "channel-icons/" + var EndpointCDNIcons = EndpointCDN + "icons/" + var EndpointCDNSplashes = EndpointCDN + "splashes/" + var EndpointChannel = func(cID string) string + var EndpointChannelInvites = func(cID string) string + var EndpointChannelMessage = func(cID, mID string) string + var EndpointChannelMessageAck = func(cID, mID string) string + var EndpointChannelMessagePin = func(cID, mID string) string + var EndpointChannelMessages = func(cID string) string + var EndpointChannelMessagesBulkDelete = func(cID string) string + var EndpointChannelMessagesPins = func(cID string) string + var EndpointChannelPermission = func(cID, tID string) string + var EndpointChannelPermissions = func(cID string) string + var EndpointChannelTyping = func(cID string) string + var EndpointChannelWebhooks = func(cID string) string + var EndpointChannels = EndpointAPI + "channels/" + var EndpointDiscord = "https://discordapp.com/" + var EndpointEmoji = func(eID string) string + var EndpointForgotPassword = EndpointAuth + "forgot" + var EndpointGateway = EndpointAPI + "gateway" + var EndpointGatewayBot = EndpointGateway + "/bot" + var EndpointGroupIcon = func(cID, hash string) string + var EndpointGuild = func(gID string) string + var EndpointGuildBan = func(gID, uID string) string + var EndpointGuildBans = func(gID string) string + var EndpointGuildChannels = func(gID string) string + var EndpointGuildCreate = EndpointAPI + "guilds" + var EndpointGuildEmbed = func(gID string) string + var EndpointGuildIcon = func(gID, hash string) string + var EndpointGuildIntegration = func(gID, iID string) string + var EndpointGuildIntegrationSync = func(gID, iID string) string + var EndpointGuildIntegrations = func(gID string) string + var EndpointGuildInvites = func(gID string) string + var EndpointGuildMember = func(gID, uID string) string + var EndpointGuildMemberRole = func(gID, uID, rID string) string + var EndpointGuildMembers = func(gID string) string + var EndpointGuildPrune = func(gID string) string + var EndpointGuildRole = func(gID, rID string) string + var EndpointGuildRoles = func(gID string) string + var EndpointGuildSplash = func(gID, hash string) string + var EndpointGuildWebhooks = func(gID string) string + var EndpointGuilds = EndpointAPI + "guilds/" + var EndpointIntegrations = EndpointAPI + "integrations" + var EndpointIntegrationsJoin = func(iID string) string + var EndpointInvite = func(iID string) string + var EndpointLogin = EndpointAuth + "login" + var EndpointLogout = EndpointAuth + "logout" + var EndpointMessageReaction = func(cID, mID, eID, uID string) string + var EndpointMessageReactions = func(cID, mID, eID string) string + var EndpointMessageReactionsAll = func(cID, mID string) string + var EndpointOauth2 = EndpointAPI + "oauth2/" + var EndpointRegister = EndpointAuth + "register" + var EndpointRelationship = func(uID string) string + var EndpointRelationships = func() string + var EndpointRelationshipsMutual = func(uID string) string + var EndpointReport = EndpointAPI + "report" + var EndpointResetPassword = EndpointAuth + "reset" + var EndpointSm = EndpointStatus + "scheduled-maintenances/" + var EndpointSmActive = EndpointSm + "active.json" + var EndpointSmUpcoming = EndpointSm + "upcoming.json" + var EndpointSso = EndpointAPI + "sso" + var EndpointStatus = "https://status.discordapp.com/api/v2/" + var EndpointTrack = EndpointAPI + "track" + var EndpointTutorial = EndpointAPI + "tutorial/" + var EndpointTutorialIndicators = EndpointTutorial + "indicators" + var EndpointUser = func(uID string) string + var EndpointUserAvatar = func(uID, aID string) string + var EndpointUserAvatarAnimated = func(uID, aID string) string + var EndpointUserChannels = func(uID string) string + var EndpointUserConnections = func(uID string) string + var EndpointUserDevices = func(uID string) string + var EndpointUserGuild = func(uID, gID string) string + var EndpointUserGuildSettings = func(uID, gID string) string + var EndpointUserGuilds = func(uID string) string + var EndpointUserNotes = func(uID string) string + var EndpointUserSettings = func(uID string) string + var EndpointUsers = EndpointAPI + "users/" + var EndpointVerify = EndpointAuth + "verify" + var EndpointVerifyResend = EndpointAuth + "verify/resend" + var EndpointVoice = EndpointAPI + "/voice/" + var EndpointVoiceIce = EndpointVoice + "ice" + var EndpointVoiceRegions = EndpointVoice + "regions" + var EndpointWebhook = func(wID string) string + var EndpointWebhookToken = func(wID, token string) string + var EndpointWebhooks = EndpointAPI + "webhooks/" + var ErrGuildNoIcon = errors.New("guild does not have an icon set") + var ErrGuildNoSplash = errors.New("guild does not have a splash set") + var ErrJSONUnmarshal = errors.New("json unmarshal") + var ErrMFA = errors.New("account has 2FA enabled") + var ErrNilState = errors.New("state not instantiated, please use discordgo.New() or assign Session.State") + var ErrPruneDaysBounds = errors.New("the number of days should be more than or equal to 1") + var ErrStateNotFound = errors.New("state cache not found") + var ErrStatusOffline = errors.New("You can't set your Status to offline") + var ErrVerificationLevelBounds = errors.New("VerificationLevel out of bounds, should be between 0 and 3") + var ErrWSAlreadyOpen = errors.New("web socket already opened") + var ErrWSNotFound = errors.New("no websocket connection exists") + var ErrWSShardBounds = errors.New("ShardID must be less than ShardCount") + var Logger func(msgL, caller int, format string, a ...interface{}) + type APIErrorMessage struct + Code int + Message string + type Ack struct + Token string + type Application struct + Bot *User + BotPublic bool + BotRequireCodeGrant bool + Description string + Flags int + ID string + Icon string + Name string + Owner *User + RPCApplicationState int + RedirectURIs *[]string + Secret string + type Assets struct + LargeImageID string + LargeText string + SmallImageID string + SmallText string + type Bucket struct + Key string + Remaining int + Userdata interface{} + func (b *Bucket) Release(headers http.Header) error + type Channel struct + Bitrate int + GuildID string + ID string + LastMessageID string + Messages []*Message + NSFW bool + Name string + ParentID string + PermissionOverwrites []*PermissionOverwrite + Position int + Recipients []*User + Topic string + Type ChannelType + type ChannelCreate struct + type ChannelDelete struct + type ChannelEdit struct + Bitrate int + NSFW bool + Name string + ParentID string + PermissionOverwrites []*PermissionOverwrite + Position int + Topic string + UserLimit int + type ChannelPinsUpdate struct + ChannelID string + LastPinTimestamp string + type ChannelType int + const ChannelTypeDM + const ChannelTypeGroupDM + const ChannelTypeGuildCategory + const ChannelTypeGuildText + const ChannelTypeGuildVoice + type ChannelUpdate struct + type Connect struct + type Disconnect struct + type Emoji struct + Animated bool + ID string + Managed bool + Name string + RequireColons bool + Roles []string + func (e *Emoji) APIName() string + type Event struct + Operation int + RawData json.RawMessage + Sequence int64 + Struct interface{} + Type string + type EventHandler interface + Handle func(*Session, interface{}) + Type func() string + type EventInterfaceProvider interface + New func() interface{} + Type func() string + type File struct + ContentType string + Name string + Reader io.Reader + type FriendSourceFlags struct + All bool + MutualFriends bool + MutualGuilds bool + type Game struct + ApplicationID string + Assets Assets + Details string + Instance int8 + Name string + State string + TimeStamps TimeStamps + Type GameType + URL string + type GameType int + const GameTypeGame + const GameTypeStreaming + type GatewayBotResponse struct + Shards int + URL string + type Guild struct + AfkChannelID string + AfkTimeout int + Channels []*Channel + DefaultMessageNotifications int + EmbedChannelID string + EmbedEnabled bool + Emojis []*Emoji + ID string + Icon string + JoinedAt Timestamp + Large bool + MemberCount int + Members []*Member + Name string + OwnerID string + Presences []*Presence + Region string + Roles []*Role + Splash string + Unavailable bool + VerificationLevel VerificationLevel + VoiceStates []*VoiceState + type GuildBan struct + Reason string + User *User + type GuildBanAdd struct + GuildID string + User *User + type GuildBanRemove struct + GuildID string + User *User + type GuildCreate struct + type GuildDelete struct + type GuildEmbed struct + ChannelID string + Enabled bool + type GuildEmojisUpdate struct + Emojis []*Emoji + GuildID string + type GuildIntegration struct + Account *GuildIntegrationAccount + Enabled bool + ExpireBehavior int + ExpireGracePeriod int + ID string + Name string + RoleID string + SyncedAt int + Syncing bool + Type string + User *User + type GuildIntegrationAccount struct + ID string + Name string + type GuildIntegrationsUpdate struct + GuildID string + type GuildMemberAdd struct + type GuildMemberRemove struct + type GuildMemberUpdate struct + type GuildMembersChunk struct + GuildID string + Members []*Member + type GuildParams struct + AfkChannelID string + AfkTimeout int + DefaultMessageNotifications int + Icon string + Name string + OwnerID string + Region string + Splash string + VerificationLevel *VerificationLevel + type GuildRole struct + GuildID string + Role *Role + type GuildRoleCreate struct + type GuildRoleDelete struct + GuildID string + RoleID string + type GuildRoleUpdate struct + type GuildUpdate struct + type ICEServer struct + Credential string + URL string + Username string + type Invite struct + Channel *Channel + Code string + CreatedAt Timestamp + Guild *Guild + Inviter *User + MaxAge int + MaxUses int + Revoked bool + Temporary bool + Unique bool + Uses int + type Member struct + Deaf bool + GuildID string + JoinedAt string + Mute bool + Nick string + Roles []string + User *User + type Message struct + Attachments []*MessageAttachment + Author *User + ChannelID string + Content string + EditedTimestamp Timestamp + Embeds []*MessageEmbed + ID string + MentionEveryone bool + MentionRoles []string + Mentions []*User + Reactions []*MessageReactions + Timestamp Timestamp + Tts bool + Type MessageType + func (m *Message) ContentWithMentionsReplaced() (content string) + func (m *Message) ContentWithMoreMentionsReplaced(s *Session) (content string, err error) + type MessageAck struct + ChannelID string + MessageID string + type MessageAttachment struct + Filename string + Height int + ID string + ProxyURL string + Size int + URL string + Width int + type MessageCreate struct + type MessageDelete struct + type MessageDeleteBulk struct + ChannelID string + Messages []string + type MessageEdit struct + Channel string + Content *string + Embed *MessageEmbed + ID string + func NewMessageEdit(channelID string, messageID string) *MessageEdit + func (m *MessageEdit) SetContent(str string) *MessageEdit + func (m *MessageEdit) SetEmbed(embed *MessageEmbed) *MessageEdit + type MessageEmbed struct + Author *MessageEmbedAuthor + Color int + Description string + Fields []*MessageEmbedField + Footer *MessageEmbedFooter + Image *MessageEmbedImage + Provider *MessageEmbedProvider + Thumbnail *MessageEmbedThumbnail + Timestamp string + Title string + Type string + URL string + Video *MessageEmbedVideo + type MessageEmbedAuthor struct + IconURL string + Name string + ProxyIconURL string + URL string + type MessageEmbedField struct + Inline bool + Name string + Value string + type MessageEmbedFooter struct + IconURL string + ProxyIconURL string + Text string + type MessageEmbedImage struct + Height int + ProxyURL string + URL string + Width int + type MessageEmbedProvider struct + Name string + URL string + type MessageEmbedThumbnail struct + Height int + ProxyURL string + URL string + Width int + type MessageEmbedVideo struct + Height int + ProxyURL string + URL string + Width int + type MessageReaction struct + ChannelID string + Emoji Emoji + MessageID string + UserID string + type MessageReactionAdd struct + type MessageReactionRemove struct + type MessageReactionRemoveAll struct + type MessageReactions struct + Count int + Emoji *Emoji + Me bool + type MessageSend struct + Content string + Embed *MessageEmbed + File *File + Files []*File + Tts bool + type MessageType int + const MessageTypeCall + const MessageTypeChannelIconChange + const MessageTypeChannelNameChange + const MessageTypeChannelPinnedMessage + const MessageTypeDefault + const MessageTypeGuildMemberJoin + const MessageTypeRecipientAdd + const MessageTypeRecipientRemove + type MessageUpdate struct + type Packet struct + Opus []byte + PCM []int16 + SSRC uint32 + Sequence uint16 + Timestamp uint32 + Type []byte + type PermissionOverwrite struct + Allow int + Deny int + ID string + Type string + type Presence struct + Game *Game + Nick string + Roles []string + Since *int + Status Status + User *User + type PresenceUpdate struct + GuildID string + Roles []string + type PresencesReplace []*Presence + type RESTError struct + Message *APIErrorMessage + Request *http.Request + Response *http.Response + ResponseBody []byte + func (r RESTError) Error() string + type RateLimit struct + URL string + type RateLimiter struct + func NewRatelimiter() *RateLimiter + func (r *RateLimiter) GetBucket(key string) *Bucket + func (r *RateLimiter) GetWaitTime(b *Bucket, minRemaining int) time.Duration + func (r *RateLimiter) LockBucket(bucketID string) *Bucket + func (r *RateLimiter) LockBucketObject(b *Bucket) *Bucket + type ReadState struct + ID string + LastMessageID string + MentionCount int + type Ready struct + Guilds []*Guild + Notes map[string]string + Presences []*Presence + PrivateChannels []*Channel + ReadState []*ReadState + Relationships []*Relationship + SessionID string + Settings *Settings + User *User + UserGuildSettings []*UserGuildSettings + Version int + type Relationship struct + ID string + Type int + User *User + type RelationshipAdd struct + type RelationshipRemove struct + type Resumed struct + Trace []string + type Role struct + Color int + Hoist bool + ID string + Managed bool + Mentionable bool + Name string + Permissions int + Position int + type Roles []*Role + func (r Roles) Len() int + func (r Roles) Less(i, j int) bool + func (r Roles) Swap(i, j int) + type Session struct + Client *http.Client + Compress bool + DataReady bool + Debug bool + LastHeartbeatAck time.Time + LogLevel int + MFA bool + MaxRestRetries int + Ratelimiter *RateLimiter + ShardCount int + ShardID int + ShouldReconnectOnError bool + State *State + StateEnabled bool + SyncEvents bool + Token string + UDPReady bool + VoiceConnections map[string]*VoiceConnection + VoiceReady bool + func New(args ...interface{}) (s *Session, err error) + func (s *Session) AddHandler(handler interface{}) func() + func (s *Session) AddHandlerOnce(handler interface{}) func() + func (s *Session) Application(appID string) (st *Application, err error) + func (s *Session) ApplicationBotCreate(appID string) (st *User, err error) + func (s *Session) ApplicationCreate(ap *Application) (st *Application, err error) + func (s *Session) ApplicationDelete(appID string) (err error) + func (s *Session) ApplicationUpdate(appID string, ap *Application) (st *Application, err error) + func (s *Session) Applications() (st []*Application, err error) + func (s *Session) Channel(channelID string) (st *Channel, err error) + func (s *Session) ChannelDelete(channelID string) (st *Channel, err error) + func (s *Session) ChannelEdit(channelID, name string) (*Channel, error) + func (s *Session) ChannelEditComplex(channelID string, data *ChannelEdit) (st *Channel, err error) + func (s *Session) ChannelFileSend(channelID, name string, r io.Reader) (*Message, error) + func (s *Session) ChannelFileSendWithMessage(channelID, content string, name string, r io.Reader) (*Message, error) + func (s *Session) ChannelInviteCreate(channelID string, i Invite) (st *Invite, err error) + func (s *Session) ChannelInvites(channelID string) (st []*Invite, err error) + func (s *Session) ChannelMessage(channelID, messageID string) (st *Message, err error) + func (s *Session) ChannelMessageAck(channelID, messageID, lastToken string) (st *Ack, err error) + func (s *Session) ChannelMessageDelete(channelID, messageID string) (err error) + func (s *Session) ChannelMessageEdit(channelID, messageID, content string) (*Message, error) + func (s *Session) ChannelMessageEditComplex(m *MessageEdit) (st *Message, err error) + func (s *Session) ChannelMessageEditEmbed(channelID, messageID string, embed *MessageEmbed) (*Message, error) + func (s *Session) ChannelMessagePin(channelID, messageID string) (err error) + func (s *Session) ChannelMessageSend(channelID string, content string) (*Message, error) + func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend) (st *Message, err error) + func (s *Session) ChannelMessageSendEmbed(channelID string, embed *MessageEmbed) (*Message, error) + func (s *Session) ChannelMessageSendTTS(channelID string, content string) (*Message, error) + func (s *Session) ChannelMessageUnpin(channelID, messageID string) (err error) + func (s *Session) ChannelMessages(channelID string, limit int, beforeID, afterID, aroundID string) (st []*Message, err error) + func (s *Session) ChannelMessagesBulkDelete(channelID string, messages []string) (err error) + func (s *Session) ChannelMessagesPinned(channelID string) (st []*Message, err error) + func (s *Session) ChannelPermissionDelete(channelID, targetID string) (err error) + func (s *Session) ChannelPermissionSet(channelID, targetID, targetType string, allow, deny int) (err error) + func (s *Session) ChannelTyping(channelID string) (err error) + func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *VoiceConnection, err error) + func (s *Session) ChannelWebhooks(channelID string) (st []*Webhook, err error) + func (s *Session) Close() (err error) + func (s *Session) Gateway() (gateway string, err error) + func (s *Session) GatewayBot() (st *GatewayBotResponse, err error) + func (s *Session) Guild(guildID string) (st *Guild, err error) + func (s *Session) GuildBanCreate(guildID, userID string, days int) (err error) + func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days int) (err error) + func (s *Session) GuildBanDelete(guildID, userID string) (err error) + func (s *Session) GuildBans(guildID string) (st []*GuildBan, err error) + func (s *Session) GuildChannelCreate(guildID, name, ctype string) (st *Channel, err error) + func (s *Session) GuildChannels(guildID string) (st []*Channel, err error) + func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel) (err error) + func (s *Session) GuildCreate(name string) (st *Guild, err error) + func (s *Session) GuildDelete(guildID string) (st *Guild, err error) + func (s *Session) GuildEdit(guildID string, g GuildParams) (st *Guild, err error) + func (s *Session) GuildEmbed(guildID string) (st *GuildEmbed, err error) + func (s *Session) GuildEmbedEdit(guildID string, enabled bool, channelID string) (err error) + func (s *Session) GuildIcon(guildID string) (img image.Image, err error) + func (s *Session) GuildIntegrationCreate(guildID, integrationType, integrationID string) (err error) + func (s *Session) GuildIntegrationDelete(guildID, integrationID string) (err error) + func (s *Session) GuildIntegrationEdit(guildID, integrationID string, expireBehavior, expireGracePeriod int, ...) (err error) + func (s *Session) GuildIntegrationSync(guildID, integrationID string) (err error) + func (s *Session) GuildIntegrations(guildID string) (st []*GuildIntegration, err error) + func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) + func (s *Session) GuildLeave(guildID string) (err error) + func (s *Session) GuildMember(guildID, userID string) (st *Member, err error) + func (s *Session) GuildMemberDelete(guildID, userID string) (err error) + func (s *Session) GuildMemberDeleteWithReason(guildID, userID, reason string) (err error) + func (s *Session) GuildMemberEdit(guildID, userID string, roles []string) (err error) + func (s *Session) GuildMemberMove(guildID, userID, channelID string) (err error) + func (s *Session) GuildMemberNickname(guildID, userID, nickname string) (err error) + func (s *Session) GuildMemberRoleAdd(guildID, userID, roleID string) (err error) + func (s *Session) GuildMemberRoleRemove(guildID, userID, roleID string) (err error) + func (s *Session) GuildMembers(guildID string, after string, limit int) (st []*Member, err error) + func (s *Session) GuildPrune(guildID string, days uint32) (count uint32, err error) + func (s *Session) GuildPruneCount(guildID string, days uint32) (count uint32, err error) + func (s *Session) GuildRoleCreate(guildID string) (st *Role, err error) + func (s *Session) GuildRoleDelete(guildID, roleID string) (err error) + func (s *Session) GuildRoleEdit(guildID, roleID, name string, color int, hoist bool, perm int, mention bool) (st *Role, err error) + func (s *Session) GuildRoleReorder(guildID string, roles []*Role) (st []*Role, err error) + func (s *Session) GuildRoles(guildID string) (st []*Role, err error) + func (s *Session) GuildSplash(guildID string) (img image.Image, err error) + func (s *Session) GuildWebhooks(guildID string) (st []*Webhook, err error) + func (s *Session) Invite(inviteID string) (st *Invite, err error) + func (s *Session) InviteAccept(inviteID string) (st *Invite, err error) + func (s *Session) InviteDelete(inviteID string) (st *Invite, err error) + func (s *Session) Login(email, password string) (err error) + func (s *Session) Logout() (err error) + func (s *Session) MessageReactionAdd(channelID, messageID, emojiID string) error + func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID string) error + func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit int) (st []*User, err error) + func (s *Session) MessageReactionsRemoveAll(channelID, messageID string) error + func (s *Session) Open() error + func (s *Session) Register(username string) (token string, err error) + func (s *Session) RelationshipDelete(userID string) (err error) + func (s *Session) RelationshipFriendRequestAccept(userID string) (err error) + func (s *Session) RelationshipFriendRequestSend(userID string) (err error) + func (s *Session) RelationshipUserBlock(userID string) (err error) + func (s *Session) RelationshipsGet() (r []*Relationship, err error) + func (s *Session) RelationshipsMutualGet(userID string) (mf []*User, err error) + func (s *Session) Request(method, urlStr string, data interface{}) (response []byte, err error) + func (s *Session) RequestGuildMembers(guildID, query string, limit int) (err error) + func (s *Session) RequestWithBucketID(method, urlStr string, data interface{}, bucketID string) (response []byte, err error) + func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b []byte, bucket *Bucket, sequence int) (response []byte, err error) + func (s *Session) UpdateStatus(idle int, game string) (err error) + func (s *Session) UpdateStatusComplex(usd UpdateStatusData) (err error) + func (s *Session) UpdateStreamingStatus(idle int, game string, url string) (err error) + func (s *Session) User(userID string) (st *User, err error) + func (s *Session) UserAvatar(userID string) (img image.Image, err error) + func (s *Session) UserAvatarDecode(u *User) (img image.Image, err error) + func (s *Session) UserChannelCreate(recipientID string) (st *Channel, err error) + func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions int, err error) + func (s *Session) UserChannels() (st []*Channel, err error) + func (s *Session) UserGuildSettingsEdit(guildID string, settings *UserGuildSettingsEdit) (st *UserGuildSettings, err error) + func (s *Session) UserGuilds(limit int, beforeID, afterID string) (st []*UserGuild, err error) + func (s *Session) UserNoteSet(userID string, message string) (err error) + func (s *Session) UserSettings() (st *Settings, err error) + func (s *Session) UserUpdate(email, password, username, avatar, newPassword string) (st *User, err error) + func (s *Session) UserUpdateStatus(status Status) (st *Settings, err error) + func (s *Session) VoiceICE() (st *VoiceICE, err error) + func (s *Session) VoiceRegions() (st []*VoiceRegion, err error) + func (s *Session) Webhook(webhookID string) (st *Webhook, err error) + func (s *Session) WebhookCreate(channelID, name, avatar string) (st *Webhook, err error) + func (s *Session) WebhookDelete(webhookID string) (err error) + func (s *Session) WebhookDeleteWithToken(webhookID, token string) (st *Webhook, err error) + func (s *Session) WebhookEdit(webhookID, name, avatar string) (st *Role, err error) + func (s *Session) WebhookEditWithToken(webhookID, token, name, avatar string) (st *Role, err error) + func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *WebhookParams) (err error) + func (s *Session) WebhookWithToken(webhookID, token string) (st *Webhook, err error) + type Settings struct + ConvertEmoticons bool + DetectPlatformAccounts bool + DeveloperMode bool + EnableTtsCommand bool + FriendSourceFlags *FriendSourceFlags + GuildPositions []string + InlineAttachmentMedia bool + InlineEmbedMedia bool + Locale string + MessageDisplayCompact bool + RenderEmbeds bool + RestrictedGuilds []string + ShowCurrentGame bool + Status Status + Theme string + type State struct + MaxMessageCount int + TrackChannels bool + TrackEmojis bool + TrackMembers bool + TrackPresences bool + TrackRoles bool + TrackVoice bool + func NewState() *State + func (s *State) Channel(channelID string) (*Channel, error) + func (s *State) ChannelAdd(channel *Channel) error + func (s *State) ChannelRemove(channel *Channel) error + func (s *State) Emoji(guildID, emojiID string) (*Emoji, error) + func (s *State) EmojiAdd(guildID string, emoji *Emoji) error + func (s *State) EmojisAdd(guildID string, emojis []*Emoji) error + func (s *State) Guild(guildID string) (*Guild, error) + func (s *State) GuildAdd(guild *Guild) error + func (s *State) GuildChannel(guildID, channelID string) (*Channel, error) + func (s *State) GuildRemove(guild *Guild) error + func (s *State) Member(guildID, userID string) (*Member, error) + func (s *State) MemberAdd(member *Member) error + func (s *State) MemberRemove(member *Member) error + func (s *State) Message(channelID, messageID string) (*Message, error) + func (s *State) MessageAdd(message *Message) error + func (s *State) MessageRemove(message *Message) error + func (s *State) OnInterface(se *Session, i interface{}) (err error) + func (s *State) Presence(guildID, userID string) (*Presence, error) + func (s *State) PresenceAdd(guildID string, presence *Presence) error + func (s *State) PresenceRemove(guildID string, presence *Presence) error + func (s *State) PrivateChannel(channelID string) (*Channel, error) + func (s *State) Role(guildID, roleID string) (*Role, error) + func (s *State) RoleAdd(guildID string, role *Role) error + func (s *State) RoleRemove(guildID, roleID string) error + func (s *State) UserChannelPermissions(userID, channelID string) (apermissions int, err error) + func (s *State) UserColor(userID, channelID string) int + type Status string + const StatusDoNotDisturb + const StatusIdle + const StatusInvisible + const StatusOffline + const StatusOnline + type TimeStamps struct + EndTimestamp int64 + StartTimestamp int64 + func (t *TimeStamps) UnmarshalJSON(b []byte) error + type Timestamp string + func (t Timestamp) Parse() (time.Time, error) + type TooManyRequests struct + Bucket string + Message string + RetryAfter time.Duration + type TypingStart struct + ChannelID string + Timestamp int + UserID string + type UpdateStatusData struct + AFK bool + Game *Game + IdleSince *int + Status string + type User struct + Avatar string + Bot bool + Discriminator string + Email string + ID string + MFAEnabled bool + Token string + Username string + Verified bool + func (u *User) AvatarURL(size string) string + func (u *User) Mention() string + func (u *User) String() string + type UserGuild struct + ID string + Icon string + Name string + Owner bool + Permissions int + type UserGuildSettings struct + ChannelOverrides []*UserGuildSettingsChannelOverride + GuildID string + MessageNotifications int + MobilePush bool + Muted bool + SupressEveryone bool + type UserGuildSettingsChannelOverride struct + ChannelID string + MessageNotifications int + Muted bool + type UserGuildSettingsEdit struct + ChannelOverrides map[string]*UserGuildSettingsChannelOverride + MessageNotifications int + MobilePush bool + Muted bool + SupressEveryone bool + type UserGuildSettingsUpdate struct + type UserNoteUpdate struct + ID string + Note string + type UserSettingsUpdate map[string]interface + type UserUpdate struct + type VerificationLevel int + const VerificationLevelHigh + const VerificationLevelLow + const VerificationLevelMedium + const VerificationLevelNone + type VoiceConnection struct + ChannelID string + Debug bool + GuildID string + LogLevel int + OpusRecv chan *Packet + OpusSend chan []byte + Ready bool + UserID string + func (v *VoiceConnection) AddHandler(h VoiceSpeakingUpdateHandler) + func (v *VoiceConnection) ChangeChannel(channelID string, mute, deaf bool) (err error) + func (v *VoiceConnection) Close() + func (v *VoiceConnection) Disconnect() (err error) + func (v *VoiceConnection) Speaking(b bool) (err error) + type VoiceICE struct + Servers []*ICEServer + TTL string + type VoiceRegion struct + Hostname string + ID string + Name string + Port int + type VoiceServerUpdate struct + Endpoint string + GuildID string + Token string + type VoiceSpeakingUpdate struct + SSRC int + Speaking bool + UserID string + type VoiceSpeakingUpdateHandler func(vc *VoiceConnection, vs *VoiceSpeakingUpdate) + type VoiceState struct + ChannelID string + Deaf bool + GuildID string + Mute bool + SelfDeaf bool + SelfMute bool + SessionID string + Suppress bool + UserID string + type VoiceStateUpdate struct + type Webhook struct + Avatar string + ChannelID string + GuildID string + ID string + Name string + Token string + User *User + type WebhookParams struct + AvatarURL string + Content string + Embeds []*MessageEmbed + File string + TTS bool + Username string