Documentation
¶
Index ¶
- Constants
- func AddGuildMemberRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func AddPinnedChannelMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func AddThreadMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func BeginGuildPrune(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func BulkDeleteMessages(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func ConsumeEntitlement(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func CreateChannelInvite(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (invite.Invite, error)
- func CreateDM(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (channel.Channel, error)
- func CreateFollowupMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func CreateGlobalCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command interaction.ApplicationCommand, err error)
- func CreateGuild(ctx context.Context, token string, data CreateGuildData) (guild.Guild, error)
- func CreateGuildBan(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func CreateGuildChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (channel.Channel, error)
- func CreateGuildCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command interaction.ApplicationCommand, err error)
- func CreateGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (emoji.Emoji, error)
- func CreateGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func CreateGuildRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Role, error)
- func CreateMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (message.Message, error)
- func CreateReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func CreateTestEntitlement(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (entitlement.Entitlement, error)
- func CreateWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Webhook, error)
- func DeleteAllReactions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteAllReactionsEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (channel.Channel, error)
- func DeleteChannelPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteFollowupMessages(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func DeleteGlobalCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func DeleteGuild(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteGuildCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func DeleteGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteGuildRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteInvite(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (invite.Invite, error)
- func DeleteMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteOriginalInteractionResponse(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func DeleteOwnReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeletePinnedChannelMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteTestEntitlement(ctx context.Context, token string, rateLimtier *ratelimit.Ratelimiter, ...) error
- func DeleteUserReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func DeleteWebhookWithToken(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func EditChannelPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func EditCurrentApplication(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (application.Application, error)
- func EditFollowupMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func EditMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (message.Message, error)
- func EditOriginalInteractionResponse(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func EditWebhookMessage(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func ExecuteWebhook(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, ...) (*message.Message, error)
- func GetChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (channel.Channel, error)
- func GetChannelInvites(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]invite.InviteMetadata, error)
- func GetChannelMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (message.Message, error)
- func GetChannelMessages(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]message.Message, error)
- func GetChannelWebhooks(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Webhook, error)
- func GetCurrentApplication(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter) (application.Application, error)
- func GetCurrentUser(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter) (user.User, error)
- func GetCurrentUserGuilds(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Guild, error)
- func GetFollowupMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func GetGlobalCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []interaction.ApplicationCommand, err error)
- func GetGuild(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Guild, error)
- func GetGuildAuditLog(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (log auditlog.AuditLog, err error)
- func GetGuildBan(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Ban, error)
- func GetGuildBans(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Ban, error)
- func GetGuildChannels(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]channel.Channel, error)
- func GetGuildCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []interaction.ApplicationCommand, err error)
- func GetGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (emoji.Emoji, error)
- func GetGuildIntegrations(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]integration.Integration, error)
- func GetGuildInvites(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]invite.InviteMetadata, error)
- func GetGuildMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (member.Member, error)
- func GetGuildPreview(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.GuildPreview, error)
- func GetGuildPruneCount(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (int, error)
- func GetGuildRoles(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Role, error)
- func GetGuildVanityURL(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (invite invite.Invite, err error)
- func GetGuildVoiceRegions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.VoiceRegion, error)
- func GetGuildWebhooks(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Webhook, error)
- func GetGuildWidget(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (widget guild.GuildWidget, err error)
- func GetInvite(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (invite.Invite, error)
- func GetOriginalInteractionResponse(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (msg message.Message, err error)
- func GetPinnedMessages(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]message.Message, error)
- func GetReactions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]user.User, error)
- func GetThreadMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (member channel.ThreadMember, err error)
- func GetUser(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (user.User, error)
- func GetUserConnections(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter) ([]integration.Connection, error)
- func GetWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Webhook, error)
- func GetWebhookWithToken(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Webhook, error)
- func JoinThread(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func LeaveGuild(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func LeaveThread(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func ListEntitlements(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]entitlement.Entitlement, error)
- func ListGuildEmojis(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]emoji.Emoji, error)
- func ListGuildMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]member.Member, error)
- func ListThreadMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (members []channel.ThreadMember, err error)
- func ListVoiceRegions(ctx context.Context, token string) ([]guild.VoiceRegion, error)
- func ModifyChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (channel.Channel, error)
- func ModifyCurrentUser(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (user.User, error)
- func ModifyCurrentUserNick(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func ModifyGlobalCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command interaction.ApplicationCommand, err error)
- func ModifyGlobalCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []interaction.ApplicationCommand, err error)
- func ModifyGuild(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Guild, error)
- func ModifyGuildChannelPositions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func ModifyGuildCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command interaction.ApplicationCommand, err error)
- func ModifyGuildCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []interaction.ApplicationCommand, err error)
- func ModifyGuildEmbed(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (widget guild.GuildEmbed, err error)
- func ModifyGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (emoji.Emoji, error)
- func ModifyGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func ModifyGuildMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func ModifyGuildRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Role, error)
- func ModifyGuildRolePositions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) ([]guild.Role, error)
- func ModifyWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (guild.Webhook, error)
- func ModifyWebhookWithToken(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func RemoveGuildBan(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func RemoveGuildMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func RemoveGuildMemberRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func RemoveThreadMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (err error)
- func RevokeToken(ctx context.Context, rateLimiter *ratelimit.Ratelimiter, clientId uint64, ...) error
- func SearchGuildMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (members []member.Member, err error)
- func StartThreadWithMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (ch channel.Channel, err error)
- func StartThreadWithoutMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (ch channel.Channel, err error)
- func SyncGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- func TriggerTypingIndicator(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) error
- type CommandWithPermissionsData
- func EditBulkCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []CommandWithPermissionsData, err error)
- func EditCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command CommandWithPermissionsData, err error)
- func GetBulkCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (commands []CommandWithPermissionsData, err error)
- func GetCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (command CommandWithPermissionsData, err error)
- type CreateChannelData
- type CreateCommandData
- type CreateEmojiData
- type CreateGuildBanData
- type CreateGuildData
- type CreateIntegrationData
- type CreateInviteData
- type CreateMessageData
- type CreateTestEntitlementData
- type CurrentUserGuildsData
- type EditCurrentApplicationData
- type EditMessageData
- type EntitlementOwnerType
- type EntitlementQueryOptions
- type GetChannelMessagesData
- type GetGuildAuditLogData
- type GetGuildBansData
- type GetReactionsData
- type GrantType
- type GuildRoleData
- type Image
- type ListGuildMembersData
- type ListThreadsData
- type ModifyChannelData
- type ModifyGuildData
- type ModifyGuildMemberData
- type ModifyIntegrationData
- type ModifyUserData
- type ModifyWebhookData
- type Position
- type SearchGuildMembersData
- type StartThreadWithMessageData
- type StartThreadWithoutMessageData
- type ThreadMetadataModifyData
- type ThreadsResponse
- func ListActiveThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (threads ThreadsResponse, err error)
- func ListJoinedPrivateArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (threads ThreadsResponse, err error)
- func ListPrivateArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (threads ThreadsResponse, err error)
- func ListPublicArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, ...) (threads ThreadsResponse, err error)
- type TokenExchangeBody
- type TokenExchangeResponse
- type TokenRevocationBody
- type TokenTypeHint
- type WebhookBody
- type WebhookData
- type WebhookEditBody
Constants ¶
View Source
const ( GrantTypeAuthorizationCode GrantType = "authorization_code" GrantTypeRefreshToken GrantType = "refresh_token" TokenTypeHintAccessToken TokenTypeHint = "access_token" TokenTypeHintRefreshToken TokenTypeHint = "refresh_token" )
Variables ¶
This section is empty.
Functions ¶
func AddGuildMemberRole ¶
func AddPinnedChannelMessage ¶
func AddThreadMember ¶
func BeginGuildPrune ¶
func BeginGuildPrune(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, days int, computePruneCount bool) error
computePruneCount = whether 'pruned' is returned, discouraged for large guilds
func BulkDeleteMessages ¶
func ConsumeEntitlement ¶
func CreateChannelInvite ¶
func CreateChannelInvite(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data CreateInviteData) (invite.Invite, error)
func CreateFollowupMessage ¶
func CreateFollowupMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, data WebhookBody) (msg message.Message, err error)
func CreateGlobalCommand ¶
func CreateGlobalCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, data CreateCommandData) (command interaction.ApplicationCommand, err error)
func CreateGuild ¶
only available to bots in < 10 guilds
func CreateGuildBan ¶
func CreateGuildBan(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId, userId uint64, data CreateGuildBanData) error
func CreateGuildChannel ¶
func CreateGuildChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data CreateChannelData) (channel.Channel, error)
func CreateGuildCommand ¶
func CreateGuildCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId uint64, data CreateCommandData) (command interaction.ApplicationCommand, err error)
func CreateGuildEmoji ¶
func CreateGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data CreateEmojiData) (emoji.Emoji, error)
func CreateGuildIntegration ¶
func CreateGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data CreateIntegrationData) error
func CreateGuildRole ¶
func CreateGuildRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data GuildRoleData) (guild.Role, error)
func CreateMessage ¶
func CreateMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data CreateMessageData) (message.Message, error)
func CreateReaction ¶
func CreateReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId uint64, emoji string) error
emoji is the raw unicode emoji
func CreateTestEntitlement ¶
func CreateTestEntitlement(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, data CreateTestEntitlementData) (entitlement.Entitlement, error)
func CreateWebhook ¶
func CreateWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data WebhookData) (guild.Webhook, error)
func DeleteAllReactions ¶
func DeleteAllReactionsEmoji ¶
func DeleteChannel ¶
func DeleteFollowupMessages ¶
func DeleteGlobalCommand ¶
func DeleteGuild ¶
func DeleteGuildCommand ¶
func DeleteGuildEmoji ¶
func DeleteGuildIntegration ¶
func DeleteGuildRole ¶
func DeleteInvite ¶
func DeleteMessage ¶
func DeleteOwnReaction ¶
func DeleteOwnReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId uint64, emoji string) error
emoji is the raw unicode emoji
func DeleteTestEntitlement ¶
func DeleteUserReaction ¶
func DeleteUserReaction(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId, userId uint64, emoji string) error
emoji is the raw unicode emoji
func DeleteWebhook ¶
func DeleteWebhookWithToken ¶
func EditChannelPermissions ¶
func EditChannelPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, updated channel.PermissionOverwrite) error
func EditCurrentApplication ¶
func EditCurrentApplication(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, data EditCurrentApplicationData) (application.Application, error)
func EditFollowupMessage ¶
func EditFollowupMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, messageId uint64, data WebhookBody) (msg message.Message, err error)
func EditMessage ¶
func EditMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId uint64, data EditMessageData) (message.Message, error)
func EditOriginalInteractionResponse ¶
func EditOriginalInteractionResponse(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, data WebhookEditBody) (msg message.Message, err error)
func EditWebhookMessage ¶
func EditWebhookMessage(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, webhookId, messageId uint64, data WebhookEditBody) (msg message.Message, err error)
func ExecuteWebhook ¶
func ExecuteWebhook(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, webhookId uint64, wait bool, data WebhookBody) (*message.Message, error)
if wait=true, a message object will be returned
func GetChannel ¶
func GetChannelInvites ¶
func GetChannelInvites(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64) ([]invite.InviteMetadata, error)
func GetChannelMessage ¶
func GetChannelMessages ¶
func GetChannelMessages(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data GetChannelMessagesData) ([]message.Message, error)
func GetChannelWebhooks ¶
func GetCurrentApplication ¶
func GetCurrentApplication(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter) (application.Application, error)
func GetCurrentUser ¶
func GetCurrentUserGuilds ¶
func GetCurrentUserGuilds(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, data CurrentUserGuildsData) ([]guild.Guild, error)
func GetFollowupMessage ¶
func GetGlobalCommands ¶
func GetGlobalCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64) (commands []interaction.ApplicationCommand, err error)
func GetGuildAuditLog ¶
func GetGuildAuditLog(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data GetGuildAuditLogData) (log auditlog.AuditLog, err error)
func GetGuildBan ¶
func GetGuildBans ¶
func GetGuildBans(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data GetGuildBansData) ([]guild.Ban, error)
func GetGuildChannels ¶
func GetGuildCommands ¶
func GetGuildCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId uint64) (commands []interaction.ApplicationCommand, err error)
func GetGuildEmoji ¶
func GetGuildIntegrations ¶
func GetGuildIntegrations(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) ([]integration.Integration, error)
func GetGuildInvites ¶
func GetGuildInvites(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) ([]invite.InviteMetadata, error)
func GetGuildMember ¶
func GetGuildPreview ¶
func GetGuildPreview(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) (guild.GuildPreview, error)
func GetGuildPruneCount ¶
func GetGuildRoles ¶
func GetGuildVanityURL ¶
func GetGuildVanityURL(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) (invite invite.Invite, err error)
returns invite object with only "code" and "uses" fields
func GetGuildVoiceRegions ¶
func GetGuildVoiceRegions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) ([]guild.VoiceRegion, error)
func GetGuildWebhooks ¶
func GetGuildWidget ¶
func GetGuildWidget(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) (widget guild.GuildWidget, err error)
func GetPinnedMessages ¶
func GetReactions ¶
func GetThreadMember ¶
func GetThreadMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, userId uint64) (member channel.ThreadMember, err error)
func GetUserConnections ¶
func GetUserConnections(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter) ([]integration.Connection, error)
func GetWebhook ¶
func GetWebhookWithToken ¶
func GetWebhookWithToken(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, webhookId uint64) (guild.Webhook, error)
does not return a User object
func JoinThread ¶
func LeaveGuild ¶
func LeaveThread ¶
func ListEntitlements ¶
func ListEntitlements(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, options EntitlementQueryOptions) ([]entitlement.Entitlement, error)
func ListGuildEmojis ¶
func ListGuildMembers ¶
func ListGuildMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data ListGuildMembersData) ([]member.Member, error)
func ListThreadMembers ¶
func ListThreadMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64) (members []channel.ThreadMember, err error)
func ListVoiceRegions ¶
func ModifyChannel ¶
func ModifyChannel(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data ModifyChannelData) (channel.Channel, error)
func ModifyCurrentUser ¶
func ModifyCurrentUser(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, data ModifyUserData) (user.User, error)
func ModifyCurrentUserNick ¶
func ModifyGlobalCommand ¶
func ModifyGlobalCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, commandId uint64, data CreateCommandData) (command interaction.ApplicationCommand, err error)
func ModifyGlobalCommands ¶
func ModifyGlobalCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId uint64, data []CreateCommandData) (commands []interaction.ApplicationCommand, err error)
func ModifyGuild ¶
func ModifyGuild(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data ModifyGuildData) (guild.Guild, error)
func ModifyGuildCommand ¶
func ModifyGuildCommand(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId, commandId uint64, data CreateCommandData) (command interaction.ApplicationCommand, err error)
func ModifyGuildCommands ¶
func ModifyGuildCommands(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId uint64, data []CreateCommandData) (commands []interaction.ApplicationCommand, err error)
func ModifyGuildEmbed ¶
func ModifyGuildEmbed(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data guild.GuildEmbed) (widget guild.GuildEmbed, err error)
func ModifyGuildEmoji ¶
func ModifyGuildEmoji(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId, emojiId uint64, data CreateEmojiData) (emoji.Emoji, error)
updating Image is not permitted
func ModifyGuildIntegration ¶
func ModifyGuildIntegration(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId, integrationId uint64, data ModifyIntegrationData) error
func ModifyGuildMember ¶
func ModifyGuildMember(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId, userId uint64, data ModifyGuildMemberData) error
func ModifyGuildRole ¶
func ModifyGuildRole(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId, roleId uint64, data GuildRoleData) (guild.Role, error)
func ModifyWebhook ¶
func ModifyWebhook(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, webhookId uint64, data ModifyWebhookData) (guild.Webhook, error)
func ModifyWebhookWithToken ¶
func ModifyWebhookWithToken(ctx context.Context, webhookToken string, rateLimiter *ratelimit.Ratelimiter, webhookId uint64, data WebhookData) error
func RemoveGuildBan ¶
func RemoveGuildMember ¶
func RemoveGuildMemberRole ¶
func RemoveThreadMember ¶
func RevokeToken ¶
func RevokeToken(ctx context.Context, rateLimiter *ratelimit.Ratelimiter, clientId uint64, clientSecret, token string, tokenTypeHint *TokenTypeHint) error
func SearchGuildMembers ¶
func SearchGuildMembers(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64, data SearchGuildMembersData) (members []member.Member, err error)
func StartThreadWithMessage ¶
func StartThreadWithMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId uint64, data StartThreadWithMessageData) (ch channel.Channel, err error)
func StartThreadWithoutMessage ¶
func StartThreadWithoutMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data StartThreadWithoutMessageData) (ch channel.Channel, err error)
func SyncGuildIntegration ¶
func TriggerTypingIndicator ¶
Types ¶
type CommandWithPermissionsData ¶
type CommandWithPermissionsData struct { Id uint64 `json:"id,string,omitempty"` ApplicationId uint64 `json:"application_id,string,omitempty"` GuildId uint64 `json:"guild_id,string,omitempty"` Permissions []interaction.ApplicationCommandPermissions `json:"permissions"` }
func EditBulkCommandPermissions ¶
func EditBulkCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId uint64, data []CommandWithPermissionsData) (commands []CommandWithPermissionsData, err error)
func EditCommandPermissions ¶
func EditCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId, commandId uint64, data CommandWithPermissionsData) (command CommandWithPermissionsData, err error)
func GetBulkCommandPermissions ¶
func GetBulkCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId uint64) (commands []CommandWithPermissionsData, err error)
func GetCommandPermissions ¶
func GetCommandPermissions(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, applicationId, guildId, commandId uint64) (command CommandWithPermissionsData, err error)
type CreateChannelData ¶
type CreateChannelData struct { Name string `json:"name"` Type channel.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"` Position int `json:"position,omitempty"` PermissionOverwrites []channel.PermissionOverwrite `json:"permission_overwrites"` ParentId uint64 `json:"parent_id,string,omitempty"` Nsfw bool `json:"nsfw,omitempty"` }
type CreateCommandData ¶
type CreateCommandData struct { Id uint64 `json:"id,omitempty"` // Optional: Use to rename without changing ID Name string `json:"name"` Description string `json:"description"` Options []interaction.ApplicationCommandOption `json:"options"` Type interaction.ApplicationCommandType `json:"type"` }
type CreateEmojiData ¶
type CreateGuildBanData ¶
type CreateGuildData ¶
type CreateGuildData struct { Name string `json:"name"` Region string `json:"region"` // voice region ID TODO: Helper function Icon string `json:"icon"` VerificationLevel guild.VerificationLevel `json:"verification_level"` DefaultMessageNotifications guild.DefaultMessageNotificationLevel `json:"default_message_notifications"` ExplicitContentFilter guild.ExplicitContentFilterLevel `json:"explicit_content_filter"` Roles []*guild.Role `json:"roles"` // only @everyone Channels []*channel.Channel `json:"channels"` // channels cannot have a ParentId AfkChannelId uint64 `json:"afk_channel_id,string"` AfkTimeout int `json:"afk_timeout"` SystemChannelId uint64 `json:"system_channel_id"` }
type CreateIntegrationData ¶
type CreateInviteData ¶
type CreateInviteData struct { MaxAge int `json:"max_age"` // seconds, 0 = never MaxUses int `json:"max_uses"` // 0 = unlimited Temporary bool `json:"temporary"` Unique bool `json:"unique"` TargetUser uint64 `json:"target_user,string,omitempty"` TargetUserType int `json:"target_user_type,omitempty"` }
type CreateMessageData ¶
type CreateMessageData struct { Content string `json:"content"` Nonce string `json:"nonce,omitempty"` Tts bool `json:"tts,omitempty"` Embeds []*embed.Embed `json:"embeds,omitempty"` Flags uint `json:"flags,omitempty"` AllowedMentions message.AllowedMention `json:"allowed_mentions"` MessageReference *message.MessageReference `json:"message_reference,omitempty"` Components []component.Component `json:"components,omitempty"` StickerIds []uint64 `json:"sticker_ids,omitempty"` Attachments []request.Attachment `json:"attachments,omitempty"` }
func (CreateMessageData) GetAttachments ¶
func (d CreateMessageData) GetAttachments() []request.Attachment
type CreateTestEntitlementData ¶
type CreateTestEntitlementData struct { SkuId uint64 `json:"sku_id,string"` OwnerId uint64 `json:"owner_id,string"` OwnerType EntitlementOwnerType `json:"owner_type"` }
type CurrentUserGuildsData ¶
func (*CurrentUserGuildsData) Query ¶
func (d *CurrentUserGuildsData) Query() string
type EditCurrentApplicationData ¶
type EditCurrentApplicationData struct { CustomInstallUrl *string `json:"custom_install_url,omitempty"` Description *string `json:"description,omitempty"` RoleConnectionsVerificationUrl *string `json:"role_connections_verification_url,omitempty"` InstallParams *application.InstallParams `json:"install_params,omitempty"` Flags *application.Flag `json:"flags,omitempty"` // TODO: icon // TODO: cover_image InteractionsEndpointUrl *string `json:"interactions_endpoint_url,omitempty"` Tags []string `json:"tags,omitempty"` }
type EditMessageData ¶
type EntitlementOwnerType ¶
type EntitlementOwnerType uint8
const ( EntitlementOwnerTypeGuild EntitlementOwnerType = iota + 1 EntitlementOwnerTypeUser )
type EntitlementQueryOptions ¶
type EntitlementQueryOptions struct { UserId *uint64 SkuIds []uint64 Before *uint64 After *uint64 Limit *int GuildId *uint64 ExcludedEnded *bool }
func (*EntitlementQueryOptions) Query ¶
func (o *EntitlementQueryOptions) Query() string
type GetChannelMessagesData ¶
type GetChannelMessagesData struct { Around uint64 // get messages around this message ID Before uint64 // get messages before this message ID After uint64 // get messages after this message ID Limit int // 1 - 100 }
The before, after, and around keys are mutually exclusive, only one may be passed at a time.
func (*GetChannelMessagesData) Query ¶
func (o *GetChannelMessagesData) Query() string
type GetGuildAuditLogData ¶
type GetGuildAuditLogData struct { UserId uint64 ActionType auditlog.AuditLogEvent Before uint64 // audit log entry ID Limit int }
func (*GetGuildAuditLogData) Query ¶
func (d *GetGuildAuditLogData) Query() string
type GetGuildBansData ¶
func (*GetGuildBansData) Query ¶
func (d *GetGuildBansData) Query() string
type GetReactionsData ¶
type GetReactionsData struct { Before uint64 // get users before this user ID After uint64 // get users after this user ID Limit int // 1 - 100 }
func (*GetReactionsData) Query ¶
func (o *GetReactionsData) Query() string
type GuildRoleData ¶
type Image ¶
type Image struct { ContentType request.ContentType ImageReader io.Reader }
func (Image) MarshalJSON ¶
type ListGuildMembersData ¶
type ListGuildMembersData struct { Limit int // 1 - 1000 After uint64 // Highest user ID in the previous page }
all parameters are optional
func (*ListGuildMembersData) Query ¶
func (d *ListGuildMembersData) Query() string
type ListThreadsData ¶
func (*ListThreadsData) Query ¶
func (d *ListThreadsData) Query() string
type ModifyChannelData ¶
type ModifyChannelData struct { Name string `json:"name,omitempty"` Position int `json:"position,omitempty"` Topic string `json:"topic,omitempty"` Nsfw bool `json:"nsfw,omitempty"` RateLimitPerUser int `json:"rate_limit_per_user,omitempty"` Bitrate int `json:"bitrate,omitempty"` UserLimit int `json:"user_limit,omitempty"` PermissionOverwrites []channel.PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentId uint64 `json:"parent_id,string,omitempty"` *ThreadMetadataModifyData }
type ModifyGuildData ¶
type ModifyGuildData struct { Name string `json:"name"` Region string `json:"region"` // voice region ID TODO: Helper function VerificationLevel guild.VerificationLevel `json:"verification_level"` DefaultMessageNotifications guild.DefaultMessageNotificationLevel `json:"default_message_notifications"` ExplicitContentFilter guild.ExplicitContentFilterLevel `json:"explicit_content_filter"` AfkChannelId uint64 `json:"afk_channel_id,string"` AfkTimeout int `json:"afk_timeout"` Icon string `json:"icon"` OwnerId uint64 `json:"owner_id"` Splash string `json:"splash"` Banner string `json:"banner"` SystemChannelId uint64 `json:"system_channel_id"` RulesChannelId uint64 `json:"rules_channel_id"` PublicUpdatesChannelId uint64 `json:"public_updates_channel_id"` PreferredLocale string `json:"preferred_locale"` }
type ModifyGuildMemberData ¶
type ModifyGuildMemberData struct { Nick string `json:"nick,omitempty"` Roles *utils.Uint64StringSlice `json:"roles,omitempty"` Mute *bool `json:"mute,omitempty"` Deaf *bool `json:"deaf,omitempty"` ChannelId uint64 `json:"channel_id,string,omitempty"` // id of channel to move user to (if they are connected to voice) }
type ModifyIntegrationData ¶
type ModifyIntegrationData struct { ExpireBehaviour integration.IntegrationExpireBehaviour `json:"expire_behavior"` ExpireGracePeriod int `json:"expire_grace_period"` EnableEmoticons bool `json:"enable_emoticons"` }
type ModifyUserData ¶
type ModifyWebhookData ¶
type SearchGuildMembersData ¶
type SearchGuildMembersData struct { Query string // Username / nickname to match against Limit int // 1 - 1000, optional (defaults to 1) }
func (*SearchGuildMembersData) Encode ¶
func (d *SearchGuildMembersData) Encode() string
type StartThreadWithoutMessageData ¶
type StartThreadWithoutMessageData struct { Name string `json:"name"` AutoArchiveDuration uint16 `json:"auto_archive_duration"` Type channel.ChannelType `json:"type"` Invitable bool `json:"invitable"` }
type ThreadsResponse ¶
type ThreadsResponse struct { Threads []channel.Channel `json:"threads"` Members []channel.ThreadMember `json:"members"` HasMore bool `json:"has_more"` }
func ListActiveThreads ¶
func ListActiveThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, guildId uint64) (threads ThreadsResponse, err error)
func ListJoinedPrivateArchivedThreads ¶
func ListJoinedPrivateArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data ListThreadsData) (threads ThreadsResponse, err error)
func ListPrivateArchivedThreads ¶
func ListPrivateArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data ListThreadsData) (threads ThreadsResponse, err error)
func ListPublicArchivedThreads ¶
func ListPublicArchivedThreads(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId uint64, data ListThreadsData) (threads ThreadsResponse, err error)
type TokenExchangeBody ¶
type TokenExchangeResponse ¶
type TokenExchangeResponse struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` Scope string `json:"scope"` }
func ExchangeCode ¶
func ExchangeCode(ctx context.Context, rateLimiter *ratelimit.Ratelimiter, clientId uint64, clientSecret, redirectUri, code string) (TokenExchangeResponse, error)
func RefreshToken ¶
func RefreshToken(ctx context.Context, rateLimiter *ratelimit.Ratelimiter, clientId uint64, clientSecret, refreshToken string) (TokenExchangeResponse, error)
type TokenRevocationBody ¶
type TokenRevocationBody struct { Token string `qs:"token"` TokenTypeHint *TokenTypeHint `qs:"token_type_hint,omitempty"` }
type TokenTypeHint ¶
type TokenTypeHint string
type WebhookBody ¶
type WebhookBody struct { Content string `json:"content,omitempty"` Username string `json:"username,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` Tts bool `json:"tts"` Flags uint `json:"flags,omitempty"` Embeds []*embed.Embed `json:"embeds,omitempty"` AllowedMentions message.AllowedMention `json:"allowed_mentions,omitempty"` Components []component.Component `json:"components,omitempty"` Attachments []request.Attachment `json:"attachments,omitempty"` ThreadName string `json:"thread_name,omitempty"` }
func (WebhookBody) GetAttachments ¶
func (d WebhookBody) GetAttachments() []request.Attachment
type WebhookData ¶
type WebhookEditBody ¶
type WebhookEditBody struct { Content string `json:"content"` Embeds []*embed.Embed `json:"embeds"` AllowedMentions message.AllowedMention `json:"allowed_mentions"` Components []component.Component `json:"components"` Attachments []request.Attachment `json:"attachments"` }
func (WebhookEditBody) GetAttachments ¶
func (d WebhookEditBody) GetAttachments() []request.Attachment
Source Files
¶
Click to show internal directories.
Click to hide internal directories.