Documentation
¶
Index ¶
- Constants
- Variables
- func GuildAllChannelsID(guild string) (id string, err error)
- func MultipartBodyWithJSON(data interface{}, files []*File) (string, []byte, error)
- func SnowflakeTimestamp(ID string) (time.Time, error)
- func VerifyInteraction(r *http.Request, key ed25519.PublicKey) bool
- type APIErrorMessage
- type ActionsRow
- type Activity
- type ActivityType
- type AddedThreadMember
- type AllowedMentionType
- type Application
- type ApplicationCommand
- type ApplicationCommandInteractionData
- type ApplicationCommandInteractionDataOption
- func (o ApplicationCommandInteractionDataOption) BoolValue() bool
- func (o ApplicationCommandInteractionDataOption) ChannelValue(s *Session) *Channel
- func (o ApplicationCommandInteractionDataOption) FloatValue() float64
- func (o ApplicationCommandInteractionDataOption) GetOption(name string) (option *ApplicationCommandInteractionDataOption)
- func (o ApplicationCommandInteractionDataOption) IntValue() int64
- func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID string) *Role
- func (o ApplicationCommandInteractionDataOption) StringValue() string
- func (o ApplicationCommandInteractionDataOption) UintValue() uint64
- func (o ApplicationCommandInteractionDataOption) UserValue(s *Session) *User
- type ApplicationCommandInteractionDataResolved
- type ApplicationCommandOption
- type ApplicationCommandOptionChoice
- type ApplicationCommandOptionType
- type ApplicationCommandPermissionType
- type ApplicationCommandPermissions
- type ApplicationCommandPermissionsList
- type ApplicationCommandPermissionsUpdate
- type ApplicationCommandType
- type ApplicationInstallParams
- type ApplicationIntegrationType
- type ApplicationIntegrationTypeConfig
- type ApplicationRoleConnection
- type ApplicationRoleConnectionMetadata
- type ApplicationRoleConnectionMetadataType
- type Asset
- type Assets
- type AuditLogAction
- type AuditLogChange
- type AuditLogChangeKey
- type AuditLogEntry
- type AuditLogOptions
- type AuditLogOptionsType
- type AutoModerationAction
- type AutoModerationActionExecution
- type AutoModerationActionMetadata
- type AutoModerationActionType
- type AutoModerationKeywordPreset
- type AutoModerationRule
- type AutoModerationRuleCreate
- type AutoModerationRuleDelete
- type AutoModerationRuleEventType
- type AutoModerationRuleTriggerType
- type AutoModerationRuleUpdate
- type AutoModerationTriggerMetadata
- type Bucket
- type Button
- type ButtonStyle
- type Channel
- type ChannelCreate
- type ChannelDelete
- type ChannelEdit
- type ChannelFlags
- type ChannelFollow
- type ChannelPinsUpdate
- type ChannelType
- type ChannelUpdate
- type ClientStatus
- type ComponentEmoji
- type ComponentType
- type Connect
- type Disconnect
- type EmbedType
- type Emoji
- type EmojiParams
- type Entitlement
- type EntitlementCreate
- type EntitlementDelete
- type EntitlementFilterOptions
- type EntitlementOwnerType
- type EntitlementTest
- type EntitlementType
- type EntitlementUpdate
- type Event
- type EventHandler
- type EventInterfaceProvider
- type ExpireBehavior
- type ExplicitContentFilterLevel
- type File
- type ForumDefaultReaction
- type ForumLayout
- type ForumSortOrderType
- type ForumTag
- type GatewayBotResponse
- type GatewayStatusUpdate
- type Guild
- type GuildApplicationCommandPermissions
- type GuildAuditLog
- type GuildAuditLogEntryCreate
- type GuildBan
- type GuildBanAdd
- type GuildBanRemove
- type GuildChannelCreateData
- type GuildCreate
- type GuildDelete
- type GuildEmbed
- type GuildEmojisUpdate
- type GuildFeature
- type GuildIntegrationsUpdate
- type GuildMemberAdd
- type GuildMemberAddParams
- type GuildMemberParams
- type GuildMemberRemove
- type GuildMemberUpdate
- type GuildMembersChunk
- type GuildNSFWLevel
- type GuildOnboarding
- type GuildOnboardingMode
- type GuildOnboardingPrompt
- type GuildOnboardingPromptOption
- type GuildOnboardingPromptType
- type GuildParams
- type GuildPreview
- type GuildRole
- type GuildRoleCreate
- type GuildRoleDelete
- type GuildRoleUpdate
- type GuildScheduledEvent
- type GuildScheduledEventCreate
- type GuildScheduledEventDelete
- type GuildScheduledEventEntityMetadata
- type GuildScheduledEventEntityType
- type GuildScheduledEventParams
- type GuildScheduledEventPrivacyLevel
- type GuildScheduledEventStatus
- type GuildScheduledEventUpdate
- type GuildScheduledEventUser
- type GuildScheduledEventUserAdd
- type GuildScheduledEventUserRemove
- type GuildTemplate
- type GuildTemplateParams
- type GuildUpdate
- type Identify
- type IdentifyProperties
- type Integration
- type IntegrationAccount
- type IntegrationCreate
- type IntegrationDelete
- type IntegrationUpdate
- type Intent
- type Interaction
- type InteractionContextType
- type InteractionCreate
- type InteractionData
- type InteractionResponse
- type InteractionResponseData
- type InteractionResponseType
- type InteractionType
- type Invite
- type InviteCreate
- type InviteDelete
- type InviteTargetType
- type Locale
- type Member
- type MemberFlags
- type MembershipState
- type Message
- func (m *Message) ContentWithMentionsReplaced() (content string)
- func (m *Message) ContentWithMoreMentionsReplaced(s *Session) (content string, err error)
- func (m *Message) Forward() *MessageReference
- func (m *Message) GetCustomEmojis() []*Emoji
- func (m *Message) Reference() *MessageReference
- func (m *Message) SoftReference() *MessageReference
- func (m *Message) UnmarshalJSON(data []byte) error
- type MessageActivity
- type MessageActivityType
- type MessageAllowedMentions
- type MessageApplication
- type MessageAttachment
- type MessageComponent
- type MessageComponentInteractionData
- type MessageComponentInteractionDataResolved
- type MessageCreate
- type MessageDelete
- type MessageDeleteBulk
- type MessageEdit
- type MessageEmbed
- type MessageEmbedAuthor
- type MessageEmbedField
- type MessageEmbedFooter
- type MessageEmbedImage
- type MessageEmbedProvider
- type MessageEmbedThumbnail
- type MessageEmbedVideo
- type MessageFlags
- type MessageInteraction
- type MessageInteractionMetadata
- type MessageNotifications
- type MessagePollVoteAdd
- type MessagePollVoteRemove
- type MessageReaction
- type MessageReactionAdd
- type MessageReactionRemove
- type MessageReactionRemoveAll
- type MessageReactions
- type MessageReference
- type MessageReferenceType
- type MessageSend
- type MessageSnapshot
- type MessageType
- type MessageUpdate
- type MfaLevel
- type ModalSubmitInteractionData
- type Packet
- type Party
- type PermissionOverwrite
- type PermissionOverwriteType
- type Poll
- type PollAnswer
- type PollAnswerCount
- type PollLayoutType
- type PollMedia
- type PollResults
- type PremiumTier
- type Presence
- type PresenceUpdate
- type PresencesReplace
- type RESTError
- type RateLimit
- type RateLimitError
- type RateLimiter
- type ReadState
- type Ready
- type RecurrenceRule
- type RecurrenceRuleFrequency
- type RecurrenceRuleMonth
- type RecurrenceRuleNWeekDay
- type RecurrenceRuleWeekday
- type RequestConfig
- type RequestOption
- func WithAuditLogReason(reason string) RequestOption
- func WithClient(client *http.Client) RequestOption
- func WithContext(ctx context.Context) RequestOption
- func WithHeader(key, value string) RequestOption
- func WithLocale(locale Locale) RequestOption
- func WithRestRetries(max int) RequestOption
- func WithRetryOnRatelimit(retry bool) RequestOption
- type Resumed
- type Role
- type RoleFlags
- type RoleParams
- type Roles
- type SKU
- type SKUFlags
- type SKUType
- type Secrets
- type SelectMenu
- type SelectMenuDefaultValue
- type SelectMenuDefaultValueType
- type SelectMenuOption
- type SelectMenuType
- type Session
- 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) ApplicationAssets(appID string) (ass []*Asset, err error)
- func (s *Session) ApplicationBotCreate(appID string) (st *User, err error)
- func (s *Session) ApplicationCommand(appID, guildID, cmdID string, options ...RequestOption) (cmd *ApplicationCommand, err error)
- func (s *Session) ApplicationCommandBulkOverwrite(appID string, guildID string, commands []*ApplicationCommand, ...) (createdCommands []*ApplicationCommand, err error)
- func (s *Session) ApplicationCommandCreate(appID string, guildID string, cmd *ApplicationCommand, ...) (ccmd *ApplicationCommand, err error)
- func (s *Session) ApplicationCommandDelete(appID, guildID, cmdID string, options ...RequestOption) error
- func (s *Session) ApplicationCommandEdit(appID, guildID, cmdID string, cmd *ApplicationCommand, ...) (updated *ApplicationCommand, err error)
- func (s *Session) ApplicationCommandPermissions(appID, guildID, cmdID string, options ...RequestOption) (permissions *GuildApplicationCommandPermissions, err error)
- func (s *Session) ApplicationCommandPermissionsBatchEdit(appID, guildID string, permissions []*GuildApplicationCommandPermissions, ...) (err error)
- func (s *Session) ApplicationCommandPermissionsEdit(appID, guildID, cmdID string, permissions *ApplicationCommandPermissionsList, ...) (err error)
- func (s *Session) ApplicationCommands(appID, guildID string, options ...RequestOption) (cmd []*ApplicationCommand, err error)
- func (s *Session) ApplicationCreate(ap *Application) (st *Application, err error)
- func (s *Session) ApplicationDelete(appID string) (err error)
- func (s *Session) ApplicationEmoji(appID, emojiID string, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) ApplicationEmojiCreate(appID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) ApplicationEmojiDelete(appID, emojiID string, options ...RequestOption) (err error)
- func (s *Session) ApplicationEmojiEdit(appID string, emojiID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) ApplicationEmojis(appID string, options ...RequestOption) (emojis []*Emoji, err error)
- func (s *Session) ApplicationRoleConnectionMetadata(appID string) (st []*ApplicationRoleConnectionMetadata, err error)
- func (s *Session) ApplicationRoleConnectionMetadataUpdate(appID string, metadata []*ApplicationRoleConnectionMetadata) (st []*ApplicationRoleConnectionMetadata, 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) AutoModerationRule(guildID, ruleID string, options ...RequestOption) (st *AutoModerationRule, err error)
- func (s *Session) AutoModerationRuleCreate(guildID string, rule *AutoModerationRule, options ...RequestOption) (st *AutoModerationRule, err error)
- func (s *Session) AutoModerationRuleDelete(guildID, ruleID string, options ...RequestOption) (err error)
- func (s *Session) AutoModerationRuleEdit(guildID, ruleID string, rule *AutoModerationRule, options ...RequestOption) (st *AutoModerationRule, err error)
- func (s *Session) AutoModerationRules(guildID string, options ...RequestOption) (st []*AutoModerationRule, err error)
- func (s *Session) Channel(channelID string, options ...RequestOption) (st *Channel, err error)
- func (s *Session) ChannelDelete(channelID string, options ...RequestOption) (st *Channel, err error)
- func (s *Session) ChannelEdit(channelID string, data *ChannelEdit, options ...RequestOption) (st *Channel, err error)
- func (s *Session) ChannelEditComplex(channelID string, data *ChannelEdit, options ...RequestOption) (st *Channel, err error)
- func (s *Session) ChannelFileSend(channelID, name string, r io.Reader, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelFileSendWithMessage(channelID, content string, name string, r io.Reader, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelInviteCreate(channelID string, i Invite, options ...RequestOption) (st *Invite, err error)
- func (s *Session) ChannelInvites(channelID string, options ...RequestOption) (st []*Invite, err error)
- func (s *Session) ChannelMessage(channelID, messageID string, options ...RequestOption) (st *Message, err error)
- func (s *Session) ChannelMessageCrosspost(channelID, messageID string, options ...RequestOption) (st *Message, err error)
- func (s *Session) ChannelMessageDelete(channelID, messageID string, options ...RequestOption) (err error)
- func (s *Session) ChannelMessageEdit(channelID, messageID, content string, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageEditComplex(m *MessageEdit, options ...RequestOption) (st *Message, err error)
- func (s *Session) ChannelMessageEditEmbed(channelID, messageID string, embed *MessageEmbed, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageEditEmbeds(channelID, messageID string, embeds []*MessageEmbed, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessagePin(channelID, messageID string, options ...RequestOption) (err error)
- func (s *Session) ChannelMessageSend(channelID string, content string, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend, options ...RequestOption) (st *Message, err error)
- func (s *Session) ChannelMessageSendEmbed(channelID string, embed *MessageEmbed, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageSendEmbedReply(channelID string, embed *MessageEmbed, reference *MessageReference, ...) (*Message, error)
- func (s *Session) ChannelMessageSendEmbeds(channelID string, embeds []*MessageEmbed, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageSendEmbedsReply(channelID string, embeds []*MessageEmbed, reference *MessageReference, ...) (*Message, error)
- func (s *Session) ChannelMessageSendReply(channelID string, content string, reference *MessageReference, ...) (*Message, error)
- func (s *Session) ChannelMessageSendTTS(channelID string, content string, options ...RequestOption) (*Message, error)
- func (s *Session) ChannelMessageUnpin(channelID, messageID string, options ...RequestOption) (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, options ...RequestOption) (err error)
- func (s *Session) ChannelMessagesPinned(channelID string, options ...RequestOption) (st []*Message, err error)
- func (s *Session) ChannelNewsFollow(channelID, targetID string, options ...RequestOption) (st *ChannelFollow, err error)
- func (s *Session) ChannelPermissionDelete(channelID, targetID string, options ...RequestOption) (err error)
- func (s *Session) ChannelPermissionSet(channelID, targetID string, targetType PermissionOverwriteType, ...) (err error)
- func (s *Session) ChannelTyping(channelID string, options ...RequestOption) (err error)
- func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *VoiceConnection, err error)
- func (s *Session) ChannelVoiceJoinManual(gID, cID string, mute, deaf bool) (err error)
- func (s *Session) ChannelWebhooks(channelID string, options ...RequestOption) (st []*Webhook, err error)
- func (s *Session) Close() error
- func (s *Session) CloseWithCode(closeCode int) (err error)
- func (s *Session) EntitlementConsume(appID, entitlementID string, options ...RequestOption) (err error)
- func (s *Session) EntitlementTestCreate(appID string, data *EntitlementTest, options ...RequestOption) (err error)
- func (s *Session) EntitlementTestDelete(appID, entitlementID string, options ...RequestOption) (err error)
- func (s *Session) Entitlements(appID string, filterOptions *EntitlementFilterOptions, ...) (entitlements []*Entitlement, err error)
- func (s *Session) FollowupMessageCreate(interaction *Interaction, wait bool, data *WebhookParams, ...) (*Message, error)
- func (s *Session) FollowupMessageDelete(interaction *Interaction, messageID string, options ...RequestOption) error
- func (s *Session) FollowupMessageEdit(interaction *Interaction, messageID string, data *WebhookEdit, ...) (*Message, error)
- func (s *Session) ForumThreadStart(channelID, name string, archiveDuration ThreadArchiveDuration, content string, ...) (th *Channel, err error)
- func (s *Session) ForumThreadStartComplex(channelID string, threadData *ThreadStart, messageData *MessageSend, ...) (th *Channel, err error)
- func (s *Session) ForumThreadStartEmbed(channelID, name string, archiveDuration ThreadArchiveDuration, ...) (th *Channel, err error)
- func (s *Session) ForumThreadStartEmbeds(channelID, name string, archiveDuration ThreadArchiveDuration, ...) (th *Channel, err error)
- func (s *Session) Gateway(options ...RequestOption) (gateway string, err error)
- func (s *Session) GatewayBot(options ...RequestOption) (st *GatewayBotResponse, err error)
- func (s *Session) GatewayWriteStruct(data interface{}) (err error)
- func (s *Session) Guild(guildID string, options ...RequestOption) (st *Guild, err error)
- func (s *Session) GuildApplicationCommandsPermissions(appID, guildID string, options ...RequestOption) (permissions []*GuildApplicationCommandPermissions, err error)
- func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, limit int, ...) (st *GuildAuditLog, err error)
- func (s *Session) GuildBan(guildID, userID string, options ...RequestOption) (st *GuildBan, err error)
- func (s *Session) GuildBanCreate(guildID, userID string, days int, options ...RequestOption) (err error)
- func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days int, options ...RequestOption) (err error)
- func (s *Session) GuildBanDelete(guildID, userID string, options ...RequestOption) (err error)
- func (s *Session) GuildBans(guildID string, limit int, beforeID, afterID string, options ...RequestOption) (st []*GuildBan, err error)
- func (s *Session) GuildChannelCreate(guildID, name string, ctype ChannelType, options ...RequestOption) (st *Channel, err error)
- func (s *Session) GuildChannelCreateComplex(guildID string, data GuildChannelCreateData, options ...RequestOption) (st *Channel, err error)
- func (s *Session) GuildChannels(guildID string, options ...RequestOption) (st []*Channel, err error)
- func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel, options ...RequestOption) (err error)
- func (s *Session) GuildCreate(name string, options ...RequestOption) (st *Guild, err error)
- func (s *Session) GuildCreateWithTemplate(templateCode, name, icon string, options ...RequestOption) (st *Guild, err error)
- func (s *Session) GuildDelete(guildID string, options ...RequestOption) (err error)
- func (s *Session) GuildEdit(guildID string, g *GuildParams, options ...RequestOption) (st *Guild, err error)
- func (s *Session) GuildEmbed(guildID string, options ...RequestOption) (st *GuildEmbed, err error)
- func (s *Session) GuildEmbedEdit(guildID string, data *GuildEmbed, options ...RequestOption) (err error)
- func (s *Session) GuildEmoji(guildID, emojiID string, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) GuildEmojiCreate(guildID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) GuildEmojiDelete(guildID, emojiID string, options ...RequestOption) (err error)
- func (s *Session) GuildEmojiEdit(guildID, emojiID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error)
- func (s *Session) GuildEmojis(guildID string, options ...RequestOption) (emoji []*Emoji, err error)
- func (s *Session) GuildIcon(guildID string, options ...RequestOption) (img image.Image, err error)
- func (s *Session) GuildIntegrationCreate(guildID, integrationType, integrationID string, options ...RequestOption) (err error)
- func (s *Session) GuildIntegrationDelete(guildID, integrationID string, options ...RequestOption) (err error)
- func (s *Session) GuildIntegrationEdit(guildID, integrationID string, expireBehavior, expireGracePeriod int, ...) (err error)
- func (s *Session) GuildIntegrations(guildID string, options ...RequestOption) (st []*Integration, err error)
- func (s *Session) GuildInvites(guildID string, options ...RequestOption) (st []*Invite, err error)
- func (s *Session) GuildLeave(guildID string, options ...RequestOption) (err error)
- func (s *Session) GuildMember(guildID, userID string, options ...RequestOption) (st *Member, err error)
- func (s *Session) GuildMemberAdd(guildID, userID string, data *GuildMemberAddParams, options ...RequestOption) (err error)
- func (s *Session) GuildMemberDeafen(guildID string, userID string, deaf bool, options ...RequestOption) (err error)
- func (s *Session) GuildMemberDelete(guildID, userID string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberDeleteWithReason(guildID, userID, reason string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberEdit(guildID, userID string, data *GuildMemberParams, options ...RequestOption) (st *Member, err error)
- func (s *Session) GuildMemberEditComplex(guildID, userID string, data *GuildMemberParams, options ...RequestOption) (st *Member, err error)
- func (s *Session) GuildMemberMove(guildID string, userID string, channelID *string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberMute(guildID string, userID string, mute bool, options ...RequestOption) (err error)
- func (s *Session) GuildMemberNickname(guildID, userID, nickname string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberRoleAdd(guildID, userID, roleID string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberRoleRemove(guildID, userID, roleID string, options ...RequestOption) (err error)
- func (s *Session) GuildMemberTimeout(guildID string, userID string, until *time.Time, options ...RequestOption) (err error)
- func (s *Session) GuildMembers(guildID string, after string, limit int, options ...RequestOption) (st []*Member, err error)
- func (s *Session) GuildMembersSearch(guildID, query string, limit int, options ...RequestOption) (st []*Member, err error)
- func (s *Session) GuildOnboarding(guildID string, options ...RequestOption) (onboarding *GuildOnboarding, err error)
- func (s *Session) GuildOnboardingEdit(guildID string, o *GuildOnboarding, options ...RequestOption) (onboarding *GuildOnboarding, err error)
- func (s *Session) GuildPreview(guildID string, options ...RequestOption) (st *GuildPreview, err error)
- func (s *Session) GuildPrune(guildID string, days uint32, options ...RequestOption) (count uint32, err error)
- func (s *Session) GuildPruneCount(guildID string, days uint32, options ...RequestOption) (count uint32, err error)
- func (s *Session) GuildRoleCreate(guildID string, data *RoleParams, options ...RequestOption) (st *Role, err error)
- func (s *Session) GuildRoleDelete(guildID, roleID string, options ...RequestOption) (err error)
- func (s *Session) GuildRoleEdit(guildID, roleID string, data *RoleParams, options ...RequestOption) (st *Role, err error)
- func (s *Session) GuildRoleReorder(guildID string, roles []*Role, options ...RequestOption) (st []*Role, err error)
- func (s *Session) GuildRoles(guildID string, options ...RequestOption) (st []*Role, err error)
- func (s *Session) GuildScheduledEvent(guildID, eventID string, userCount bool, options ...RequestOption) (st *GuildScheduledEvent, err error)
- func (s *Session) GuildScheduledEventCreate(guildID string, event *GuildScheduledEventParams, options ...RequestOption) (st *GuildScheduledEvent, err error)
- func (s *Session) GuildScheduledEventDelete(guildID, eventID string, options ...RequestOption) (err error)
- func (s *Session) GuildScheduledEventEdit(guildID, eventID string, event *GuildScheduledEventParams, ...) (st *GuildScheduledEvent, err error)
- func (s *Session) GuildScheduledEventUsers(guildID, eventID string, limit int, withMember bool, beforeID, afterID string, ...) (st []*GuildScheduledEventUser, err error)
- func (s *Session) GuildScheduledEvents(guildID string, userCount bool, options ...RequestOption) (st []*GuildScheduledEvent, err error)
- func (s *Session) GuildSplash(guildID string, options ...RequestOption) (img image.Image, err error)
- func (s *Session) GuildTemplate(templateCode string, options ...RequestOption) (st *GuildTemplate, err error)
- func (s *Session) GuildTemplateCreate(guildID string, data *GuildTemplateParams, options ...RequestOption) (st *GuildTemplate)
- func (s *Session) GuildTemplateDelete(guildID, templateCode string, options ...RequestOption) (err error)
- func (s *Session) GuildTemplateEdit(guildID, templateCode string, data *GuildTemplateParams, ...) (st *GuildTemplate, err error)
- func (s *Session) GuildTemplateSync(guildID, templateCode string, options ...RequestOption) (err error)
- func (s *Session) GuildTemplates(guildID string, options ...RequestOption) (st []*GuildTemplate, err error)
- func (s *Session) GuildThreadsActive(guildID string, options ...RequestOption) (threads *ThreadsList, err error)
- func (s *Session) GuildWebhooks(guildID string, options ...RequestOption) (st []*Webhook, err error)
- func (s *Session) GuildWithCounts(guildID string, options ...RequestOption) (st *Guild, err error)
- func (s *Session) HeartbeatLatency() time.Duration
- func (s *Session) InteractionRespond(interaction *Interaction, resp *InteractionResponse, options ...RequestOption) error
- func (s *Session) InteractionResponse(interaction *Interaction, options ...RequestOption) (*Message, error)
- func (s *Session) InteractionResponseDelete(interaction *Interaction, options ...RequestOption) error
- func (s *Session) InteractionResponseEdit(interaction *Interaction, newresp *WebhookEdit, options ...RequestOption) (*Message, error)
- func (s *Session) Invite(inviteID string, options ...RequestOption) (st *Invite, err error)
- func (s *Session) InviteAccept(inviteID string, options ...RequestOption) (st *Invite, err error)
- func (s *Session) InviteComplex(inviteID, guildScheduledEventID string, withCounts, withExpiration bool, ...) (st *Invite, err error)
- func (s *Session) InviteDelete(inviteID string, options ...RequestOption) (st *Invite, err error)
- func (s *Session) InviteWithCounts(inviteID string, options ...RequestOption) (st *Invite, err error)
- func (s *Session) MessageReactionAdd(channelID, messageID, emojiID string, options ...RequestOption) error
- func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID string, options ...RequestOption) error
- func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit int, beforeID, afterID string, ...) (st []*User, err error)
- func (s *Session) MessageReactionsRemoveAll(channelID, messageID string, options ...RequestOption) error
- func (s *Session) MessageReactionsRemoveEmoji(channelID, messageID, emojiID string, options ...RequestOption) error
- func (s *Session) MessageThreadStart(channelID, messageID string, name string, ...) (ch *Channel, err error)
- func (s *Session) MessageThreadStartComplex(channelID, messageID string, data *ThreadStart, options ...RequestOption) (ch *Channel, err error)
- func (s *Session) Open() error
- func (s *Session) PollAnswerVoters(channelID, messageID string, answerID int) (voters []*User, err error)
- func (s *Session) PollExpire(channelID, messageID string) (msg *Message, err error)
- func (s *Session) Request(method, urlStr string, data interface{}, options ...RequestOption) (response []byte, err error)
- func (s *Session) RequestGuildMembers(guildID, query string, limit int, nonce string, presences bool) error
- func (s *Session) RequestGuildMembersBatch(guildIDs []string, query string, limit int, nonce string, presences bool) (err error)
- func (s *Session) RequestGuildMembersBatchList(guildIDs []string, userIDs []string, limit int, nonce string, presences bool) (err error)
- func (s *Session) RequestGuildMembersList(guildID string, userIDs []string, limit int, nonce string, presences bool) 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) SKUs(appID string) (skus []*SKU, err error)
- func (s *Session) StageInstance(channelID string, options ...RequestOption) (si *StageInstance, err error)
- func (s *Session) StageInstanceCreate(data *StageInstanceParams, options ...RequestOption) (si *StageInstance, err error)
- func (s *Session) StageInstanceDelete(channelID string, options ...RequestOption) (err error)
- func (s *Session) StageInstanceEdit(channelID string, data *StageInstanceParams, options ...RequestOption) (si *StageInstance, err error)
- func (s *Session) Subscription(skuID, subscriptionID, userID string, options ...RequestOption) (subscription *Subscription, err error)
- func (s *Session) Subscriptions(skuID string, userID string, before, after *time.Time, limit int, ...) (subscriptions []*Subscription, err error)
- func (s *Session) ThreadJoin(id string, options ...RequestOption) error
- func (s *Session) ThreadLeave(id string, options ...RequestOption) error
- func (s *Session) ThreadMember(threadID, memberID string, withMember bool, options ...RequestOption) (member *ThreadMember, err error)
- func (s *Session) ThreadMemberAdd(threadID, memberID string, options ...RequestOption) error
- func (s *Session) ThreadMemberRemove(threadID, memberID string, options ...RequestOption) error
- func (s *Session) ThreadMembers(threadID string, limit int, withMember bool, afterID string, ...) (members []*ThreadMember, err error)
- func (s *Session) ThreadStart(channelID, name string, typ ChannelType, archiveDuration ThreadArchiveDuration, ...) (ch *Channel, err error)
- func (s *Session) ThreadStartComplex(channelID string, data *ThreadStart, options ...RequestOption) (ch *Channel, err error)
- func (s *Session) ThreadsActive(channelID string, options ...RequestOption) (threads *ThreadsList, err error)
- func (s *Session) ThreadsArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error)
- func (s *Session) ThreadsPrivateArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error)
- func (s *Session) ThreadsPrivateJoinedArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error)
- func (s *Session) UpdateCustomStatus(state string) (err error)
- func (s *Session) UpdateGameStatus(idle int, name string) (err error)
- func (s *Session) UpdateListeningStatus(name string) (err error)
- func (s *Session) UpdateStatusComplex(usd UpdateStatusData) (err error)
- func (s *Session) UpdateStreamingStatus(idle int, name string, url string) (err error)
- func (s *Session) UpdateWatchStatus(idle int, name string) (err error)
- func (s *Session) User(userID string, options ...RequestOption) (st *User, err error)
- func (s *Session) UserApplicationRoleConnection(appID string) (st *ApplicationRoleConnection, err error)
- func (s *Session) UserApplicationRoleConnectionUpdate(appID string, rconn *ApplicationRoleConnection) (st *ApplicationRoleConnection, err error)
- func (s *Session) UserAvatar(userID string, options ...RequestOption) (img image.Image, err error)
- func (s *Session) UserAvatarDecode(u *User, options ...RequestOption) (img image.Image, err error)
- func (s *Session) UserChannelCreate(recipientID string, options ...RequestOption) (st *Channel, err error)
- func (s *Session) UserChannelPermissions(userID, channelID string, fetchOptions ...RequestOption) (apermissions int64, err error)
- func (s *Session) UserConnections(options ...RequestOption) (conn []*UserConnection, err error)
- func (s *Session) UserGuildMember(guildID string, options ...RequestOption) (st *Member, err error)
- func (s *Session) UserGuilds(limit int, beforeID, afterID string, withCounts bool, options ...RequestOption) (st []*UserGuild, err error)
- func (s *Session) UserUpdate(username, avatar, banner string, options ...RequestOption) (st *User, err error)
- func (s *Session) VoiceRegions(options ...RequestOption) (st []*VoiceRegion, err error)
- func (s *Session) Webhook(webhookID string, options ...RequestOption) (st *Webhook, err error)
- func (s *Session) WebhookCreate(channelID, name, avatar string, options ...RequestOption) (st *Webhook, err error)
- func (s *Session) WebhookDelete(webhookID string, options ...RequestOption) (err error)
- func (s *Session) WebhookDeleteWithToken(webhookID, token string, options ...RequestOption) (st *Webhook, err error)
- func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string, options ...RequestOption) (st *Webhook, err error)
- func (s *Session) WebhookEditWithToken(webhookID, token, name, avatar string, options ...RequestOption) (st *Webhook, err error)
- func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *WebhookParams, ...) (st *Message, err error)
- func (s *Session) WebhookMessage(webhookID, token, messageID string, options ...RequestOption) (message *Message, err error)
- func (s *Session) WebhookMessageDelete(webhookID, token, messageID string, options ...RequestOption) (err error)
- func (s *Session) WebhookMessageEdit(webhookID, token, messageID string, data *WebhookEdit, ...) (st *Message, err error)
- func (s *Session) WebhookThreadExecute(webhookID, token string, wait bool, threadID string, data *WebhookParams, ...) (st *Message, err error)
- func (s *Session) WebhookWithToken(webhookID, token string, options ...RequestOption) (st *Webhook, err error)
- type SessionInformation
- type StageInstance
- type StageInstanceEventCreate
- type StageInstanceEventDelete
- type StageInstanceEventUpdate
- type StageInstanceParams
- type StageInstancePrivacyLevel
- type 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) 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) MessageColor(message *Message) int
- func (s *State) MessagePermissions(message *Message) (apermissions int64, err 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) 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) ThreadListSync(tls *ThreadListSync) error
- func (s *State) ThreadMemberUpdate(mu *ThreadMemberUpdate) error
- func (s *State) ThreadMembersUpdate(tmu *ThreadMembersUpdate) error
- func (s *State) UserChannelPermissions(userID, channelID string) (apermissions int64, err error)
- func (s *State) UserColor(userID, channelID string) int
- func (s *State) VoiceState(guildID, userID string) (*VoiceState, error)
- type Status
- type Sticker
- type StickerFormat
- type StickerItem
- type StickerPack
- type StickerType
- type Subscription
- type SubscriptionCreate
- type SubscriptionDelete
- type SubscriptionStatus
- type SubscriptionUpdate
- type SystemChannelFlag
- type Team
- type TeamMember
- type TextInput
- type TextInputStyle
- type ThreadArchiveDuration
- type ThreadCreate
- type ThreadDelete
- type ThreadListSync
- type ThreadMember
- type ThreadMemberUpdate
- type ThreadMembersUpdate
- type ThreadMetadata
- type ThreadStart
- type ThreadUpdate
- type ThreadsList
- type TimeStamps
- type TooManyRequests
- type TypingStart
- type UpdateStatusData
- type User
- type UserConnection
- type UserFlags
- type UserGuild
- type UserPremiumType
- type UserUpdate
- type VerificationLevel
- type VoiceConnection
- type VoiceRegion
- type VoiceServerUpdate
- type VoiceSpeakingUpdate
- type VoiceSpeakingUpdateHandler
- type VoiceState
- type VoiceStateUpdate
- type Webhook
- type WebhookEdit
- type WebhookParams
- type WebhookType
- type WebhooksUpdate
Constants ¶
View Source
const ( StringSelectMenu = SelectMenuType(SelectMenuComponent) UserSelectMenu = SelectMenuType(UserSelectMenuComponent) RoleSelectMenu = SelectMenuType(RoleSelectMenuComponent) MentionableSelectMenu = SelectMenuType(MentionableSelectMenuComponent) ChannelSelectMenu = SelectMenuType(ChannelSelectMenuComponent) )
View Source
const ( LogError int = iota LogWarning LogInformational LogDebug )
View Source
const ( ThreadArchiveDurationOneHour = 60 ThreadArchiveDurationOneDay = 1440 ThreadArchiveDurationThreeDays = 4320 ThreadArchiveDurationOneWeek = 10080 )
View Source
const ( SubscriptionStatusActive = 0 SubscriptionStatusEnding = 1 SubscriptionStatusInactive = 2 )
View Source
const ( EntitlementTypePurchase = 1 EntitlementTypePremiumSubscription = 2 EntitlementTypeDeveloperGift = 3 EntitlementTypeTestModePurchase = 4 EntitlementTypeFreePurchase = 5 EntitlementTypeUserGift = 6 EntitlementTypePremiumPurchase = 7 EntitlementTypeApplicationSubscription = 8 )
View Source
const ( PermissionReadMessages = 1 << 10 PermissionSendMessages = 1 << 11 PermissionSendTTSMessages = 1 << 12 PermissionManageMessages = 1 << 13 PermissionEmbedLinks = 1 << 14 PermissionAttachFiles = 1 << 15 PermissionReadMessageHistory = 1 << 16 PermissionMentionEveryone = 1 << 17 PermissionUseExternalEmojis = 1 << 18 PermissionUseSlashCommands = 1 << 31 PermissionUseApplicationCommands = 1 << 31 PermissionManageThreads = 1 << 34 PermissionCreatePublicThreads = 1 << 35 PermissionCreatePrivateThreads = 1 << 36 PermissionUseExternalStickers = 1 << 37 PermissionSendMessagesInThreads = 1 << 38 PermissionSendVoiceMessages = 1 << 46 PermissionSendPolls = 1 << 49 PermissionUseExternalApps = 1 << 50 )
View Source
const ( PermissionVoicePrioritySpeaker = 1 << 8 PermissionVoiceStreamVideo = 1 << 9 PermissionVoiceConnect = 1 << 20 PermissionVoiceSpeak = 1 << 21 PermissionVoiceMuteMembers = 1 << 22 PermissionVoiceDeafenMembers = 1 << 23 PermissionVoiceMoveMembers = 1 << 24 PermissionVoiceUseVAD = 1 << 25 PermissionVoiceRequestToSpeak = 1 << 32 PermissionUseActivities = 1 << 39 PermissionUseEmbeddedActivities = 1 << 39 PermissionUseSoundboard = 1 << 42 PermissionUseExternalSounds = 1 << 45 )
View Source
const ( PermissionChangeNickname = 1 << 26 PermissionManageNicknames = 1 << 27 PermissionManageRoles = 1 << 28 PermissionManageWebhooks = 1 << 29 PermissionManageEmojis = 1 << 30 PermissionManageGuildExpressions = 1 << 30 PermissionManageEvents = 1 << 33 PermissionViewCreatorMonetizationAnalytics = 1 << 41 PermissionCreateGuildExpressions = 1 << 43 PermissionCreateEvents = 1 << 44 )
View Source
const ( PermissionCreateInstantInvite = 1 << 0 PermissionKickMembers = 1 << 1 PermissionBanMembers = 1 << 2 PermissionAdministrator = 1 << 3 PermissionManageChannels = 1 << 4 PermissionManageServer = 1 << 5 PermissionManageGuild = 1 << 5 PermissionAddReactions = 1 << 6 PermissionViewAuditLogs = 1 << 7 PermissionViewChannel = 1 << 10 PermissionViewGuildInsights = 1 << 19 PermissionModerateMembers = 1 << 40 PermissionAllText = PermissionViewChannel | PermissionSendMessages | PermissionSendTTSMessages | PermissionManageMessages | PermissionEmbedLinks | PermissionAttachFiles | PermissionReadMessageHistory | PermissionMentionEveryone PermissionAllVoice = PermissionViewChannel | PermissionVoiceConnect | PermissionVoiceSpeak | PermissionVoiceMuteMembers | PermissionVoiceDeafenMembers | PermissionVoiceMoveMembers | PermissionVoiceUseVAD | PermissionVoicePrioritySpeaker PermissionAllChannel = PermissionAllText | PermissionAllVoice | PermissionCreateInstantInvite | PermissionManageRoles | PermissionManageChannels | PermissionAddReactions | PermissionViewAuditLogs PermissionAll = PermissionAllChannel | PermissionKickMembers | PermissionBanMembers | PermissionManageServer | PermissionAdministrator | PermissionManageWebhooks | PermissionManageEmojis )
View Source
const ( ErrCodeGeneralError = 0 ErrCodeUnknownAccount = 10001 ErrCodeUnknownApplication = 10002 ErrCodeUnknownChannel = 10003 ErrCodeUnknownGuild = 10004 ErrCodeUnknownIntegration = 10005 ErrCodeUnknownInvite = 10006 ErrCodeUnknownMember = 10007 ErrCodeUnknownMessage = 10008 ErrCodeUnknownOverwrite = 10009 ErrCodeUnknownProvider = 10010 ErrCodeUnknownRole = 10011 ErrCodeUnknownToken = 10012 ErrCodeUnknownUser = 10013 ErrCodeUnknownEmoji = 10014 ErrCodeUnknownWebhook = 10015 ErrCodeUnknownWebhookService = 10016 ErrCodeUnknownSession = 10020 ErrCodeUnknownBan = 10026 ErrCodeUnknownSKU = 10027 ErrCodeUnknownStoreListing = 10028 ErrCodeUnknownEntitlement = 10029 ErrCodeUnknownBuild = 10030 ErrCodeUnknownLobby = 10031 ErrCodeUnknownBranch = 10032 ErrCodeUnknownStoreDirectoryLayout = 10033 ErrCodeUnknownRedistributable = 10036 ErrCodeUnknownGiftCode = 10038 ErrCodeUnknownStream = 10049 ErrCodeUnknownPremiumServerSubscribeCooldown = 10050 ErrCodeUnknownGuildTemplate = 10057 ErrCodeUnknownDiscoveryCategory = 10059 ErrCodeUnknownSticker = 10060 ErrCodeUnknownInteraction = 10062 ErrCodeUnknownApplicationCommand = 10063 ErrCodeUnknownApplicationCommandPermissions = 10066 ErrCodeUnknownStageInstance = 10067 ErrCodeUnknownGuildMemberVerificationForm = 10068 ErrCodeUnknownGuildWelcomeScreen = 10069 ErrCodeUnknownGuildScheduledEvent = 10070 ErrCodeUnknownGuildScheduledEventUser = 10071 ErrUnknownTag = 10087 ErrCodeBotsCannotUseEndpoint = 20001 ErrCodeOnlyBotsCanUseEndpoint = 20002 ErrCodeExplicitContentCannotBeSentToTheDesiredRecipients = 20009 ErrCodeYouAreNotAuthorizedToPerformThisActionOnThisApplication = 20012 ErrCodeThisActionCannotBePerformedDueToSlowmodeRateLimit = 20016 ErrCodeOnlyTheOwnerOfThisAccountCanPerformThisAction = 20018 ErrCodeMessageCannotBeEditedDueToAnnouncementRateLimits = 20022 ErrCodeChannelHasHitWriteRateLimit = 20028 ErrCodeTheWriteActionYouArePerformingOnTheServerHasHitTheWriteRateLimit = 20029 ErrCodeStageTopicContainsNotAllowedWordsForPublicStages = 20031 ErrCodeGuildPremiumSubscriptionLevelTooLow = 20035 ErrCodeMaximumGuildsReached = 30001 ErrCodeMaximumPinsReached = 30003 ErrCodeMaximumNumberOfRecipientsReached = 30004 ErrCodeMaximumGuildRolesReached = 30005 ErrCodeMaximumNumberOfWebhooksReached = 30007 ErrCodeMaximumNumberOfEmojisReached = 30008 ErrCodeTooManyReactions = 30010 ErrCodeMaximumNumberOfGuildChannelsReached = 30013 ErrCodeMaximumNumberOfAttachmentsInAMessageReached = 30015 ErrCodeMaximumNumberOfInvitesReached = 30016 ErrCodeMaximumNumberOfAnimatedEmojisReached = 30018 ErrCodeMaximumNumberOfServerMembersReached = 30019 ErrCodeMaximumNumberOfGuildDiscoverySubcategoriesReached = 30030 ErrCodeGuildAlreadyHasATemplate = 30031 ErrCodeMaximumNumberOfThreadParticipantsReached = 30033 ErrCodeMaximumNumberOfBansForNonGuildMembersHaveBeenExceeded = 30035 ErrCodeMaximumNumberOfBansFetchesHasBeenReached = 30037 ErrCodeMaximumNumberOfUncompletedGuildScheduledEventsReached = 30038 ErrCodeMaximumNumberOfStickersReached = 30039 ErrCodeMaximumNumberOfPruneRequestsHasBeenReached = 30040 ErrCodeMaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042 ErrCodeMaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046 ErrCodeMaximumNumberOfPinnedThreadsInForumChannelHasBeenReached = 30047 ErrCodeMaximumNumberOfTagsInForumChannelHasBeenReached = 30048 ErrCodeActionRequiredVerifiedAccount = 40002 ErrCodeOpeningDirectMessagesTooFast = 40003 ErrCodeSendMessagesHasBeenTemporarilyDisabled = 40004 ErrCodeRequestEntityTooLarge = 40005 ErrCodeFeatureTemporarilyDisabledServerSide = 40006 ErrCodeUserIsBannedFromThisGuild = 40007 ErrCodeTargetIsNotConnectedToVoice = 40032 ErrCodeMessageAlreadyCrossposted = 40033 ErrCodeAnApplicationWithThatNameAlreadyExists = 40041 ErrCodeInteractionHasAlreadyBeenAcknowledged = 40060 ErrCodeTagNamesMustBeUnique = 40061 ErrCodeMissingAccess = 50001 ErrCodeInvalidAccountType = 50002 ErrCodeCannotExecuteActionOnDMChannel = 50003 ErrCodeEmbedDisabled = 50004 ErrCodeGuildWidgetDisabled = 50004 ErrCodeCannotEditFromAnotherUser = 50005 ErrCodeCannotSendEmptyMessage = 50006 ErrCodeCannotSendMessagesToThisUser = 50007 ErrCodeCannotSendMessagesInVoiceChannel = 50008 ErrCodeChannelVerificationLevelTooHigh = 50009 ErrCodeOAuth2ApplicationDoesNotHaveBot = 50010 ErrCodeOAuth2ApplicationLimitReached = 50011 ErrCodeInvalidOAuthState = 50012 ErrCodeMissingPermissions = 50013 ErrCodeInvalidAuthenticationToken = 50014 ErrCodeTooFewOrTooManyMessagesToDelete = 50016 ErrCodeCanOnlyPinMessageToOriginatingChannel = 50019 ErrCodeInviteCodeWasEitherInvalidOrTaken = 50020 ErrCodeCannotExecuteActionOnSystemMessage = 50021 ErrCodeCannotExecuteActionOnThisChannelType = 50024 ErrCodeInvalidOAuth2AccessTokenProvided = 50025 ErrCodeMissingRequiredOAuth2Scope = 50026 ErrCodeInvalidWebhookTokenProvided = 50027 ErrCodeInvalidRole = 50028 ErrCodeInvalidRecipients = 50033 ErrCodeMessageProvidedTooOldForBulkDelete = 50034 ErrCodeInvalidFormBody = 50035 ErrCodeInviteAcceptedToGuildApplicationsBotNotIn = 50036 ErrCodeInvalidAPIVersionProvided = 50041 ErrCodeFileUploadedExceedsTheMaximumSize = 50045 ErrCodeInvalidFileUploaded = 50046 ErrCodeInvalidGuild = 50055 ErrCodeInvalidMessageType = 50068 ErrCodeCannotDeleteAChannelRequiredForCommunityGuilds = 50074 ErrCodeInvalidStickerSent = 50081 ErrCodePerformedOperationOnArchivedThread = 50083 ErrCodeBeforeValueIsEarlierThanThreadCreationDate = 50085 ErrCodeCommunityServerChannelsMustBeTextChannels = 50086 ErrCodeThisServerIsNotAvailableInYourLocation = 50095 ErrCodeThisServerNeedsMonetizationEnabledInOrderToPerformThisAction = 50097 ErrCodeThisServerNeedsMoreBoostsToPerformThisAction = 50101 ErrCodeTheRequestBodyContainsInvalidJSON = 50109 ErrCodeNoUsersWithDiscordTagExist = 80004 ErrCodeReactionBlocked = 90001 ErrCodeAPIResourceIsCurrentlyOverloaded = 130000 ErrCodeTheStageIsAlreadyOpen = 150006 ErrCodeCannotReplyWithoutPermissionToReadMessageHistory = 160002 ErrCodeThreadAlreadyCreatedForThisMessage = 160004 ErrCodeThreadIsLocked = 160005 ErrCodeMaximumNumberOfActiveThreadsReached = 160006 ErrCodeMaximumNumberOfActiveAnnouncementThreadsReached = 160007 ErrCodeInvalidJSONForUploadedLottieFile = 170001 ErrCodeUploadedLottiesCannotContainRasterizedImages = 170002 ErrCodeStickerMaximumFramerateExceeded = 170003 ErrCodeStickerFrameCountExceedsMaximumOfOneThousandFrames = 170004 ErrCodeLottieAnimationMaximumDimensionsExceeded = 170005 ErrCodeStickerFrameRateOutOfRange = 170006 ErrCodeStickerAnimationDurationExceedsMaximumOfFiveSeconds = 170007 ErrCodeCannotUpdateAFinishedEvent = 180000 ErrCodeFailedToCreateStageNeededForStageEvent = 180002 ErrCodeCannotEnableOnboardingRequirementsAreNotMet = 350000 ErrCodeCannotUpdateOnboardingWhileBelowRequirements = 350001 )
View Source
const FailedHeartbeatAcks time.Duration = 5 * time.Millisecond
View Source
const InteractionDeadline = time.Second * 3
View Source
const VERSION = "0.30.7"
Variables ¶
View Source
var ( EndpointStatus = "https://status.discord.com/api/v2/" EndpointSm = EndpointStatus + "scheduled-maintenances/" EndpointSmActive = EndpointSm + "active.json" EndpointSmUpcoming = EndpointSm + "upcoming.json" EndpointDiscord = "https://discord.com/" EndpointAPI = EndpointDiscord + "api/v" + APIVersion + "/" EndpointGuilds = EndpointAPI + "guilds/" EndpointChannels = EndpointAPI + "channels/" EndpointUsers = EndpointAPI + "users/" EndpointGateway = EndpointAPI + "gateway" EndpointGatewayBot = EndpointGateway + "/bot" EndpointWebhooks = EndpointAPI + "webhooks/" EndpointStickers = EndpointAPI + "stickers/" EndpointStageInstances = EndpointAPI + "stage-instances" EndpointSKUs = EndpointAPI + "skus" EndpointCDN = "https://cdn.discordapp.com/" EndpointCDNAttachments = EndpointCDN + "attachments/" EndpointCDNAvatars = EndpointCDN + "avatars/" EndpointCDNIcons = EndpointCDN + "icons/" EndpointCDNSplashes = EndpointCDN + "splashes/" EndpointCDNChannelIcons = EndpointCDN + "channel-icons/" EndpointCDNBanners = EndpointCDN + "banners/" EndpointCDNGuilds = EndpointCDN + "guilds/" EndpointCDNRoleIcons = EndpointCDN + "role-icons/" EndpointVoice = EndpointAPI + "/voice/" EndpointVoiceRegions = EndpointVoice + "regions" EndpointUser = func(uID string) string { return EndpointUsers + uID } EndpointUserAvatar = func(uID, aID string) string { return EndpointCDNAvatars + uID + "/" + aID + ".png" } EndpointUserAvatarAnimated = func(uID, aID string) string { return EndpointCDNAvatars + uID + "/" + aID + ".gif" } EndpointDefaultUserAvatar = func(idx int) string { return EndpointCDN + "embed/avatars/" + strconv.Itoa(idx) + ".png" } EndpointUserBanner = func(uID, cID string) string { return EndpointCDNBanners + uID + "/" + cID + ".png" } EndpointUserBannerAnimated = func(uID, cID string) string { return EndpointCDNBanners + uID + "/" + cID + ".gif" } EndpointUserGuilds = func(uID string) string { return EndpointUsers + uID + "/guilds" } EndpointUserGuild = func(uID, gID string) string { return EndpointUsers + uID + "/guilds/" + gID } EndpointUserGuildMember = func(uID, gID string) string { return EndpointUserGuild(uID, gID) + "/member" } EndpointUserChannels = func(uID string) string { return EndpointUsers + uID + "/channels" } EndpointUserApplicationRoleConnection = func(aID string) string { return EndpointUsers + "@me/applications/" + aID + "/role-connection" } EndpointUserConnections = func(uID string) string { return EndpointUsers + uID + "/connections" } EndpointGuild = func(gID string) string { return EndpointGuilds + gID } EndpointGuildAutoModeration = func(gID string) string { return EndpointGuild(gID) + "/auto-moderation" } EndpointGuildAutoModerationRules = func(gID string) string { return EndpointGuildAutoModeration(gID) + "/rules" } EndpointGuildAutoModerationRule = func(gID, rID string) string { return EndpointGuildAutoModerationRules(gID) + "/" + rID } EndpointGuildThreads = func(gID string) string { return EndpointGuild(gID) + "/threads" } EndpointGuildActiveThreads = func(gID string) string { return EndpointGuildThreads(gID) + "/active" } EndpointGuildPreview = func(gID string) string { return EndpointGuilds + gID + "/preview" } EndpointGuildChannels = func(gID string) string { return EndpointGuilds + gID + "/channels" } EndpointGuildMembers = func(gID string) string { return EndpointGuilds + gID + "/members" } EndpointGuildMembersSearch = func(gID string) string { return EndpointGuildMembers(gID) + "/search" } EndpointGuildMember = func(gID, uID string) string { return EndpointGuilds + gID + "/members/" + uID } EndpointGuildMemberRole = func(gID, uID, rID string) string { return EndpointGuilds + gID + "/members/" + uID + "/roles/" + rID } EndpointGuildBans = func(gID string) string { return EndpointGuilds + gID + "/bans" } EndpointGuildBan = func(gID, uID string) string { return EndpointGuilds + gID + "/bans/" + uID } EndpointGuildIntegrations = func(gID string) string { return EndpointGuilds + gID + "/integrations" } EndpointGuildIntegration = func(gID, iID string) string { return EndpointGuilds + gID + "/integrations/" + iID } EndpointGuildRoles = func(gID string) string { return EndpointGuilds + gID + "/roles" } EndpointGuildRole = func(gID, rID string) string { return EndpointGuilds + gID + "/roles/" + rID } EndpointGuildInvites = func(gID string) string { return EndpointGuilds + gID + "/invites" } EndpointGuildWidget = func(gID string) string { return EndpointGuilds + gID + "/widget" } EndpointGuildEmbed = EndpointGuildWidget EndpointGuildPrune = func(gID string) string { return EndpointGuilds + gID + "/prune" } EndpointGuildIcon = func(gID, hash string) string { return EndpointCDNIcons + gID + "/" + hash + ".png" } EndpointGuildIconAnimated = func(gID, hash string) string { return EndpointCDNIcons + gID + "/" + hash + ".gif" } EndpointGuildSplash = func(gID, hash string) string { return EndpointCDNSplashes + gID + "/" + hash + ".png" } EndpointGuildWebhooks = func(gID string) string { return EndpointGuilds + gID + "/webhooks" } EndpointGuildAuditLogs = func(gID string) string { return EndpointGuilds + gID + "/audit-logs" } EndpointGuildEmojis = func(gID string) string { return EndpointGuilds + gID + "/emojis" } EndpointGuildEmoji = func(gID, eID string) string { return EndpointGuilds + gID + "/emojis/" + eID } EndpointGuildBanner = func(gID, hash string) string { return EndpointCDNBanners + gID + "/" + hash + ".png" } EndpointGuildBannerAnimated = func(gID, hash string) string { return EndpointCDNBanners + gID + "/" + hash + ".gif" } EndpointGuildStickers = func(gID string) string { return EndpointGuilds + gID + "/stickers" } EndpointGuildSticker = func(gID, sID string) string { return EndpointGuilds + gID + "/stickers/" + sID } EndpointStageInstance = func(cID string) string { return EndpointStageInstances + "/" + cID } EndpointGuildScheduledEvents = func(gID string) string { return EndpointGuilds + gID + "/scheduled-events" } EndpointGuildScheduledEvent = func(gID, eID string) string { return EndpointGuilds + gID + "/scheduled-events/" + eID } EndpointGuildScheduledEventUsers = func(gID, eID string) string { return EndpointGuildScheduledEvent(gID, eID) + "/users" } EndpointGuildOnboarding = func(gID string) string { return EndpointGuilds + gID + "/onboarding" } EndpointGuildTemplate = func(tID string) string { return EndpointGuilds + "templates/" + tID } EndpointGuildTemplates = func(gID string) string { return EndpointGuilds + gID + "/templates" } EndpointGuildTemplateSync = func(gID, tID string) string { return EndpointGuilds + gID + "/templates/" + tID } EndpointGuildMemberAvatar = func(gId, uID, aID string) string { return EndpointCDNGuilds + gId + "/users/" + uID + "/avatars/" + aID + ".png" } EndpointGuildMemberAvatarAnimated = func(gId, uID, aID string) string { return EndpointCDNGuilds + gId + "/users/" + uID + "/avatars/" + aID + ".gif" } EndpointGuildMemberBanner = func(gId, uID, hash string) string { return EndpointCDNGuilds + gId + "/users/" + uID + "/banners/" + hash + ".png" } EndpointGuildMemberBannerAnimated = func(gId, uID, hash string) string { return EndpointCDNGuilds + gId + "/users/" + uID + "/banners/" + hash + ".gif" } EndpointRoleIcon = func(rID, hash string) string { return EndpointCDNRoleIcons + rID + "/" + hash + ".png" } EndpointChannel = func(cID string) string { return EndpointChannels + cID } EndpointChannelThreads = func(cID string) string { return EndpointChannel(cID) + "/threads" } EndpointChannelActiveThreads = func(cID string) string { return EndpointChannelThreads(cID) + "/active" } EndpointChannelPublicArchivedThreads = func(cID string) string { return EndpointChannelThreads(cID) + "/archived/public" } EndpointChannelPrivateArchivedThreads = func(cID string) string { return EndpointChannelThreads(cID) + "/archived/private" } EndpointChannelJoinedPrivateArchivedThreads = func(cID string) string { return EndpointChannel(cID) + "/users/@me/threads/archived/private" } EndpointChannelPermissions = func(cID string) string { return EndpointChannels + cID + "/permissions" } EndpointChannelPermission = func(cID, tID string) string { return EndpointChannels + cID + "/permissions/" + tID } EndpointChannelInvites = func(cID string) string { return EndpointChannels + cID + "/invites" } EndpointChannelTyping = func(cID string) string { return EndpointChannels + cID + "/typing" } EndpointChannelMessages = func(cID string) string { return EndpointChannels + cID + "/messages" } EndpointChannelMessage = func(cID, mID string) string { return EndpointChannels + cID + "/messages/" + mID } EndpointChannelMessageThread = func(cID, mID string) string { return EndpointChannelMessage(cID, mID) + "/threads" } EndpointChannelMessagesBulkDelete = func(cID string) string { return EndpointChannel(cID) + "/messages/bulk-delete" } EndpointChannelMessagesPins = func(cID string) string { return EndpointChannel(cID) + "/pins" } EndpointChannelMessagePin = func(cID, mID string) string { return EndpointChannel(cID) + "/pins/" + mID } EndpointChannelMessageCrosspost = func(cID, mID string) string { return EndpointChannel(cID) + "/messages/" + mID + "/crosspost" } EndpointChannelFollow = func(cID string) string { return EndpointChannel(cID) + "/followers" } EndpointThreadMembers = func(tID string) string { return EndpointChannel(tID) + "/thread-members" } EndpointThreadMember = func(tID, mID string) string { return EndpointThreadMembers(tID) + "/" + mID } EndpointGroupIcon = func(cID, hash string) string { return EndpointCDNChannelIcons + cID + "/" + hash + ".png" } EndpointSticker = func(sID string) string { return EndpointStickers + sID } EndpointNitroStickersPacks = EndpointAPI + "/sticker-packs" EndpointChannelWebhooks = func(cID string) string { return EndpointChannel(cID) + "/webhooks" } EndpointWebhook = func(wID string) string { return EndpointWebhooks + wID } EndpointWebhookToken = func(wID, token string) string { return EndpointWebhooks + wID + "/" + token } EndpointWebhookMessage = func(wID, token, messageID string) string { return EndpointWebhookToken(wID, token) + "/messages/" + messageID } EndpointMessageReactionsAll = func(cID, mID string) string { return EndpointChannelMessage(cID, mID) + "/reactions" } EndpointMessageReactions = func(cID, mID, eID string) string { return EndpointChannelMessage(cID, mID) + "/reactions/" + eID } EndpointMessageReaction = func(cID, mID, eID, uID string) string { return EndpointMessageReactions(cID, mID, eID) + "/" + uID } EndpointPoll = func(cID, mID string) string { return EndpointChannel(cID) + "/polls/" + mID } EndpointPollAnswerVoters = func(cID, mID string, aID int) string { return EndpointPoll(cID, mID) + "/answers/" + strconv.Itoa(aID) } EndpointPollExpire = func(cID, mID string) string { return EndpointPoll(cID, mID) + "/expire" } EndpointApplicationSKUs = func(aID string) string { return EndpointApplication(aID) + "/skus" } EndpointEntitlements = func(aID string) string { return EndpointApplication(aID) + "/entitlements" } EndpointEntitlement = func(aID, eID string) string { return EndpointEntitlements(aID) + "/" + eID } EndpointEntitlementConsume = func(aID, eID string) string { return EndpointEntitlement(aID, eID) + "/consume" } EndpointSubscriptions = func(skuID string) string { return EndpointSKUs + "/" + skuID + "/subscriptions" } EndpointSubscription = func(skuID, subID string) string { return EndpointSubscriptions(skuID) + "/" + subID } EndpointApplicationGlobalCommands = func(aID string) string { return EndpointApplication(aID) + "/commands" } EndpointApplicationGlobalCommand = func(aID, cID string) string { return EndpointApplicationGlobalCommands(aID) + "/" + cID } EndpointApplicationGuildCommands = func(aID, gID string) string { return EndpointApplication(aID) + "/guilds/" + gID + "/commands" } EndpointApplicationGuildCommand = func(aID, gID, cID string) string { return EndpointApplicationGuildCommands(aID, gID) + "/" + cID } EndpointApplicationCommandPermissions = func(aID, gID, cID string) string { return EndpointApplicationGuildCommand(aID, gID, cID) + "/permissions" } EndpointApplicationCommandsGuildPermissions = func(aID, gID string) string { return EndpointApplicationGuildCommands(aID, gID) + "/permissions" } EndpointInteraction = func(aID, iToken string) string { return EndpointAPI + "interactions/" + aID + "/" + iToken } EndpointInteractionResponse = func(iID, iToken string) string { return EndpointInteraction(iID, iToken) + "/callback" } EndpointInteractionResponseActions = func(aID, iToken string) string { return EndpointWebhookMessage(aID, iToken, "@original") } EndpointFollowupMessage = func(aID, iToken string) string { return EndpointWebhookToken(aID, iToken) } EndpointFollowupMessageActions = func(aID, iToken, mID string) string { return EndpointWebhookMessage(aID, iToken, mID) } EndpointGuildCreate = EndpointAPI + "guilds" EndpointInvite = func(iID string) string { return EndpointAPI + "invites/" + iID } EndpointEmoji = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".png" } EndpointEmojiAnimated = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".gif" } EndpointApplications = EndpointAPI + "applications" EndpointApplication = func(aID string) string { return EndpointApplications + "/" + aID } EndpointApplicationRoleConnectionMetadata = func(aID string) string { return EndpointApplication(aID) + "/role-connections/metadata" } EndpointApplicationEmojis = func(aID string) string { return EndpointApplication(aID) + "/emojis" } EndpointApplicationEmoji = func(aID, eID string) string { return EndpointApplication(aID) + "/emojis/" + eID } EndpointOAuth2 = EndpointAPI + "oauth2/" EndpointOAuth2Applications = EndpointOAuth2 + "applications" EndpointOAuth2Application = func(aID string) string { return EndpointOAuth2Applications + "/" + aID } EndpointOAuth2ApplicationsBot = func(aID string) string { return EndpointOAuth2Applications + "/" + aID + "/bot" } EndpointOAuth2ApplicationAssets = func(aID string) string { return EndpointOAuth2Applications + "/" + aID + "/assets" } EndpointOauth2 = EndpointOAuth2 EndpointOauth2Applications = EndpointOAuth2Applications EndpointOauth2Application = EndpointOAuth2Application EndpointOauth2ApplicationsBot = EndpointOAuth2ApplicationsBot EndpointOauth2ApplicationAssets = EndpointOAuth2ApplicationAssets )
View Source
var ( ErrWSAlreadyOpen = errors.New("websocket connection is already open, cannot open a new connection while the current one is active") ErrWSNotFound = errors.New("no active websocket connection found, please establish a connection before attempting this action") ErrWSShardBounds = errors.New("invalid ShardID or ShardCount: ShardID must be less than ShardCount") ErrNilState = errors.New("state not found, please ensure that the session is properly initialized using discordgo.New() or manually assign Session.State") ErrStateNotFound = errors.New("state cache not found, the session might not be initialized correctly or might have expired") ErrMessageIncompletePermissions = errors.New("message incomplete: unable to determine permissions for this action due to missing information") ErrJSONUnmarshal = errors.New("failed to unmarshal JSON, the provided data may not match the expected structure") ErrStatusOffline = errors.New("cannot set status to offline: the system does not support setting an offline status") ErrVerificationLevelBounds = errors.New("invalid verification level: it must be a value between 0 and 3 (inclusive)") ErrPruneDaysBounds = errors.New("invalid prune days value: it must be at least 1 day") ErrGuildNoIcon = errors.New("guild does not have an icon set, ensure the guild has an icon before proceeding") ErrGuildNoSplash = errors.New("guild does not have a splash image set, ensure the guild has a splash image before proceeding") )
View Source
var ( Marshal func(v interface{}) ([]byte, error) = json.Marshal Unmarshal func(src []byte, v interface{}) error = json.Unmarshal )
View Source
var APIVersion = "9"
View Source
var EmojiRegex = regexp.MustCompile(`<(a|):[A-Za-z0-9_~]+:[0-9]{18,20}>`)
View Source
var Locales = map[Locale]string{ EnglishUS: "English (United States)", EnglishGB: "English (Great Britain)", Bulgarian: "Bulgarian", ChineseCN: "Chinese (China)", ChineseTW: "Chinese (Taiwan)", Croatian: "Croatian", Czech: "Czech", Danish: "Danish", Dutch: "Dutch", Finnish: "Finnish", French: "French", German: "German", Greek: "Greek", Hindi: "Hindi", Hungarian: "Hungarian", Italian: "Italian", Japanese: "Japanese", Korean: "Korean", Lithuanian: "Lithuanian", Norwegian: "Norwegian", Polish: "Polish", PortugueseBR: "Portuguese (Brazil)", Romanian: "Romanian", Russian: "Russian", SpanishES: "Spanish (Spain)", SpanishLATAM: "Spanish (LATAM)", Swedish: "Swedish", Thai: "Thai", Turkish: "Turkish", Ukrainian: "Ukrainian", Vietnamese: "Vietnamese", Unknown: "unknown", }
View Source
var Logger func(msgL, caller int, format string, a ...interface{})
Functions ¶
func GuildAllChannelsID ¶
func MultipartBodyWithJSON ¶
Types ¶
type APIErrorMessage ¶
type ActionsRow ¶
type ActionsRow struct {
Components []MessageComponent `json:"components"`
}
func (ActionsRow) MarshalJSON ¶
func (r ActionsRow) MarshalJSON() ([]byte, error)
func (ActionsRow) Type ¶
func (r ActionsRow) Type() ComponentType
func (*ActionsRow) UnmarshalJSON ¶
func (r *ActionsRow) UnmarshalJSON(data []byte) error
type Activity ¶
type Activity struct {
Name string `json:"name"`
Type ActivityType `json:"type"`
URL string `json:"url,omitempty"`
CreatedAt time.Time `json:"created_at"`
ApplicationID string `json:"application_id,omitempty"`
State string `json:"state,omitempty"`
Details string `json:"details,omitempty"`
Timestamps TimeStamps `json:"timestamps,omitempty"`
Emoji Emoji `json:"emoji,omitempty"`
Party Party `json:"party,omitempty"`
Assets Assets `json:"assets,omitempty"`
Secrets Secrets `json:"secrets,omitempty"`
Instance bool `json:"instance,omitempty"`
Flags int `json:"flags,omitempty"`
SyncID string `json:"sync_id,omitempty"`
}
func (*Activity) UnmarshalJSON ¶
type ActivityType ¶
type ActivityType int
const ( ActivityTypeGame ActivityType = 0 ActivityTypeStreaming ActivityType = 1 ActivityTypeListening ActivityType = 2 ActivityTypeWatching ActivityType = 3 ActivityTypeCustom ActivityType = 4 ActivityTypeCompeting ActivityType = 5 )
type AddedThreadMember ¶
type AddedThreadMember struct {
*ThreadMember
Member *Member `json:"member"`
Presence *Presence `json:"presence"`
}
type AllowedMentionType ¶
type AllowedMentionType string
const ( AllowedMentionTypeRoles AllowedMentionType = "roles" AllowedMentionTypeUsers AllowedMentionType = "users" AllowedMentionTypeEveryone AllowedMentionType = "everyone" )
type Application ¶
type Application struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Icon string `json:"icon,omitempty"`
Description string `json:"description,omitempty"`
RPCOrigins []string `json:"rpc_origins,omitempty"`
BotPublic bool `json:"bot_public,omitempty"`
BotRequireCodeGrant bool `json:"bot_require_code_grant,omitempty"`
TermsOfServiceURL string `json:"terms_of_service_url"`
PrivacyProxyURL string `json:"privacy_policy_url"`
Owner *User `json:"owner"`
Summary string `json:"summary"`
VerifyKey string `json:"verify_key"`
Team *Team `json:"team"`
GuildID string `json:"guild_id"`
PrimarySKUID string `json:"primary_sku_id"`
Slug string `json:"slug"`
CoverImage string `json:"cover_image"`
Flags int `json:"flags,omitempty"`
IntegrationTypesConfig map[ApplicationIntegrationType]*ApplicationIntegrationTypeConfig `json:"integration_types,omitempty"`
}
type ApplicationCommand ¶
type ApplicationCommand struct {
ID string `json:"id,omitempty"`
ApplicationID string `json:"application_id,omitempty"`
GuildID string `json:"guild_id,omitempty"`
Version string `json:"version,omitempty"`
Type ApplicationCommandType `json:"type,omitempty"`
Name string `json:"name"`
NameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
DefaultPermission *bool `json:"default_permission,omitempty"`
DefaultMemberPermissions *int64 `json:"default_member_permissions,string,omitempty"`
NSFW *bool `json:"nsfw,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
Contexts *[]InteractionContextType `json:"contexts,omitempty"`
IntegrationTypes *[]ApplicationIntegrationType `json:"integration_types,omitempty"`
Description string `json:"description,omitempty"`
DescriptionLocalizations *map[Locale]string `json:"description_localizations,omitempty"`
Options []*ApplicationCommandOption `json:"options"`
}
type ApplicationCommandInteractionData ¶
type ApplicationCommandInteractionData struct {
ID string `json:"id"`
Name string `json:"name"`
CommandType ApplicationCommandType `json:"type"`
Resolved *ApplicationCommandInteractionDataResolved `json:"resolved"`
Options []*ApplicationCommandInteractionDataOption `json:"options"`
TargetID string `json:"target_id"`
}
func (ApplicationCommandInteractionData) GetOption ¶
func (d ApplicationCommandInteractionData) GetOption(name string) (option *ApplicationCommandInteractionDataOption)
func (ApplicationCommandInteractionData) Type ¶
func (ApplicationCommandInteractionData) Type() InteractionType
type ApplicationCommandInteractionDataOption ¶
type ApplicationCommandInteractionDataOption struct {
Name string `json:"name"`
Type ApplicationCommandOptionType `json:"type"`
Value interface{} `json:"value,omitempty"`
Options []*ApplicationCommandInteractionDataOption `json:"options,omitempty"`
Focused bool `json:"focused,omitempty"`
}
func (ApplicationCommandInteractionDataOption) BoolValue ¶
func (o ApplicationCommandInteractionDataOption) BoolValue() bool
func (ApplicationCommandInteractionDataOption) ChannelValue ¶
func (o ApplicationCommandInteractionDataOption) ChannelValue(s *Session) *Channel
func (ApplicationCommandInteractionDataOption) FloatValue ¶
func (o ApplicationCommandInteractionDataOption) FloatValue() float64
func (ApplicationCommandInteractionDataOption) GetOption ¶
func (o ApplicationCommandInteractionDataOption) GetOption(name string) (option *ApplicationCommandInteractionDataOption)
func (ApplicationCommandInteractionDataOption) IntValue ¶
func (o ApplicationCommandInteractionDataOption) IntValue() int64
func (ApplicationCommandInteractionDataOption) RoleValue ¶
func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID string) *Role
func (ApplicationCommandInteractionDataOption) StringValue ¶
func (o ApplicationCommandInteractionDataOption) StringValue() string
func (ApplicationCommandInteractionDataOption) UintValue ¶
func (o ApplicationCommandInteractionDataOption) UintValue() uint64
func (ApplicationCommandInteractionDataOption) UserValue ¶
func (o ApplicationCommandInteractionDataOption) UserValue(s *Session) *User
type ApplicationCommandInteractionDataResolved ¶
type ApplicationCommandInteractionDataResolved struct {
Users map[string]*User `json:"users"`
Members map[string]*Member `json:"members"`
Roles map[string]*Role `json:"roles"`
Channels map[string]*Channel `json:"channels"`
Messages map[string]*Message `json:"messages"`
Attachments map[string]*MessageAttachment `json:"attachments"`
}
type ApplicationCommandOption ¶
type ApplicationCommandOption struct {
Type ApplicationCommandOptionType `json:"type"`
Name string `json:"name"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
Description string `json:"description,omitempty"`
DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"`
ChannelTypes []ChannelType `json:"channel_types"`
Required bool `json:"required"`
Options []*ApplicationCommandOption `json:"options"`
Autocomplete bool `json:"autocomplete"`
Choices []*ApplicationCommandOptionChoice `json:"choices"`
MinValue *float64 `json:"min_value,omitempty"`
MaxValue float64 `json:"max_value,omitempty"`
MinLength *int `json:"min_length,omitempty"`
MaxLength int `json:"max_length,omitempty"`
}
type ApplicationCommandOptionType ¶
type ApplicationCommandOptionType uint8
const ( ApplicationCommandOptionSubCommand ApplicationCommandOptionType = 1 ApplicationCommandOptionSubCommandGroup ApplicationCommandOptionType = 2 ApplicationCommandOptionString ApplicationCommandOptionType = 3 ApplicationCommandOptionInteger ApplicationCommandOptionType = 4 ApplicationCommandOptionBoolean ApplicationCommandOptionType = 5 ApplicationCommandOptionUser ApplicationCommandOptionType = 6 ApplicationCommandOptionChannel ApplicationCommandOptionType = 7 ApplicationCommandOptionRole ApplicationCommandOptionType = 8 ApplicationCommandOptionMentionable ApplicationCommandOptionType = 9 ApplicationCommandOptionNumber ApplicationCommandOptionType = 10 ApplicationCommandOptionAttachment ApplicationCommandOptionType = 11 )
func (ApplicationCommandOptionType) String ¶
func (t ApplicationCommandOptionType) String() string
type ApplicationCommandPermissionType ¶
type ApplicationCommandPermissionType uint8
const ( ApplicationCommandPermissionTypeRole ApplicationCommandPermissionType = 1 ApplicationCommandPermissionTypeUser ApplicationCommandPermissionType = 2 ApplicationCommandPermissionTypeChannel ApplicationCommandPermissionType = 3 )
type ApplicationCommandPermissions ¶
type ApplicationCommandPermissions struct {
ID string `json:"id"`
Type ApplicationCommandPermissionType `json:"type"`
Permission bool `json:"permission"`
}
type ApplicationCommandPermissionsList ¶
type ApplicationCommandPermissionsList struct {
Permissions []*ApplicationCommandPermissions `json:"permissions"`
}
type ApplicationCommandPermissionsUpdate ¶
type ApplicationCommandPermissionsUpdate struct {
*GuildApplicationCommandPermissions
}
type ApplicationCommandType ¶
type ApplicationCommandType uint8
const ( ChatApplicationCommand ApplicationCommandType = 1 UserApplicationCommand ApplicationCommandType = 2 MessageApplicationCommand ApplicationCommandType = 3 )
type ApplicationIntegrationType ¶
type ApplicationIntegrationType uint
const ( ApplicationIntegrationGuildInstall ApplicationIntegrationType = 0 ApplicationIntegrationUserInstall ApplicationIntegrationType = 1 )
type ApplicationIntegrationTypeConfig ¶
type ApplicationIntegrationTypeConfig struct {
OAuth2InstallParams *ApplicationInstallParams `json:"oauth2_install_params,omitempty"`
}
type ApplicationRoleConnectionMetadata ¶
type ApplicationRoleConnectionMetadata struct {
Type ApplicationRoleConnectionMetadataType `json:"type"`
Key string `json:"key"`
Name string `json:"name"`
NameLocalizations map[Locale]string `json:"name_localizations"`
Description string `json:"description"`
DescriptionLocalizations map[Locale]string `json:"description_localizations"`
}
type ApplicationRoleConnectionMetadataType ¶
type ApplicationRoleConnectionMetadataType int
const ( ApplicationRoleConnectionMetadataIntegerLessThanOrEqual ApplicationRoleConnectionMetadataType = 1 ApplicationRoleConnectionMetadataIntegerGreaterThanOrEqual ApplicationRoleConnectionMetadataType = 2 ApplicationRoleConnectionMetadataIntegerEqual ApplicationRoleConnectionMetadataType = 3 ApplicationRoleConnectionMetadataIntegerNotEqual ApplicationRoleConnectionMetadataType = 4 ApplicationRoleConnectionMetadataDatetimeLessThanOrEqual ApplicationRoleConnectionMetadataType = 5 ApplicationRoleConnectionMetadataDatetimeGreaterThanOrEqual ApplicationRoleConnectionMetadataType = 6 ApplicationRoleConnectionMetadataBooleanEqual ApplicationRoleConnectionMetadataType = 7 ApplicationRoleConnectionMetadataBooleanNotEqual ApplicationRoleConnectionMetadataType = 8 )
type AuditLogAction ¶
type AuditLogAction int
const ( AuditLogActionGuildUpdate AuditLogAction = 1 AuditLogActionChannelCreate AuditLogAction = 10 AuditLogActionChannelUpdate AuditLogAction = 11 AuditLogActionChannelDelete AuditLogAction = 12 AuditLogActionChannelOverwriteCreate AuditLogAction = 13 AuditLogActionChannelOverwriteUpdate AuditLogAction = 14 AuditLogActionChannelOverwriteDelete AuditLogAction = 15 AuditLogActionMemberKick AuditLogAction = 20 AuditLogActionMemberPrune AuditLogAction = 21 AuditLogActionMemberBanAdd AuditLogAction = 22 AuditLogActionMemberBanRemove AuditLogAction = 23 AuditLogActionMemberUpdate AuditLogAction = 24 AuditLogActionMemberRoleUpdate AuditLogAction = 25 AuditLogActionMemberMove AuditLogAction = 26 AuditLogActionMemberDisconnect AuditLogAction = 27 AuditLogActionBotAdd AuditLogAction = 28 AuditLogActionRoleCreate AuditLogAction = 30 AuditLogActionRoleUpdate AuditLogAction = 31 AuditLogActionRoleDelete AuditLogAction = 32 AuditLogActionInviteCreate AuditLogAction = 40 AuditLogActionInviteUpdate AuditLogAction = 41 AuditLogActionInviteDelete AuditLogAction = 42 AuditLogActionWebhookCreate AuditLogAction = 50 AuditLogActionWebhookUpdate AuditLogAction = 51 AuditLogActionWebhookDelete AuditLogAction = 52 AuditLogActionEmojiCreate AuditLogAction = 60 AuditLogActionEmojiUpdate AuditLogAction = 61 AuditLogActionEmojiDelete AuditLogAction = 62 AuditLogActionMessageDelete AuditLogAction = 72 AuditLogActionMessageBulkDelete AuditLogAction = 73 AuditLogActionMessagePin AuditLogAction = 74 AuditLogActionMessageUnpin AuditLogAction = 75 AuditLogActionIntegrationCreate AuditLogAction = 80 AuditLogActionIntegrationUpdate AuditLogAction = 81 AuditLogActionIntegrationDelete AuditLogAction = 82 AuditLogActionStageInstanceCreate AuditLogAction = 83 AuditLogActionStageInstanceUpdate AuditLogAction = 84 AuditLogActionStageInstanceDelete AuditLogAction = 85 AuditLogActionStickerCreate AuditLogAction = 90 AuditLogActionStickerUpdate AuditLogAction = 91 AuditLogActionStickerDelete AuditLogAction = 92 AuditLogGuildScheduledEventCreate AuditLogAction = 100 AuditLogGuildScheduledEventUpdate AuditLogAction = 101 AuditLogGuildScheduledEventDelete AuditLogAction = 102 AuditLogActionThreadCreate AuditLogAction = 110 AuditLogActionThreadUpdate AuditLogAction = 111 AuditLogActionThreadDelete AuditLogAction = 112 AuditLogActionApplicationCommandPermissionUpdate AuditLogAction = 121 AuditLogActionAutoModerationRuleCreate AuditLogAction = 140 AuditLogActionAutoModerationRuleUpdate AuditLogAction = 141 AuditLogActionAutoModerationRuleDelete AuditLogAction = 142 AuditLogActionAutoModerationBlockMessage AuditLogAction = 143 AuditLogActionAutoModerationFlagToChannel AuditLogAction = 144 AuditLogActionAutoModerationUserCommunicationDisabled AuditLogAction = 145 AuditLogActionCreatorMonetizationRequestCreated AuditLogAction = 150 AuditLogActionCreatorMonetizationTermsAccepted AuditLogAction = 151 AuditLogActionOnboardingPromptCreate AuditLogAction = 163 AuditLogActionOnboardingPromptUpdate AuditLogAction = 164 AuditLogActionOnboardingPromptDelete AuditLogAction = 165 AuditLogActionOnboardingCreate AuditLogAction = 166 AuditLogActionOnboardingUpdate AuditLogAction = 167 AuditLogActionHomeSettingsCreate = 190 AuditLogActionHomeSettingsUpdate = 191 )
type AuditLogChange ¶
type AuditLogChange struct {
NewValue interface{} `json:"new_value"`
OldValue interface{} `json:"old_value"`
Key *AuditLogChangeKey `json:"key"`
}
type AuditLogChangeKey ¶
type AuditLogChangeKey string
const ( AuditLogChangeKeyAfkChannelID AuditLogChangeKey = "afk_channel_id" AuditLogChangeKeyAfkTimeout AuditLogChangeKey = "afk_timeout" AuditLogChangeKeyAllow AuditLogChangeKey = "allow" AuditLogChangeKeyApplicationID AuditLogChangeKey = "application_id" AuditLogChangeKeyArchived AuditLogChangeKey = "archived" AuditLogChangeKeyAsset AuditLogChangeKey = "asset" AuditLogChangeKeyAutoArchiveDuration AuditLogChangeKey = "auto_archive_duration" AuditLogChangeKeyAvailable AuditLogChangeKey = "available" AuditLogChangeKeyAvatarHash AuditLogChangeKey = "avatar_hash" AuditLogChangeKeyBannerHash AuditLogChangeKey = "banner_hash" AuditLogChangeKeyBitrate AuditLogChangeKey = "bitrate" AuditLogChangeKeyChannelID AuditLogChangeKey = "channel_id" AuditLogChangeKeyCode AuditLogChangeKey = "code" AuditLogChangeKeyColor AuditLogChangeKey = "color" AuditLogChangeKeyCommunicationDisabledUntil AuditLogChangeKey = "communication_disabled_until" AuditLogChangeKeyDeaf AuditLogChangeKey = "deaf" AuditLogChangeKeyDefaultAutoArchiveDuration AuditLogChangeKey = "default_auto_archive_duration" AuditLogChangeKeyDefaultMessageNotification AuditLogChangeKey = "default_message_notifications" AuditLogChangeKeyDeny AuditLogChangeKey = "deny" AuditLogChangeKeyDescription AuditLogChangeKey = "description" AuditLogChangeKeyDiscoverySplashHash AuditLogChangeKey = "discovery_splash_hash" AuditLogChangeKeyEnableEmoticons AuditLogChangeKey = "enable_emoticons" AuditLogChangeKeyEntityType AuditLogChangeKey = "entity_type" AuditLogChangeKeyExpireBehavior AuditLogChangeKey = "expire_behavior" AuditLogChangeKeyExpireGracePeriod AuditLogChangeKey = "expire_grace_period" AuditLogChangeKeyExplicitContentFilter AuditLogChangeKey = "explicit_content_filter" AuditLogChangeKeyFormatType AuditLogChangeKey = "format_type" AuditLogChangeKeyGuildID AuditLogChangeKey = "guild_id" AuditLogChangeKeyHoist AuditLogChangeKey = "hoist" AuditLogChangeKeyIconHash AuditLogChangeKey = "icon_hash" AuditLogChangeKeyID AuditLogChangeKey = "id" AuditLogChangeKeyInvitable AuditLogChangeKey = "invitable" AuditLogChangeKeyInviterID AuditLogChangeKey = "inviter_id" AuditLogChangeKeyLocation AuditLogChangeKey = "location" AuditLogChangeKeyLocked AuditLogChangeKey = "locked" AuditLogChangeKeyMaxAge AuditLogChangeKey = "max_age" AuditLogChangeKeyMaxUses AuditLogChangeKey = "max_uses" AuditLogChangeKeyMentionable AuditLogChangeKey = "mentionable" AuditLogChangeKeyMfaLevel AuditLogChangeKey = "mfa_level" AuditLogChangeKeyMute AuditLogChangeKey = "mute" AuditLogChangeKeyName AuditLogChangeKey = "name" AuditLogChangeKeyNick AuditLogChangeKey = "nick" AuditLogChangeKeyNSFW AuditLogChangeKey = "nsfw" AuditLogChangeKeyOwnerID AuditLogChangeKey = "owner_id" AuditLogChangeKeyPermissionOverwrite AuditLogChangeKey = "permission_overwrites" AuditLogChangeKeyPermissions AuditLogChangeKey = "permissions" AuditLogChangeKeyPosition AuditLogChangeKey = "position" AuditLogChangeKeyPreferredLocale AuditLogChangeKey = "preferred_locale" AuditLogChangeKeyPrivacylevel AuditLogChangeKey = "privacy_level" AuditLogChangeKeyPruneDeleteDays AuditLogChangeKey = "prune_delete_days" AuditLogChangeKeyPublicUpdatesChannelID AuditLogChangeKey = "public_updates_channel_id" AuditLogChangeKeyRateLimitPerUser AuditLogChangeKey = "rate_limit_per_user" AuditLogChangeKeyRegion AuditLogChangeKey = "region" AuditLogChangeKeyRulesChannelID AuditLogChangeKey = "rules_channel_id" AuditLogChangeKeySplashHash AuditLogChangeKey = "splash_hash" AuditLogChangeKeyStatus AuditLogChangeKey = "status" AuditLogChangeKeySystemChannelID AuditLogChangeKey = "system_channel_id" AuditLogChangeKeyTags AuditLogChangeKey = "tags" AuditLogChangeKeyTemporary AuditLogChangeKey = "temporary" AuditLogChangeKeyTempoary = AuditLogChangeKeyTemporary AuditLogChangeKeyTopic AuditLogChangeKey = "topic" AuditLogChangeKeyType AuditLogChangeKey = "type" AuditLogChangeKeyUnicodeEmoji AuditLogChangeKey = "unicode_emoji" AuditLogChangeKeyUserLimit AuditLogChangeKey = "user_limit" AuditLogChangeKeyUses AuditLogChangeKey = "uses" AuditLogChangeKeyVanityURLCode AuditLogChangeKey = "vanity_url_code" AuditLogChangeKeyVerificationLevel AuditLogChangeKey = "verification_level" AuditLogChangeKeyWidgetChannelID AuditLogChangeKey = "widget_channel_id" AuditLogChangeKeyWidgetEnabled AuditLogChangeKey = "widget_enabled" AuditLogChangeKeyRoleAdd AuditLogChangeKey = "$add" AuditLogChangeKeyRoleRemove AuditLogChangeKey = "$remove" )
type AuditLogEntry ¶
type AuditLogEntry struct {
TargetID string `json:"target_id"`
Changes []*AuditLogChange `json:"changes"`
UserID string `json:"user_id"`
ID string `json:"id"`
ActionType *AuditLogAction `json:"action_type"`
Options *AuditLogOptions `json:"options"`
Reason string `json:"reason"`
}
type AuditLogOptions ¶
type AuditLogOptions struct {
DeleteMemberDays string `json:"delete_member_days"`
MembersRemoved string `json:"members_removed"`
ChannelID string `json:"channel_id"`
MessageID string `json:"message_id"`
Count string `json:"count"`
ID string `json:"id"`
Type *AuditLogOptionsType `json:"type"`
RoleName string `json:"role_name"`
ApplicationID string `json:"application_id"`
AutoModerationRuleName string `json:"auto_moderation_rule_name"`
AutoModerationRuleTriggerType string `json:"auto_moderation_rule_trigger_type"`
IntegrationType string `json:"integration_type"`
}
type AuditLogOptionsType ¶
type AuditLogOptionsType string
const ( AuditLogOptionsTypeRole AuditLogOptionsType = "0" AuditLogOptionsTypeMember AuditLogOptionsType = "1" )
type AutoModerationAction ¶
type AutoModerationAction struct {
Type AutoModerationActionType `json:"type"`
Metadata *AutoModerationActionMetadata `json:"metadata,omitempty"`
}
type AutoModerationActionExecution ¶
type AutoModerationActionExecution struct {
GuildID string `json:"guild_id"`
Action AutoModerationAction `json:"action"`
RuleID string `json:"rule_id"`
RuleTriggerType AutoModerationRuleTriggerType `json:"rule_trigger_type"`
UserID string `json:"user_id"`
ChannelID string `json:"channel_id"`
MessageID string `json:"message_id"`
AlertSystemMessageID string `json:"alert_system_message_id"`
Content string `json:"content"`
MatchedKeyword string `json:"matched_keyword"`
MatchedContent string `json:"matched_content"`
}
type AutoModerationActionType ¶
type AutoModerationActionType int
const ( AutoModerationRuleActionBlockMessage AutoModerationActionType = 1 AutoModerationRuleActionSendAlertMessage AutoModerationActionType = 2 AutoModerationRuleActionTimeout AutoModerationActionType = 3 )
type AutoModerationKeywordPreset ¶
type AutoModerationKeywordPreset uint
const ( AutoModerationKeywordPresetProfanity AutoModerationKeywordPreset = 1 AutoModerationKeywordPresetSexualContent AutoModerationKeywordPreset = 2 AutoModerationKeywordPresetSlurs AutoModerationKeywordPreset = 3 )
type AutoModerationRule ¶
type AutoModerationRule struct {
ID string `json:"id,omitempty"`
GuildID string `json:"guild_id,omitempty"`
Name string `json:"name,omitempty"`
CreatorID string `json:"creator_id,omitempty"`
EventType AutoModerationRuleEventType `json:"event_type,omitempty"`
TriggerType AutoModerationRuleTriggerType `json:"trigger_type,omitempty"`
TriggerMetadata *AutoModerationTriggerMetadata `json:"trigger_metadata,omitempty"`
Actions []AutoModerationAction `json:"actions,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
ExemptRoles *[]string `json:"exempt_roles,omitempty"`
ExemptChannels *[]string `json:"exempt_channels,omitempty"`
}
type AutoModerationRuleCreate ¶
type AutoModerationRuleCreate struct {
*AutoModerationRule
}
type AutoModerationRuleDelete ¶
type AutoModerationRuleDelete struct {
*AutoModerationRule
}
type AutoModerationRuleEventType ¶
type AutoModerationRuleEventType int
const (
AutoModerationEventMessageSend AutoModerationRuleEventType = 1
)
type AutoModerationRuleTriggerType ¶
type AutoModerationRuleTriggerType int
const ( AutoModerationEventTriggerKeyword AutoModerationRuleTriggerType = 1 AutoModerationEventTriggerHarmfulLink AutoModerationRuleTriggerType = 2 AutoModerationEventTriggerSpam AutoModerationRuleTriggerType = 3 AutoModerationEventTriggerKeywordPreset AutoModerationRuleTriggerType = 4 )
type AutoModerationRuleUpdate ¶
type AutoModerationRuleUpdate struct {
*AutoModerationRule
}
type AutoModerationTriggerMetadata ¶
type AutoModerationTriggerMetadata struct {
KeywordFilter []string `json:"keyword_filter,omitempty"`
RegexPatterns []string `json:"regex_patterns,omitempty"`
Presets []AutoModerationKeywordPreset `json:"presets,omitempty"`
AllowList *[]string `json:"allow_list,omitempty"`
MentionTotalLimit int `json:"mention_total_limit,omitempty"`
}
type Bucket ¶
type Button ¶
type Button struct {
Label string `json:"label"`
Style ButtonStyle `json:"style"`
Disabled bool `json:"disabled"`
Emoji *ComponentEmoji `json:"emoji,omitempty"`
URL string `json:"url,omitempty"`
CustomID string `json:"custom_id,omitempty"`
SKUID string `json:"sku_id,omitempty"`
}
func (Button) MarshalJSON ¶
func (Button) Type ¶
func (Button) Type() ComponentType
type ButtonStyle ¶
type ButtonStyle uint
const ( PrimaryButton ButtonStyle = 1 SecondaryButton ButtonStyle = 2 SuccessButton ButtonStyle = 3 DangerButton ButtonStyle = 4 LinkButton ButtonStyle = 5 PremiumButton ButtonStyle = 6 )
type Channel ¶
type Channel struct {
ID string `json:"id"`
GuildID string `json:"guild_id"`
Name string `json:"name"`
Topic string `json:"topic"`
Type ChannelType `json:"type"`
LastMessageID string `json:"last_message_id"`
LastPinTimestamp *time.Time `json:"last_pin_timestamp"`
MessageCount int `json:"message_count"`
MemberCount int `json:"member_count"`
NSFW bool `json:"nsfw"`
Icon string `json:"icon"`
Position int `json:"position"`
Bitrate int `json:"bitrate"`
Recipients []*User `json:"recipients"`
Messages []*Message `json:"-"`
PermissionOverwrites []*PermissionOverwrite `json:"permission_overwrites"`
UserLimit int `json:"user_limit"`
ParentID string `json:"parent_id"`
RateLimitPerUser int `json:"rate_limit_per_user"`
OwnerID string `json:"owner_id"`
ApplicationID string `json:"application_id"`
ThreadMetadata *ThreadMetadata `json:"thread_metadata,omitempty"`
Member *ThreadMember `json:"thread_member"`
Members []*ThreadMember `json:"-"`
Flags ChannelFlags `json:"flags"`
AvailableTags []ForumTag `json:"available_tags"`
AppliedTags []string `json:"applied_tags"`
DefaultReactionEmoji ForumDefaultReaction `json:"default_reaction_emoji"`
DefaultThreadRateLimitPerUser int `json:"default_thread_rate_limit_per_user"`
DefaultSortOrder *ForumSortOrderType `json:"default_sort_order"`
DefaultForumLayout ForumLayout `json:"default_forum_layout"`
}
type ChannelCreate ¶
type ChannelCreate struct {
*Channel
}
type ChannelDelete ¶
type ChannelDelete struct {
*Channel
}
type ChannelEdit ¶
type ChannelEdit struct {
Name string `json:"name,omitempty"`
Topic string `json:"topic,omitempty"`
NSFW *bool `json:"nsfw,omitempty"`
Position *int `json:"position,omitempty"`
Bitrate int `json:"bitrate,omitempty"`
UserLimit int `json:"user_limit,omitempty"`
PermissionOverwrites []*PermissionOverwrite `json:"permission_overwrites,omitempty"`
ParentID string `json:"parent_id,omitempty"`
RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"`
Flags *ChannelFlags `json:"flags,omitempty"`
DefaultThreadRateLimitPerUser *int `json:"default_thread_rate_limit_per_user,omitempty"`
Archived *bool `json:"archived,omitempty"`
AutoArchiveDuration ThreadArchiveDuration `json:"auto_archive_duration,omitempty"`
Locked *bool `json:"locked,omitempty"`
Invitable *bool `json:"invitable,omitempty"`
AvailableTags *[]ForumTag `json:"available_tags,omitempty"`
DefaultReactionEmoji *ForumDefaultReaction `json:"default_reaction_emoji,omitempty"`
DefaultSortOrder *ForumSortOrderType `json:"default_sort_order,omitempty"`
DefaultForumLayout *ForumLayout `json:"default_forum_layout,omitempty"`
AppliedTags *[]string `json:"applied_tags,omitempty"`
}
type ChannelFlags ¶
type ChannelFlags int
const ( ChannelFlagPinned ChannelFlags = 1 << 1 ChannelFlagRequireTag ChannelFlags = 1 << 4 )
type ChannelFollow ¶
type ChannelPinsUpdate ¶
type ChannelType ¶
type ChannelType int
const ( ChannelTypeGuildText ChannelType = 0 ChannelTypeDM ChannelType = 1 ChannelTypeGuildVoice ChannelType = 2 ChannelTypeGroupDM ChannelType = 3 ChannelTypeGuildCategory ChannelType = 4 ChannelTypeGuildNews ChannelType = 5 ChannelTypeGuildStore ChannelType = 6 ChannelTypeGuildNewsThread ChannelType = 10 ChannelTypeGuildPublicThread ChannelType = 11 ChannelTypeGuildPrivateThread ChannelType = 12 ChannelTypeGuildStageVoice ChannelType = 13 ChannelTypeGuildDirectory ChannelType = 14 ChannelTypeGuildForum ChannelType = 15 ChannelTypeGuildMedia ChannelType = 16 )
type ChannelUpdate ¶
type ClientStatus ¶
type ComponentEmoji ¶
type ComponentType ¶
type ComponentType uint
const ( ActionsRowComponent ComponentType = 1 ButtonComponent ComponentType = 2 SelectMenuComponent ComponentType = 3 TextInputComponent ComponentType = 4 UserSelectMenuComponent ComponentType = 5 RoleSelectMenuComponent ComponentType = 6 MentionableSelectMenuComponent ComponentType = 7 ChannelSelectMenuComponent ComponentType = 8 )
type Disconnect ¶
type Disconnect struct{}
type Emoji ¶
type Emoji struct {
ID string `json:"id"`
Name string `json:"name"`
Roles []string `json:"roles"`
User *User `json:"user"`
RequireColons bool `json:"require_colons"`
Managed bool `json:"managed"`
Animated bool `json:"animated"`
Available bool `json:"available"`
}
func (*Emoji) MessageFormat ¶
type EmojiParams ¶
type Entitlement ¶
type Entitlement struct {
ID string `json:"id"`
SKUID string `json:"sku_id"`
ApplicationID string `json:"application_id"`
UserID string `json:"user_id,omitempty"`
Type EntitlementType `json:"type"`
Deleted bool `json:"deleted"`
StartsAt *time.Time `json:"starts_at,omitempty"`
EndsAt *time.Time `json:"ends_at,omitempty"`
GuildID string `json:"guild_id,omitempty"`
Consumed *bool `json:"consumed,omitempty"`
SubscriptionID string `json:"subscription_id,omitempty"`
}
type EntitlementCreate ¶
type EntitlementCreate struct {
*Entitlement
}
type EntitlementDelete ¶
type EntitlementDelete struct {
*Entitlement
}
type EntitlementOwnerType ¶
type EntitlementOwnerType int
const ( EntitlementOwnerTypeGuildSubscription EntitlementOwnerType = 1 EntitlementOwnerTypeUserSubscription EntitlementOwnerType = 2 )
type EntitlementTest ¶
type EntitlementTest struct {
SKUID string `json:"sku_id"`
OwnerID string `json:"owner_id"`
OwnerType EntitlementOwnerType `json:"owner_type"`
}
type EntitlementType ¶
type EntitlementType int
type EntitlementUpdate ¶
type EntitlementUpdate struct {
*Entitlement
}
type Event ¶
type Event struct {
Operation int `json:"op"`
Sequence int64 `json:"s"`
Type string `json:"t"`
RawData json.RawMessage `json:"d"`
Struct interface{} `json:"-"`
}
type EventHandler ¶
type EventInterfaceProvider ¶
type EventInterfaceProvider interface {
Type() string
New() interface{}
}
type ExpireBehavior ¶
type ExpireBehavior int
const ( ExpireBehaviorRemoveRole ExpireBehavior = 0 ExpireBehaviorKick ExpireBehavior = 1 )
type ExplicitContentFilterLevel ¶
type ExplicitContentFilterLevel int
const ( ExplicitContentFilterDisabled ExplicitContentFilterLevel = 0 ExplicitContentFilterMembersWithoutRoles ExplicitContentFilterLevel = 1 ExplicitContentFilterAllMembers ExplicitContentFilterLevel = 2 )
type ForumDefaultReaction ¶
type ForumLayout ¶
type ForumLayout int
const ( ForumLayoutNotSet ForumLayout = 0 ForumLayoutListView ForumLayout = 1 ForumLayoutGalleryView ForumLayout = 2 )
type ForumSortOrderType ¶
type ForumSortOrderType int
const ( ForumSortOrderLatestActivity ForumSortOrderType = 0 ForumSortOrderCreationDate ForumSortOrderType = 1 )
type GatewayBotResponse ¶
type GatewayBotResponse struct {
URL string `json:"url"`
Shards int `json:"shards"`
SessionStartLimit SessionInformation `json:"session_start_limit"`
}
type GatewayStatusUpdate ¶
type Guild ¶
type Guild struct {
ID string `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Region string `json:"region"`
AfkChannelID string `json:"afk_channel_id"`
OwnerID string `json:"owner_id"`
Owner bool `json:"owner"`
JoinedAt time.Time `json:"joined_at"`
DiscoverySplash string `json:"discovery_splash"`
Splash string `json:"splash"`
AfkTimeout int `json:"afk_timeout"`
MemberCount int `json:"member_count"`
VerificationLevel VerificationLevel `json:"verification_level"`
Large bool `json:"large"`
DefaultMessageNotifications MessageNotifications `json:"default_message_notifications"`
Roles []*Role `json:"roles"`
Emojis []*Emoji `json:"emojis"`
Stickers []*Sticker `json:"stickers"`
Members []*Member `json:"members"`
Presences []*Presence `json:"presences"`
MaxPresences int `json:"max_presences"`
MaxMembers int `json:"max_members"`
Channels []*Channel `json:"channels"`
Threads []*Channel `json:"threads"`
VoiceStates []*VoiceState `json:"voice_states"`
ExplicitContentFilter ExplicitContentFilterLevel `json:"explicit_content_filter"`
NSFWLevel GuildNSFWLevel `json:"nsfw_level"`
Features []GuildFeature `json:"features"`
MfaLevel MfaLevel `json:"mfa_level"`
ApplicationID string `json:"application_id"`
WidgetEnabled bool `json:"widget_enabled"`
WidgetChannelID string `json:"widget_channel_id"`
SystemChannelID string `json:"system_channel_id"`
SystemChannelFlags SystemChannelFlag `json:"system_channel_flags"`
RulesChannelID string `json:"rules_channel_id"`
VanityURLCode string `json:"vanity_url_code"`
Description string `json:"description"`
Banner string `json:"banner"`
PremiumTier PremiumTier `json:"premium_tier"`
PremiumSubscriptionCount int `json:"premium_subscription_count"`
PreferredLocale string `json:"preferred_locale"`
PublicUpdatesChannelID string `json:"public_updates_channel_id"`
MaxVideoChannelUsers int `json:"max_video_channel_users"`
ApproximateMemberCount int `json:"approximate_member_count"`
ApproximatePresenceCount int `json:"approximate_presence_count"`
Permissions int64 `json:"permissions,string"`
StageInstances []*StageInstance `json:"stage_instances"`
}
type GuildApplicationCommandPermissions ¶
type GuildApplicationCommandPermissions struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
GuildID string `json:"guild_id"`
Permissions []*ApplicationCommandPermissions `json:"permissions"`
}
type GuildAuditLog ¶
type GuildAuditLog struct {
Webhooks []*Webhook `json:"webhooks,omitempty"`
Users []*User `json:"users,omitempty"`
AuditLogEntries []*AuditLogEntry `json:"audit_log_entries"`
Integrations []*Integration `json:"integrations"`
}
type GuildAuditLogEntryCreate ¶
type GuildAuditLogEntryCreate struct {
*AuditLogEntry
GuildID string `json:"guild_id"`
}
type GuildBanAdd ¶
type GuildBanRemove ¶
type GuildChannelCreateData ¶
type GuildChannelCreateData struct {
Name string `json:"name"`
Type ChannelType `json:"type"`
Topic string `json:"topic,omitempty"`
Bitrate int `json:"bitrate,omitempty"`
UserLimit int `json:"user_limit,omitempty"`
RateLimitPerUser int `json:"rate_limit_per_user,omitempty"`
Position int `json:"position,omitempty"`
PermissionOverwrites []*PermissionOverwrite `json:"permission_overwrites,omitempty"`
ParentID string `json:"parent_id,omitempty"`
NSFW bool `json:"nsfw,omitempty"`
}
type GuildCreate ¶
type GuildCreate struct {
*Guild
}
type GuildDelete ¶
type GuildEmbed ¶
type GuildEmojisUpdate ¶
type GuildFeature ¶
type GuildFeature string
const ( GuildFeatureAnimatedBanner GuildFeature = "ANIMATED_BANNER" GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON" GuildFeatureAutoModeration GuildFeature = "AUTO_MODERATION" GuildFeatureBanner GuildFeature = "BANNER" GuildFeatureCommunity GuildFeature = "COMMUNITY" GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE" GuildFeatureFeaturable GuildFeature = "FEATURABLE" GuildFeatureInviteSplash GuildFeature = "INVITE_SPLASH" GuildFeatureMemberVerificationGateEnabled GuildFeature = "MEMBER_VERIFICATION_GATE_ENABLED" GuildFeatureMonetizationEnabled GuildFeature = "MONETIZATION_ENABLED" GuildFeatureMoreStickers GuildFeature = "MORE_STICKERS" GuildFeatureNews GuildFeature = "NEWS" GuildFeaturePartnered GuildFeature = "PARTNERED" GuildFeaturePreviewEnabled GuildFeature = "PREVIEW_ENABLED" GuildFeaturePrivateThreads GuildFeature = "PRIVATE_THREADS" GuildFeatureRoleIcons GuildFeature = "ROLE_ICONS" GuildFeatureTicketedEventsEnabled GuildFeature = "TICKETED_EVENTS_ENABLED" GuildFeatureVanityURL GuildFeature = "VANITY_URL" GuildFeatureVerified GuildFeature = "VERIFIED" GuildFeatureVipRegions GuildFeature = "VIP_REGIONS" GuildFeatureWelcomeScreenEnabled GuildFeature = "WELCOME_SCREEN_ENABLED" )
type GuildIntegrationsUpdate ¶
type GuildIntegrationsUpdate struct {
GuildID string `json:"guild_id"`
}
type GuildMemberAdd ¶
type GuildMemberAdd struct {
*Member
}
type GuildMemberAddParams ¶
type GuildMemberParams ¶
type GuildMemberParams struct {
Nick string `json:"nick,omitempty"`
Roles *[]string `json:"roles,omitempty"`
ChannelID *string `json:"channel_id,omitempty"`
Mute *bool `json:"mute,omitempty"`
Deaf *bool `json:"deaf,omitempty"`
CommunicationDisabledUntil *time.Time `json:"communication_disabled_until,omitempty"`
}
func (GuildMemberParams) MarshalJSON ¶
func (p GuildMemberParams) MarshalJSON() (res []byte, err error)
type GuildMemberRemove ¶
type GuildMemberRemove struct {
*Member
}
type GuildMemberUpdate ¶
type GuildMembersChunk ¶
type GuildMembersChunk struct {
GuildID string `json:"guild_id"`
Members []*Member `json:"members"`
ChunkIndex int `json:"chunk_index"`
ChunkCount int `json:"chunk_count"`
NotFound []string `json:"not_found,omitempty"`
Presences []*Presence `json:"presences,omitempty"`
Nonce string `json:"nonce,omitempty"`
}
type GuildNSFWLevel ¶
type GuildNSFWLevel int
const ( GuildNSFWLevelDefault GuildNSFWLevel = 0 GuildNSFWLevelExplicit GuildNSFWLevel = 1 GuildNSFWLevelSafe GuildNSFWLevel = 2 GuildNSFWLevelAgeRestricted GuildNSFWLevel = 3 )
type GuildOnboarding ¶
type GuildOnboarding struct {
GuildID string `json:"guild_id,omitempty"`
Prompts *[]GuildOnboardingPrompt `json:"prompts,omitempty"`
DefaultChannelIDs []string `json:"default_channel_ids,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Mode *GuildOnboardingMode `json:"mode,omitempty"`
}
type GuildOnboardingMode ¶
type GuildOnboardingMode int
const ( GuildOnboardingModeDefault GuildOnboardingMode = 0 GuildOnboardingModeAdvanced GuildOnboardingMode = 1 )
type GuildOnboardingPrompt ¶
type GuildOnboardingPrompt struct {
ID string `json:"id,omitempty"`
Type GuildOnboardingPromptType `json:"type"`
Options []GuildOnboardingPromptOption `json:"options"`
Title string `json:"title"`
SingleSelect bool `json:"single_select"`
Required bool `json:"required"`
InOnboarding bool `json:"in_onboarding"`
}
type GuildOnboardingPromptOption ¶
type GuildOnboardingPromptOption struct {
ID string `json:"id,omitempty"`
ChannelIDs []string `json:"channel_ids"`
RoleIDs []string `json:"role_ids"`
Emoji *Emoji `json:"emoji,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
EmojiID string `json:"emoji_id,omitempty"`
EmojiName string `json:"emoji_name,omitempty"`
EmojiAnimated *bool `json:"emoji_animated,omitempty"`
}
type GuildOnboardingPromptType ¶
type GuildOnboardingPromptType int
const ( GuildOnboardingPromptTypeMultipleChoice GuildOnboardingPromptType = 0 GuildOnboardingPromptTypeDropdown GuildOnboardingPromptType = 1 )
type GuildParams ¶
type GuildParams struct {
Name string `json:"name,omitempty"`
Region string `json:"region,omitempty"`
VerificationLevel *VerificationLevel `json:"verification_level,omitempty"`
DefaultMessageNotifications int `json:"default_message_notifications,omitempty"`
ExplicitContentFilter int `json:"explicit_content_filter,omitempty"`
AfkChannelID string `json:"afk_channel_id,omitempty"`
AfkTimeout int `json:"afk_timeout,omitempty"`
Icon string `json:"icon,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Splash string `json:"splash,omitempty"`
DiscoverySplash string `json:"discovery_splash,omitempty"`
Banner string `json:"banner,omitempty"`
SystemChannelID string `json:"system_channel_id,omitempty"`
SystemChannelFlags SystemChannelFlag `json:"system_channel_flags,omitempty"`
RulesChannelID string `json:"rules_channel_id,omitempty"`
PublicUpdatesChannelID string `json:"public_updates_channel_id,omitempty"`
PreferredLocale Locale `json:"preferred_locale,omitempty"`
Features []GuildFeature `json:"features,omitempty"`
Description string `json:"description,omitempty"`
PremiumProgressBarEnabled *bool `json:"premium_progress_bar_enabled,omitempty"`
}
type GuildPreview ¶
type GuildPreview struct {
ID string `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Splash string `json:"splash"`
DiscoverySplash string `json:"discovery_splash"`
Emojis []*Emoji `json:"emojis"`
Features []string `json:"features"`
ApproximateMemberCount int `json:"approximate_member_count"`
ApproximatePresenceCount int `json:"approximate_presence_count"`
Description string `json:"description"`
}
func (*GuildPreview) IconURL ¶
func (g *GuildPreview) IconURL(size string) string
type GuildRoleCreate ¶
type GuildRoleCreate struct {
*GuildRole
}
type GuildRoleDelete ¶
type GuildRoleUpdate ¶
type GuildRoleUpdate struct {
*GuildRole
}
type GuildScheduledEvent ¶
type GuildScheduledEvent struct {
ID string `json:"id"`
GuildID string `json:"guild_id"`
ChannelID string `json:"channel_id"`
CreatorID string `json:"creator_id"`
Name string `json:"name"`
Description string `json:"description"`
ScheduledStartTime time.Time `json:"scheduled_start_time"`
ScheduledEndTime *time.Time `json:"scheduled_end_time"`
PrivacyLevel GuildScheduledEventPrivacyLevel `json:"privacy_level"`
Status GuildScheduledEventStatus `json:"status"`
EntityType GuildScheduledEventEntityType `json:"entity_type"`
EntityID string `json:"entity_id"`
EntityMetadata GuildScheduledEventEntityMetadata `json:"entity_metadata"`
Creator *User `json:"creator"`
UserCount int `json:"user_count"`
Image string `json:"image"`
RecurrenceRule RecurrenceRule `json:"recurrence_rule,omitempty"`
}
type GuildScheduledEventCreate ¶
type GuildScheduledEventCreate struct {
*GuildScheduledEvent
}
type GuildScheduledEventDelete ¶
type GuildScheduledEventDelete struct {
*GuildScheduledEvent
}
type GuildScheduledEventEntityMetadata ¶
type GuildScheduledEventEntityMetadata struct {
Location string `json:"location"`
}
type GuildScheduledEventEntityType ¶
type GuildScheduledEventEntityType int
const ( GuildScheduledEventEntityTypeStageInstance GuildScheduledEventEntityType = 1 GuildScheduledEventEntityTypeVoice GuildScheduledEventEntityType = 2 GuildScheduledEventEntityTypeExternal GuildScheduledEventEntityType = 3 )
type GuildScheduledEventParams ¶
type GuildScheduledEventParams struct {
ChannelID string `json:"channel_id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ScheduledStartTime *time.Time `json:"scheduled_start_time,omitempty"`
ScheduledEndTime *time.Time `json:"scheduled_end_time,omitempty"`
PrivacyLevel GuildScheduledEventPrivacyLevel `json:"privacy_level,omitempty"`
Status GuildScheduledEventStatus `json:"status,omitempty"`
EntityType GuildScheduledEventEntityType `json:"entity_type,omitempty"`
EntityMetadata *GuildScheduledEventEntityMetadata `json:"entity_metadata,omitempty"`
Image string `json:"image,omitempty"`
}
func (GuildScheduledEventParams) MarshalJSON ¶
func (p GuildScheduledEventParams) MarshalJSON() ([]byte, error)
type GuildScheduledEventPrivacyLevel ¶
type GuildScheduledEventPrivacyLevel int
const (
GuildScheduledEventPrivacyLevelGuildOnly GuildScheduledEventPrivacyLevel = 2
)
type GuildScheduledEventStatus ¶
type GuildScheduledEventStatus int
const ( GuildScheduledEventStatusScheduled GuildScheduledEventStatus = 1 GuildScheduledEventStatusActive GuildScheduledEventStatus = 2 GuildScheduledEventStatusCompleted GuildScheduledEventStatus = 3 GuildScheduledEventStatusCanceled GuildScheduledEventStatus = 4 )
type GuildScheduledEventUpdate ¶
type GuildScheduledEventUpdate struct {
*GuildScheduledEvent
}
type GuildScheduledEventUser ¶
type GuildTemplate ¶
type GuildTemplate struct {
Code string `json:"code"`
Name string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
UsageCount int `json:"usage_count"`
CreatorID string `json:"creator_id"`
Creator *User `json:"creator"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
SourceGuildID string `json:"source_guild_id"`
SerializedSourceGuild *Guild `json:"serialized_source_guild"`
IsDirty bool `json:"is_dirty"`
}
type GuildTemplateParams ¶
type GuildUpdate ¶
type GuildUpdate struct {
*Guild
}
type Identify ¶
type Identify struct {
Token string `json:"token"`
Properties IdentifyProperties `json:"properties"`
Compress bool `json:"compress"`
LargeThreshold int `json:"large_threshold"`
Shard *[2]int `json:"shard,omitempty"`
Presence GatewayStatusUpdate `json:"presence,omitempty"`
Intents Intent `json:"intents"`
}
type IdentifyProperties ¶
type Integration ¶
type Integration struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Enabled bool `json:"enabled"`
Syncing bool `json:"syncing"`
RoleID string `json:"role_id"`
EnableEmoticons bool `json:"enable_emoticons"`
ExpireBehavior ExpireBehavior `json:"expire_behavior"`
ExpireGracePeriod int `json:"expire_grace_period"`
User *User `json:"user"`
Account IntegrationAccount `json:"account"`
SyncedAt time.Time `json:"synced_at"`
}
type IntegrationAccount ¶
type IntegrationCreate ¶
type IntegrationCreate struct {
*Integration
GuildID string `json:"guild_id"`
}
type IntegrationDelete ¶
type IntegrationUpdate ¶
type IntegrationUpdate struct {
*Integration
GuildID string `json:"guild_id"`
}
type Intent ¶
type Intent int
const ( IntentGuilds Intent = 1 << 0 IntentGuildMembers Intent = 1 << 1 IntentGuildModeration Intent = 1 << 2 IntentGuildEmojis Intent = 1 << 3 IntentGuildIntegrations Intent = 1 << 4 IntentGuildWebhooks Intent = 1 << 5 IntentGuildInvites Intent = 1 << 6 IntentGuildVoiceStates Intent = 1 << 7 IntentGuildPresences Intent = 1 << 8 IntentGuildMessages Intent = 1 << 9 IntentGuildMessageReactions Intent = 1 << 10 IntentGuildMessageTyping Intent = 1 << 11 IntentDirectMessages Intent = 1 << 12 IntentDirectMessageReactions Intent = 1 << 13 IntentDirectMessageTyping Intent = 1 << 14 IntentMessageContent Intent = 1 << 15 IntentGuildScheduledEvents Intent = 1 << 16 IntentAutoModerationConfiguration Intent = 1 << 20 IntentAutoModerationExecution Intent = 1 << 21 IntentGuildMessagePolls Intent = 1 << 24 IntentDirectMessagePolls Intent = 1 << 25 IntentGuildBans Intent = IntentGuildModeration IntentsGuilds Intent = 1 << 0 IntentsGuildMembers Intent = 1 << 1 IntentsGuildBans Intent = 1 << 2 IntentsGuildEmojis Intent = 1 << 3 IntentsGuildIntegrations Intent = 1 << 4 IntentsGuildWebhooks Intent = 1 << 5 IntentsGuildInvites Intent = 1 << 6 IntentsGuildVoiceStates Intent = 1 << 7 IntentsGuildPresences Intent = 1 << 8 IntentsGuildMessages Intent = 1 << 9 IntentsGuildMessageReactions Intent = 1 << 10 IntentsGuildMessageTyping Intent = 1 << 11 IntentsDirectMessages Intent = 1 << 12 IntentsDirectMessageReactions Intent = 1 << 13 IntentsDirectMessageTyping Intent = 1 << 14 IntentsMessageContent Intent = 1 << 15 IntentsGuildScheduledEvents Intent = 1 << 16 IntentsAllWithoutPrivileged = IntentGuilds | IntentGuildBans | IntentGuildEmojis | IntentGuildIntegrations | IntentGuildWebhooks | IntentGuildInvites | IntentGuildVoiceStates | IntentGuildMessages | IntentGuildMessageReactions | IntentGuildMessageTyping | IntentDirectMessages | IntentDirectMessageReactions | IntentDirectMessageTyping | IntentGuildScheduledEvents | IntentAutoModerationConfiguration | IntentAutoModerationExecution IntentsAll = IntentsAllWithoutPrivileged | IntentGuildMembers | IntentGuildPresences | IntentMessageContent IntentsNone Intent = 0 )
func MakeIntent ¶
type Interaction ¶
type Interaction struct {
ID string `json:"id"`
AppID string `json:"application_id"`
Type InteractionType `json:"type"`
Data InteractionData `json:"data"`
GuildID string `json:"guild_id"`
ChannelID string `json:"channel_id"`
Message *Message `json:"message"`
AppPermissions int64 `json:"app_permissions,string"`
Member *Member `json:"member"`
User *User `json:"user"`
Locale Locale `json:"locale"`
GuildLocale *Locale `json:"guild_locale"`
Context InteractionContextType `json:"context"`
AuthorizingIntegrationOwners map[ApplicationIntegrationType]string `json:"authorizing_integration_owners"`
Token string `json:"token"`
Version int `json:"version"`
Entitlements []*Entitlement `json:"entitlements"`
}
func (Interaction) ApplicationCommandData ¶
func (i Interaction) ApplicationCommandData() (data ApplicationCommandInteractionData)
func (Interaction) MessageComponentData ¶
func (i Interaction) MessageComponentData() (data MessageComponentInteractionData)
func (Interaction) ModalSubmitData ¶
func (i Interaction) ModalSubmitData() (data ModalSubmitInteractionData)
func (*Interaction) UnmarshalJSON ¶
func (i *Interaction) UnmarshalJSON(raw []byte) error
type InteractionContextType ¶
type InteractionContextType uint
const ( InteractionContextGuild InteractionContextType = 0 InteractionContextBotDM InteractionContextType = 1 InteractionContextPrivateChannel InteractionContextType = 2 )
type InteractionCreate ¶
type InteractionCreate struct {
*Interaction
}
func (*InteractionCreate) UnmarshalJSON ¶
func (i *InteractionCreate) UnmarshalJSON(b []byte) error
type InteractionData ¶
type InteractionData interface {
Type() InteractionType
}
type InteractionResponse ¶
type InteractionResponse struct {
Type InteractionResponseType `json:"type,omitempty"`
Data *InteractionResponseData `json:"data,omitempty"`
}
type InteractionResponseData ¶
type InteractionResponseData struct {
TTS bool `json:"tts"`
Content string `json:"content"`
Components []MessageComponent `json:"components"`
Embeds []*MessageEmbed `json:"embeds"`
AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
Files []*File `json:"-"`
Attachments *[]*