Documentation ¶
Index ¶
- Constants
- Variables
- func NewRequest() *request
- type AddGuildMemberParams
- type BaseStickerParams
- type BeginGuildPruneParams
- type Cache
- type CacheError
- type CacheValue
- type ChannelCreateParams
- type Client
- func (c *Client) AddGuildCommand(ctx context.Context, app, guild objects.Snowflake, ...) (*objects.ApplicationCommand, error)
- func (c *Client) AddGuildMember(ctx context.Context, guild, user objects.Snowflake, ...) (*objects.GuildMember, error)
- func (c *Client) AddGuildMemberRole(ctx context.Context, guild, user, role objects.Snowflake, reason string) error
- func (c *Client) AddPinnedMessage(ctx context.Context, channel, message objects.Snowflake) error
- func (c *Client) AddThreadMember(ctx context.Context, thread, user objects.Snowflake) error
- func (c *Client) BatchEditApplicationCommandPermissions(ctx context.Context, app, guild objects.Snowflake, ...) ([]*objects.GuildApplicationCommandPermissions, error)
- func (c *Client) BeginGuildPrune(ctx context.Context, guild objects.Snowflake, params *BeginGuildPruneParams) (int, error)
- func (c *Client) BulkDeleteMessages(ctx context.Context, channel objects.Snowflake, params *DeleteMessagesParams) error
- func (c *Client) BulkOverwriteGlobalCommands(ctx context.Context, app objects.Snowflake, ...) ([]*objects.ApplicationCommand, error)
- func (c *Client) BulkOverwriteGuildCommands(ctx context.Context, application, guild objects.Snowflake, ...) ([]*objects.ApplicationCommand, error)
- func (c *Client) CreateAutoModerationRule(ctx context.Context, guild objects.Snowflake, ...) (*objects.AutoModerationRule, error)
- func (c *Client) CreateBan(ctx context.Context, guild, user objects.Snowflake, ...) error
- func (c *Client) CreateChannelInvite(ctx context.Context, channel objects.Snowflake, params *CreateInviteParams) (*objects.Invite, error)
- func (c *Client) CreateCommand(ctx context.Context, app objects.Snowflake, ...) (*objects.ApplicationCommand, error)
- func (c *Client) CreateDM(ctx context.Context, params *CreateDMParams) (*objects.Channel, error)
- func (c *Client) CreateFollowupMessage(ctx context.Context, applicationID objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) CreateGroupDM(ctx context.Context, params *CreateGroupDMParams) (*objects.Channel, error)
- func (c *Client) CreateGuild(ctx context.Context, params *CreateGuildParams) (*objects.Guild, error)
- func (c *Client) CreateGuildChannel(ctx context.Context, id objects.Snowflake, params *ChannelCreateParams) (*objects.Channel, error)
- func (c *Client) CreateGuildFromTemplate(ctx context.Context, code string, reason string) (*objects.Guild, error)
- func (c *Client) CreateGuildRole(ctx context.Context, guild objects.Snowflake, params *CreateGuildRoleParams) (*objects.Role, error)
- func (c *Client) CreateGuildScheduledEvent(ctx context.Context, guildID objects.Snowflake, ...) (*objects.GuildScheduledEvent, error)
- func (c *Client) CreateGuildSticker(ctx context.Context, guildID objects.Snowflake, ...) (*objects.Sticker, error)
- func (c *Client) CreateGuildTemplate(ctx context.Context, guild objects.Snowflake, ...) (*objects.Template, error)
- func (c *Client) CreateInteractionResponse(ctx context.Context, interactionID objects.Snowflake, token string, ...) error
- func (c *Client) CreateMessage(ctx context.Context, channel objects.Snowflake, params *CreateMessageParams) (*objects.Message, error)
- func (c *Client) CreateReaction(ctx context.Context, channel, message objects.Snowflake, emoji interface{}) error
- func (c *Client) CreateWebhook(ctx context.Context, channel objects.Snowflake, params *CreateWebhookParams) (*objects.Webhook, error)
- func (c *Client) CrossPostMessage(ctx context.Context, channel, message objects.Snowflake) (*objects.Message, error)
- func (c *Client) DeleteAllReactions(ctx context.Context, channel, message objects.Snowflake) error
- func (c *Client) DeleteAutoModerationRule(ctx context.Context, guild objects.Snowflake, id objects.Snowflake, ...) error
- func (c *Client) DeleteChannel(ctx context.Context, id objects.Snowflake, reason string) (*objects.Channel, error)
- func (c *Client) DeleteChannelPermission(ctx context.Context, channel, overwrite objects.Snowflake, reason string) error
- func (c *Client) DeleteCommand(ctx context.Context, app, commandID objects.Snowflake) error
- func (c *Client) DeleteEmojiReactions(ctx context.Context, channel, message objects.Snowflake, emoji interface{}) error
- func (c *Client) DeleteFollowupMessage(ctx context.Context, applicationID objects.Snowflake, token string, ...) error
- func (c *Client) DeleteGuild(ctx context.Context, id objects.Snowflake) error
- func (c *Client) DeleteGuildCommand(ctx context.Context, app, guild, commandID objects.Snowflake) error
- func (c *Client) DeleteGuildIntegration(ctx context.Context, guild, integration objects.Snowflake, reason string) error
- func (c *Client) DeleteGuildRole(ctx context.Context, guild, role objects.Snowflake, reason string) error
- func (c *Client) DeleteGuildScheduledEvent(ctx context.Context, guildID objects.Snowflake, id objects.Snowflake) error
- func (c *Client) DeleteGuildSticker(ctx context.Context, guildID, id objects.Snowflake, reason ...string) error
- func (c *Client) DeleteGuildTemplate(ctx context.Context, guild objects.Snowflake, code, reason string) (*objects.Template, error)
- func (c *Client) DeleteInvite(ctx context.Context, code, reason string) (*objects.Invite, error)
- func (c *Client) DeleteMessage(ctx context.Context, channel, message objects.Snowflake) error
- func (c *Client) DeleteOriginalInteractionResponse(ctx context.Context, applicationID objects.Snowflake, token string) error
- func (c *Client) DeleteOwnReaction(ctx context.Context, channel, message objects.Snowflake, emoji interface{}) error
- func (c *Client) DeletePinnedMessage(ctx context.Context, channel, message objects.Snowflake) error
- func (c *Client) DeleteUserReaction(ctx context.Context, channel, message, user objects.Snowflake, ...) error
- func (c *Client) DeleteWebhook(ctx context.Context, id objects.Snowflake) error
- func (c *Client) DeleteWebhookMessage(ctx context.Context, messageID, webhookID objects.Snowflake, token string) error
- func (c *Client) DeleteWebhookWithToken(ctx context.Context, id objects.Snowflake, token string) error
- func (c *Client) EditApplicationCommandPermissions(ctx context.Context, app, guild, cmd objects.Snowflake, ...) (*objects.GuildApplicationCommandPermissions, error)
- func (c *Client) EditChannelPermissions(ctx context.Context, channel, overwrite objects.Snowflake, ...) error
- func (c *Client) EditFollowupMessage(ctx context.Context, applicationID objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) EditMessage(ctx context.Context, channel, message objects.Snowflake, ...) (*objects.Message, error)
- func (c *Client) EditOriginalInteractionResponse(ctx context.Context, applicationID objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) EditWebhookMessage(ctx context.Context, messageID, webhookID objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) ExecuteWebhook(ctx context.Context, id objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) FollowNewsChannel(ctx context.Context, channel objects.Snowflake) (*objects.FollowedChannel, error)
- func (c *Client) Gateway(ctx context.Context) (*objects.Gateway, error)
- func (c *Client) GatewayBot(ctx context.Context) (*objects.Gateway, error)
- func (c *Client) GetApplicationCommandPermissions(ctx context.Context, app, guild, cmd objects.Snowflake) (*objects.GuildApplicationCommandPermissions, error)
- func (c *Client) GetApplicationRoleConnectionMetadataRecords(ctx context.Context, application objects.Snowflake) ([]*objects.ApplicationRoleConnectionMetadata, error)
- func (c *Client) GetAuditLogs(ctx context.Context, guild objects.Snowflake, params *GetAuditLogParams) (*objects.AuditLog, error)
- func (c *Client) GetAutoModerationRule(ctx context.Context, guild objects.Snowflake, id objects.Snowflake) (*objects.AutoModerationRule, error)
- func (c *Client) GetAutoModerationRules(ctx context.Context, guild objects.Snowflake) ([]*objects.AutoModerationRule, error)
- func (c *Client) GetChannel(ctx context.Context, id objects.Snowflake) (*objects.Channel, error)
- func (c *Client) GetChannelInvites(ctx context.Context, channel objects.Snowflake) ([]*objects.Invite, error)
- func (c *Client) GetChannelMessage(ctx context.Context, channel, message objects.Snowflake) (*objects.Message, error)
- func (c *Client) GetChannelMessages(ctx context.Context, id objects.Snowflake, params *GetChannelMessagesParams) ([]*objects.Message, error)
- func (c *Client) GetChannelWebhooks(ctx context.Context, channel objects.Snowflake) ([]*objects.Webhook, error)
- func (c *Client) GetCommand(ctx context.Context, app, commandID objects.Snowflake) (*objects.ApplicationCommand, error)
- func (c *Client) GetCommands(ctx context.Context, app objects.Snowflake) ([]*objects.ApplicationCommand, error)
- func (c *Client) GetCurrentUser(ctx context.Context) (*objects.User, error)
- func (c *Client) GetCurrentUserGuildMember(ctx context.Context, guild objects.Snowflake) (*objects.GuildMember, error)
- func (c *Client) GetCurrentUserGuilds(ctx context.Context, params *CurrentUserGuildsParams) ([]*objects.Guild, error)
- func (c *Client) GetFollowupMessage(ctx context.Context, applicationID objects.Snowflake, token string, ...) (*objects.Message, error)
- func (c *Client) GetGuild(ctx context.Context, id objects.Snowflake) (*objects.Guild, error)
- func (c *Client) GetGuildApplicationCommandPermissions(ctx context.Context, app, guild objects.Snowflake) ([]*objects.GuildApplicationCommandPermissions, error)
- func (c *Client) GetGuildBan(ctx context.Context, guild, user objects.Snowflake) (*objects.Ban, error)
- func (c *Client) GetGuildBans(ctx context.Context, guild objects.Snowflake) ([]*objects.Ban, error)
- func (c *Client) GetGuildChannels(ctx context.Context, id objects.Snowflake) ([]*objects.Channel, error)
- func (c *Client) GetGuildCommand(ctx context.Context, app, guild, commandID objects.Snowflake) (*objects.ApplicationCommand, error)
- func (c *Client) GetGuildCommands(ctx context.Context, app, guild objects.Snowflake) ([]*objects.ApplicationCommand, error)
- func (c *Client) GetGuildIntegrations(ctx context.Context, guild objects.Snowflake) ([]*objects.Integration, error)
- func (c *Client) GetGuildInvites(ctx context.Context, guild objects.Snowflake) ([]*objects.Invite, error)
- func (c *Client) GetGuildMember(ctx context.Context, guild, user objects.Snowflake) (*objects.GuildMember, error)
- func (c *Client) GetGuildPreview(ctx context.Context, id objects.Snowflake) (*objects.GuildPreview, error)
- func (c *Client) GetGuildPruneCount(ctx context.Context, guild objects.Snowflake, params *GetGuildPruneCountParams) (int, error)
- func (c *Client) GetGuildRoles(ctx context.Context, guild objects.Snowflake) ([]*objects.Role, error)
- func (c *Client) GetGuildScheduledEvent(ctx context.Context, guildID objects.Snowflake, id objects.Snowflake, ...) (*objects.GuildScheduledEvent, error)
- func (c *Client) GetGuildScheduledEventUsers(ctx context.Context, guildID objects.Snowflake, id objects.Snowflake, ...) ([]*objects.GuildScheduledEventUser, error)
- func (c *Client) GetGuildSticker(ctx context.Context, guildID objects.Snowflake, stickerID objects.Snowflake) (*objects.Sticker, error)
- func (c *Client) GetGuildTemplates(ctx context.Context, guild objects.Snowflake) ([]*objects.Template, error)
- func (c *Client) GetGuildVanityURL(ctx context.Context, guild objects.Snowflake) (*objects.Invite, error)
- func (c *Client) GetGuildVoiceRegions(ctx context.Context, guild objects.Snowflake) ([]*objects.VoiceRegion, error)
- func (c *Client) GetGuildWebhooks(ctx context.Context, guild objects.Snowflake) ([]*objects.Webhook, error)
- func (c *Client) GetGuildWelcomeScreen(ctx context.Context, guild objects.Snowflake) (*objects.MembershipScreening, error)
- func (c *Client) GetGuildWidget(ctx context.Context, guild objects.Snowflake) (*objects.GuildWidgetJSON, error)
- func (c *Client) GetGuildWidgetImage(ctx context.Context, guild objects.Snowflake, params *GuildWidgetImageParams) (image.Image, error)
- func (c *Client) GetGuildWidgetSettings(ctx context.Context, guild objects.Snowflake) (*objects.GuildWidget, error)
- func (c *Client) GetInvite(ctx context.Context, code string, params *GetInviteParams) (*objects.Invite, error)
- func (c *Client) GetOriginalInteractionResponse(ctx context.Context, applicationID objects.Snowflake, token string) (*objects.Message, error)
- func (c *Client) GetPinnedMessages(ctx context.Context, channel objects.Snowflake) ([]*objects.Message, error)
- func (c *Client) GetReactions(ctx context.Context, channel, message objects.Snowflake, emoji interface{}, ...) ([]*objects.User, error)
- func (c *Client) GetSticker(ctx context.Context, id objects.Snowflake) (*objects.Sticker, error)
- func (c *Client) GetTemplate(ctx context.Context, code string) (*objects.Template, error)
- func (c *Client) GetThreadMember(ctx context.Context, channel objects.Snowflake, user objects.Snowflake) (*objects.ThreadMember, error)
- func (c *Client) GetUser(ctx context.Context, user objects.Snowflake) (*objects.User, error)
- func (c *Client) GetUserApplicationRoleConnection(ctx context.Context, application objects.Snowflake) (*objects.ApplicationRoleConnection, error)
- func (c *Client) GetUserConnections(ctx context.Context) ([]*objects.Connection, error)
- func (c *Client) GetVoiceRegions(ctx context.Context) ([]*objects.VoiceRegion, error)
- func (c *Client) GetWebhook(ctx context.Context, id objects.Snowflake) (*objects.Webhook, error)
- func (c *Client) GetWebhookMesssage(ctx context.Context, messageID, webhookID objects.Snowflake, token string) (*objects.Message, error)
- func (c *Client) GetWebhookWithToken(ctx context.Context, id objects.Snowflake, token string) (*objects.Webhook, error)
- func (c *Client) JoinThread(ctx context.Context, thread objects.Snowflake) error
- func (c *Client) LeaveGuild(ctx context.Context, guild objects.Snowflake) error
- func (c *Client) LeaveThread(ctx context.Context, thread objects.Snowflake) error
- func (c *Client) ListActiveThreads(ctx context.Context, id objects.Snowflake) ([]*ListThreadsResponse, error)
- func (c *Client) ListGuildMembers(ctx context.Context, guild objects.Snowflake, params *ListGuildMembersParams) ([]*objects.GuildMember, error)
- func (c *Client) ListGuildStickers(ctx context.Context, guildID objects.Snowflake) ([]*objects.Sticker, error)
- func (c *Client) ListJoinedPrivateArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
- func (c *Client) ListNitroStickerPacks(ctx context.Context) ([]*objects.StickerPack, error)
- func (c *Client) ListPrivateArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
- func (c *Client) ListPublicArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
- func (c *Client) ListThreadMembers(ctx context.Context, thread objects.Snowflake) ([]*objects.ThreadMember, error)
- func (c *Client) ModifyAutoModerationRule(ctx context.Context, guild objects.Snowflake, id objects.Snowflake, ...) (*objects.AutoModerationRule, error)
- func (c *Client) ModifyChannel(ctx context.Context, id objects.Snowflake, params *ModifyChannelParams) (*objects.Channel, error)
- func (c *Client) ModifyCurrentUser(ctx context.Context, params *ModifyCurrentUserParams) (*objects.User, error)
- func (c *Client) ModifyCurrentUserNick(ctx context.Context, guild objects.Snowflake, ...) (*ModifyCurrentUserNickParams, error)
- func (c *Client) ModifyGuild(ctx context.Context, id objects.Snowflake, params *ModifyGuildParams) (*objects.Guild, error)
- func (c *Client) ModifyGuildChannelPositions(ctx context.Context, id objects.Snowflake, ...) error
- func (c *Client) ModifyGuildMember(ctx context.Context, guild, member objects.Snowflake, ...) (*objects.GuildMember, error)
- func (c *Client) ModifyGuildRole(ctx context.Context, guild, role objects.Snowflake, ...) (*objects.Role, error)
- func (c *Client) ModifyGuildRolePositions(ctx context.Context, guild objects.Snowflake, ...) ([]*objects.Role, error)
- func (c *Client) ModifyGuildScheduledEvent(ctx context.Context, guildID objects.Snowflake, id objects.Snowflake, ...) (*objects.GuildScheduledEvent, error)
- func (c *Client) ModifyGuildSticker(ctx context.Context, guildID, id objects.Snowflake, params *BaseStickerParams) (*objects.Sticker, error)
- func (c *Client) ModifyGuildTemplate(ctx context.Context, guild objects.Snowflake, code string, ...) (*objects.Template, error)
- func (c *Client) ModifyGuildWelcomeScreen(ctx context.Context, guild objects.Snowflake, ...) (*objects.MembershipScreening, error)
- func (c *Client) ModifyGuildWidget(ctx context.Context, guild objects.Snowflake, params *GuildWidgetParams) (*objects.GuildWidget, error)
- func (c *Client) ModifyWebhook(ctx context.Context, id objects.Snowflake, params *ModifyWebhookParams) (*objects.Webhook, error)
- func (c *Client) ModifyWebhookWithToken(ctx context.Context, id objects.Snowflake, token string, ...) (*objects.Webhook, error)
- func (c *Client) RemoveGuildBan(ctx context.Context, guild, user objects.Snowflake, reason string) error
- func (c *Client) RemoveGuildMember(ctx context.Context, guild, user objects.Snowflake, reason string) error
- func (c *Client) RemoveGuildMemberRole(ctx context.Context, guild, user, role objects.Snowflake, reason string) error
- func (c *Client) RemoveThreadMember(ctx context.Context, thread, user objects.Snowflake) error
- func (c *Client) StartThread(ctx context.Context, channel objects.Snowflake, params *StartThreadParams) (*objects.Channel, error)
- func (c *Client) StartThreadInForumChannel(ctx context.Context, channel objects.Snowflake, ...) (*objects.ForumThreadChannel, error)
- func (c *Client) StartThreadWithMessage(ctx context.Context, channel, message objects.Snowflake, ...) (*objects.Channel, error)
- func (c *Client) StartTyping(ctx context.Context, channel objects.Snowflake) error
- func (c *Client) SyncGuildTemplate(ctx context.Context, guild objects.Snowflake, code string) (*objects.Template, error)
- func (c *Client) UpdateApplicationRoleConnectionMetadataRecords(ctx context.Context, application objects.Snowflake, ...) ([]*objects.ApplicationRoleConnectionMetadata, error)
- func (c *Client) UpdateCommand(ctx context.Context, app, commandID objects.Snowflake, ...) (*objects.ApplicationCommand, error)
- func (c *Client) UpdateGuildCommand(ctx context.Context, app, guild, commandID objects.Snowflake, ...) (*objects.ApplicationCommand, error)
- func (c *Client) UpdateUserApplicationRoleConnection(ctx context.Context, application objects.Snowflake, ...) (*objects.ApplicationRoleConnection, error)
- type Config
- type CreateAutoModerationRuleParams
- type CreateDMParams
- type CreateFollowupMessageParams
- type CreateGroupDMParams
- type CreateGuildBanParams
- type CreateGuildParams
- type CreateGuildRoleParams
- type CreateGuildScheduledEventParams
- type CreateGuildStickerParams
- type CreateGuildTemplateParams
- type CreateInviteParams
- type CreateMessageParams
- type CreateWebhookParams
- type CurrentUserGuildsParams
- type DefaultHTTPClient
- type DeleteMessagesParams
- type DiscordResponse
- type Doer
- type EditChannelParams
- type EditMessageParams
- type EditWebhookMessageParams
- type ErrorREST
- type ExecuteWebhookParams
- type ForumThreadChannel
- type ForumThreadMessageParams
- type GetAuditLogParams
- type GetChannelMessagesParams
- type GetGuildPruneCountParams
- type GetGuildScheduledEventParams
- type GetGuildScheduledEventUsersParams
- type GetInviteParams
- type GetReactionsParams
- type GuildWidgetImageParams
- type GuildWidgetParams
- type HTTPClient
- type LeakyBucketRatelimiter
- type ListGuildMembersParams
- type ListThreadsParams
- type ListThreadsResponse
- type MemoryCache
- type MemoryCacheConfig
- type MemoryConf
- type ModifyAutoModerationRuleParams
- type ModifyChannelParams
- type ModifyChannelPositionParams
- type ModifyCurrentUserNickParams
- type ModifyCurrentUserParams
- type ModifyGuildMemberParams
- type ModifyGuildMembershipScreeningParams
- type ModifyGuildParams
- type ModifyGuildRoleParams
- type ModifyGuildRolePositionsParams
- type ModifyGuildScheduledEventParams
- type ModifyGuildTemplateParams
- type ModifyWebhookParams
- type ModifyWebhookWithTokenParams
- type ProxyClient
- type RESTClient
- type Ratelimiter
- type RedisCache
- type RedisConf
- type RedisRatelimiter
- type RestOption
- func WithCache(cache Cache) RestOption
- func WithLogger(l zerolog.Logger) RestOption
- func WithProxy(p func(*http.Request) (*url.URL, error)) RestOption
- func WithRateLimiter(r Ratelimiter) RestOption
- func WithToken(t objects.TokenType, token string) RestOption
- func WithUserAgent(a *UserAgent) RestOption
- type StartThreadInForumChannelParams
- type StartThreadParams
- type TestHTTPClient
- type UserAgent
Constants ¶
View Source
const ( // Discord API Base URL BaseURL = "https://discord.com/api/v10" XAuditLogReasonHeader = "X-Audit-Log-Reason" JsonContentType = "application/json" // Channels ChannelBaseFmt = BaseURL + "/channels/%d" ChannelMessagesFmt = ChannelBaseFmt + "/messages" ChannelMessageFmt = ChannelMessagesFmt + "/%d" CrosspostMessageFmt = ChannelMessageFmt + "/crosspost" ReactionsBaseFmt = ChannelMessageFmt + "/reactions" ReactionsFmt = ReactionsBaseFmt + "/%s" ReactionFmt = ReactionsFmt + "/%s" ReactionUserFmt = ReactionsFmt + "/%d" BulkDeleteMessagesFmt = ChannelMessagesFmt + "/bulk-delete" ChannelPermissionsFmt = ChannelBaseFmt + "/permissions/%d" ChannelInvitesFmt = ChannelBaseFmt + "/invites" ChannelPinsFmt = ChannelBaseFmt + "/pins" ChannelPinnedFmt = ChannelPinsFmt + "/%d" ChannelFollowersFmt = ChannelBaseFmt + "/followers" ChannelTypingFmt = ChannelBaseFmt + "/typing" ChannelMessageThreadsFmt = ChannelMessageFmt + "/threads" ChannelThreadsFmt = ChannelBaseFmt + "/threads" ChannelThreadMembersFmt = ChannelBaseFmt + "/thread-members" ChannelThreadMembersUserFmt = ChannelThreadMembersFmt + "/%d" ChannelThreadMembersMeFmt = ChannelThreadMembersFmt + "/@me" ChannelThreadsActiveFmt = ChannelThreadsFmt + "/active" ChannelThreadsArchivedFmt = ChannelThreadsFmt + "/archived" ChannelThreadsArchivedPublicFmt = ChannelThreadsArchivedFmt + "/public" ChannelThreadsArchivedPrivateFmt = ChannelThreadsArchivedFmt + "/private" ChannelUsersMeThreadsArchivedFmt = ChannelBaseFmt + "/users/@me/threads/archived/private" // Commands ApplicationFmt = BaseURL + "/applications" GlobalApplicationsFmt = ApplicationFmt + "/%d/commands" GlobalApplicationsUpdateFmt = GlobalApplicationsFmt + "/%d" GuildApplicationsFmt = ApplicationFmt + "/%d/guilds/%d/commands" GuildApplicationsUpdateFmt = GuildApplicationsFmt + "/%d" // Guilds GuildBaseFmt = BaseURL + "/guilds/%d" GuildCreateFmt = BaseURL + "/guilds" GuildChannelsFmt = GuildBaseFmt + "/channels" GuildPreviewFmt = GuildBaseFmt + "/preview" GuildAuditLogsFmt = GuildBaseFmt + "/audit-logs" GuildMembersFmt = GuildBaseFmt + "/members" GuildMemberFmt = GuildMembersFmt + "/%d" GuildMemberEditCurrentUserNickFmt = GuildMembersFmt + "/@me/nick" GuildBansFmt = GuildBaseFmt + "/bans" GuildBanUserFmt = GuildBansFmt + "/%d" GuildPruneFmt = GuildBaseFmt + "/prune" GuildVoiceRegionsFmt = GuildBaseFmt + "/regions" GuildInvitesFmt = GuildBaseFmt + "/invites" GuildWidgetFmt = GuildBaseFmt + "/widget" GuildWidgetJSONFmt = GuildWidgetFmt + ".json" GuildVanityURLFmt = GuildBaseFmt + "/vanity-url" GuildWidgetImageFmt = GuildWidgetFmt + ".png" GuildMembershipScreeningFmt = GuildBaseFmt + "/member-verification" GuildThreadsFmt = GuildBaseFmt + "/threads/active" // Scheduled Events GuildScheduledEventBaseFmt = GuildBaseFmt + "/scheduled-events" GuildScheduledEventFmt = GuildScheduledEventBaseFmt + "/%d" GuildScheduledEventUsersFmt = GuildScheduledEventFmt + "/users" // Roles GuildMemberRoleFmt = GuildBaseFmt + "/members/%d/roles/%d" GuildRolesFmt = GuildBaseFmt + "/roles" GuildRoleFmt = GuildRolesFmt + "/%d" // Integrations IntegrationsBaseFmt = GuildBaseFmt + "/integrations" IntegrationBaseFmt = IntegrationsBaseFmt + "/%d" IntegrationSync = IntegrationBaseFmt + "/sync" // Invites InviteFmt = BaseURL + "/invites/%s" // Templates TemplateFmt = BaseURL + "/guilds/templates/%s" GuildTemplateFmt = BaseURL + "/guilds/%d/templates" GuildTemplatesFmt = GuildTemplateFmt + "/%s" // Stickers StickerFmt = BaseURL + "/stickers/%d" NitroStickerFmt = BaseURL + "/sticker-packs" GuildStickersFmt = GuildBaseFmt + "/stickers" GuildStickerFmt = GuildStickersFmt + "/%d" // Users UsersFmt = BaseURL + "/users" UsersMeFmt = UsersFmt + "/@me" UsersMeGuilds = UsersMeFmt + "/guilds" UsersMeGuild = UsersMeGuilds + "/%d" UsersMeGuildMember = UsersMeGuild + "/member" UsersMeChannels = UsersMeFmt + "/channels" UserFmt = UsersFmt + "/%d" UserConnections = UsersMeFmt + "/connections" // Voice VoiceRegions = BaseURL + "/voice/regions" // Webhooks ChannelWebhookFmt = BaseURL + "/channels/%d/webhooks" GuildWebhookFmt = BaseURL + "/guilds/%d/webhooks" WebhookFmt = BaseURL + "/webhooks/%d" WebhookWithTokenFmt = WebhookFmt + "/%s" WebhookMessageFmt = WebhookWithTokenFmt + "/messages/%d" // Interactions CreateInteractionResponseFmt = BaseURL + "/interactions/%d/%s/callback" OriginalInteractionResponseFmt = WebhookWithTokenFmt + "/messages/@original" // Permissions GuildApplicationCommandsPermissionsFmt = GuildApplicationsFmt + "/permissions" GuildApplicationCommandPermissionsFmt = GuildApplicationsFmt + "/%d/permissions" // Gateway GatewayFmt = BaseURL + "/gateway" GatewayBotFmt = GatewayFmt + "/bot" // AutoModeration AutoModerationRules = GuildBaseFmt + "/auto-moderation/rules" AutoModerationRule = AutoModerationRules + "/%d" // ApplicationRole ApplicationRoleConnection = ApplicationFmt + "/%d/role-connections/metadata" UserApplicationRoleConnection = UsersMeFmt + "/applications/%d/role-connection" )
Variables ¶
View Source
var ErrMaxRetriesExceeded = errors.New("max retries exceeded")
Functions ¶
func NewRequest ¶
func NewRequest() *request
Types ¶
type AddGuildMemberParams ¶
type BaseStickerParams ¶
type BeginGuildPruneParams ¶
type Cache ¶
type Cache interface { Get(ctx context.Context, key string) (*DiscordResponse, error) Put(ctx context.Context, key string, value *DiscordResponse) error }
type CacheError ¶
type CacheError struct {
// contains filtered or unexported fields
}
func (*CacheError) Error ¶
func (c *CacheError) Error() string
type CacheValue ¶
type CacheValue struct {
// contains filtered or unexported fields
}
type ChannelCreateParams ¶
type ChannelCreateParams struct { Name string `json:"name"` Type objects.ChannelType `json:"type,omitempty"` 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 []*objects.PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID objects.Snowflake `json:"parent_id,omitempty"` NSFW bool `json:"nsfw,omitempty"` Reason string `json:"-"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddGuildCommand ¶
func (c *Client) AddGuildCommand(ctx context.Context, app, guild objects.Snowflake, command *objects.ApplicationCommand) (*objects.ApplicationCommand, error)
func (*Client) AddGuildMember ¶
func (c *Client) AddGuildMember(ctx context.Context, guild, user objects.Snowflake, params *AddGuildMemberParams) (*objects.GuildMember, error)
func (*Client) AddGuildMemberRole ¶
func (*Client) AddPinnedMessage ¶
func (*Client) AddThreadMember ¶
func (*Client) BatchEditApplicationCommandPermissions ¶
func (c *Client) BatchEditApplicationCommandPermissions(ctx context.Context, app, guild objects.Snowflake, permissions []*objects.GuildApplicationCommandPermissions) ([]*objects.GuildApplicationCommandPermissions, error)
func (*Client) BeginGuildPrune ¶
func (*Client) BulkDeleteMessages ¶
func (*Client) BulkOverwriteGlobalCommands ¶
func (c *Client) BulkOverwriteGlobalCommands(ctx context.Context, app objects.Snowflake, commands []*objects.ApplicationCommand) ([]*objects.ApplicationCommand, error)
func (*Client) BulkOverwriteGuildCommands ¶
func (c *Client) BulkOverwriteGuildCommands(ctx context.Context, application, guild objects.Snowflake, commands []*objects.ApplicationCommand) ([]*objects.ApplicationCommand, error)
func (*Client) CreateAutoModerationRule ¶
func (c *Client) CreateAutoModerationRule(ctx context.Context, guild objects.Snowflake, params *CreateAutoModerationRuleParams) (*objects.AutoModerationRule, error)
func (*Client) CreateChannelInvite ¶
func (*Client) CreateCommand ¶
func (c *Client) CreateCommand(ctx context.Context, app objects.Snowflake, command *objects.ApplicationCommand) (*objects.ApplicationCommand, error)
func (*Client) CreateFollowupMessage ¶
func (*Client) CreateGroupDM ¶
func (*Client) CreateGuild ¶
func (*Client) CreateGuildChannel ¶
func (*Client) CreateGuildFromTemplate ¶
func (*Client) CreateGuildRole ¶
func (*Client) CreateGuildScheduledEvent ¶
func (c *Client) CreateGuildScheduledEvent(ctx context.Context, guildID objects.Snowflake, params *CreateGuildScheduledEventParams) (*objects.GuildScheduledEvent, error)
func (*Client) CreateGuildSticker ¶
func (*Client) CreateGuildTemplate ¶
func (*Client) CreateInteractionResponse ¶
func (*Client) CreateMessage ¶
func (*Client) CreateReaction ¶
func (*Client) CreateWebhook ¶
func (*Client) CrossPostMessage ¶
func (*Client) DeleteAllReactions ¶
func (*Client) DeleteAutoModerationRule ¶
func (*Client) DeleteChannel ¶
func (*Client) DeleteChannelPermission ¶
func (*Client) DeleteCommand ¶
func (*Client) DeleteEmojiReactions ¶
func (*Client) DeleteFollowupMessage ¶
func (*Client) DeleteGuild ¶
func (*Client) DeleteGuildCommand ¶
func (*Client) DeleteGuildIntegration ¶
func (*Client) DeleteGuildRole ¶
func (*Client) DeleteGuildScheduledEvent ¶
func (*Client) DeleteGuildSticker ¶
func (*Client) DeleteGuildTemplate ¶
func (*Client) DeleteInvite ¶
func (*Client) DeleteMessage ¶
func (*Client) DeleteOriginalInteractionResponse ¶
func (*Client) DeleteOwnReaction ¶
func (*Client) DeletePinnedMessage ¶
func (*Client) DeleteUserReaction ¶
func (*Client) DeleteWebhook ¶
func (*Client) DeleteWebhookMessage ¶
func (*Client) DeleteWebhookWithToken ¶
func (*Client) EditApplicationCommandPermissions ¶
func (c *Client) EditApplicationCommandPermissions(ctx context.Context, app, guild, cmd objects.Snowflake, permissions []*objects.ApplicationCommandPermissions) (*objects.GuildApplicationCommandPermissions, error)
func (*Client) EditChannelPermissions ¶
func (*Client) EditFollowupMessage ¶
func (*Client) EditMessage ¶
func (*Client) EditOriginalInteractionResponse ¶
func (*Client) EditWebhookMessage ¶
func (*Client) ExecuteWebhook ¶
func (*Client) FollowNewsChannel ¶
func (*Client) GatewayBot ¶
func (*Client) GetApplicationCommandPermissions ¶
func (*Client) GetApplicationRoleConnectionMetadataRecords ¶ added in v0.0.4
func (*Client) GetAuditLogs ¶
func (*Client) GetAutoModerationRule ¶
func (*Client) GetAutoModerationRules ¶
func (*Client) GetChannel ¶
func (*Client) GetChannelInvites ¶
func (*Client) GetChannelMessage ¶
func (*Client) GetChannelMessages ¶
func (*Client) GetChannelWebhooks ¶
func (*Client) GetCommand ¶
func (*Client) GetCommands ¶
func (*Client) GetCurrentUser ¶
func (*Client) GetCurrentUserGuildMember ¶
func (*Client) GetCurrentUserGuilds ¶
func (*Client) GetFollowupMessage ¶
func (*Client) GetGuildApplicationCommandPermissions ¶
func (*Client) GetGuildBan ¶
func (*Client) GetGuildBans ¶
func (*Client) GetGuildChannels ¶
func (*Client) GetGuildCommand ¶
func (*Client) GetGuildCommands ¶
func (*Client) GetGuildIntegrations ¶
func (*Client) GetGuildInvites ¶
func (*Client) GetGuildMember ¶
func (*Client) GetGuildPreview ¶
func (*Client) GetGuildPruneCount ¶
func (*Client) GetGuildRoles ¶
func (*Client) GetGuildScheduledEvent ¶
func (*Client) GetGuildScheduledEventUsers ¶
func (*Client) GetGuildSticker ¶
func (*Client) GetGuildTemplates ¶
func (*Client) GetGuildVanityURL ¶
func (*Client) GetGuildVoiceRegions ¶
func (*Client) GetGuildWebhooks ¶
func (*Client) GetGuildWelcomeScreen ¶
func (*Client) GetGuildWidget ¶
func (*Client) GetGuildWidgetImage ¶
func (*Client) GetGuildWidgetSettings ¶
func (*Client) GetOriginalInteractionResponse ¶
func (*Client) GetPinnedMessages ¶
func (*Client) GetReactions ¶
func (*Client) GetSticker ¶
func (*Client) GetTemplate ¶
func (*Client) GetThreadMember ¶
func (*Client) GetUserApplicationRoleConnection ¶ added in v0.0.4
func (*Client) GetUserConnections ¶
func (*Client) GetVoiceRegions ¶
func (*Client) GetWebhook ¶
func (*Client) GetWebhookMesssage ¶
func (*Client) GetWebhookWithToken ¶
func (*Client) JoinThread ¶
func (*Client) LeaveGuild ¶
func (*Client) LeaveThread ¶
func (*Client) ListActiveThreads ¶
func (*Client) ListGuildMembers ¶
func (c *Client) ListGuildMembers(ctx context.Context, guild objects.Snowflake, params *ListGuildMembersParams) ([]*objects.GuildMember, error)
func (*Client) ListGuildStickers ¶
func (*Client) ListJoinedPrivateArchivedThreads ¶
func (c *Client) ListJoinedPrivateArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
func (*Client) ListNitroStickerPacks ¶
func (*Client) ListPrivateArchivedThreads ¶
func (c *Client) ListPrivateArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
func (*Client) ListPublicArchivedThreads ¶
func (c *Client) ListPublicArchivedThreads(ctx context.Context, channel objects.Snowflake, params ...*ListThreadsParams) (*ListThreadsResponse, error)
func (*Client) ListThreadMembers ¶
func (*Client) ModifyAutoModerationRule ¶
func (*Client) ModifyChannel ¶
func (*Client) ModifyCurrentUser ¶
func (*Client) ModifyCurrentUserNick ¶
func (c *Client) ModifyCurrentUserNick(ctx context.Context, guild objects.Snowflake, params *ModifyCurrentUserNickParams) (*ModifyCurrentUserNickParams, error)
func (*Client) ModifyGuild ¶
func (*Client) ModifyGuildChannelPositions ¶
func (*Client) ModifyGuildMember ¶
func (c *Client) ModifyGuildMember(ctx context.Context, guild, member objects.Snowflake, params *ModifyGuildMemberParams) (*objects.GuildMember, error)
func (*Client) ModifyGuildRole ¶
func (*Client) ModifyGuildRolePositions ¶
func (*Client) ModifyGuildScheduledEvent ¶
func (*Client) ModifyGuildSticker ¶
func (*Client) ModifyGuildTemplate ¶
func (*Client) ModifyGuildWelcomeScreen ¶
func (c *Client) ModifyGuildWelcomeScreen(ctx context.Context, guild objects.Snowflake, params *ModifyGuildMembershipScreeningParams) (*objects.MembershipScreening, error)
func (*Client) ModifyGuildWidget ¶
func (c *Client) ModifyGuildWidget(ctx context.Context, guild objects.Snowflake, params *GuildWidgetParams) (*objects.GuildWidget, error)
func (*Client) ModifyWebhook ¶
func (*Client) ModifyWebhookWithToken ¶
func (*Client) RemoveGuildBan ¶
func (*Client) RemoveGuildMember ¶
func (*Client) RemoveGuildMemberRole ¶
func (*Client) RemoveThreadMember ¶
func (*Client) StartThread ¶
func (*Client) StartThreadInForumChannel ¶
func (c *Client) StartThreadInForumChannel(ctx context.Context, channel objects.Snowflake, params *StartThreadInForumChannelParams) (*objects.ForumThreadChannel, error)
func (*Client) StartThreadWithMessage ¶
func (*Client) StartTyping ¶
func (*Client) SyncGuildTemplate ¶
func (*Client) UpdateApplicationRoleConnectionMetadataRecords ¶ added in v0.0.4
func (c *Client) UpdateApplicationRoleConnectionMetadataRecords( ctx context.Context, application objects.Snowflake, params []*objects.ApplicationRoleConnectionMetadata, ) ([]*objects.ApplicationRoleConnectionMetadata, error)
func (*Client) UpdateCommand ¶
func (c *Client) UpdateCommand(ctx context.Context, app, commandID objects.Snowflake, command *objects.ApplicationCommand) (*objects.ApplicationCommand, error)
func (*Client) UpdateGuildCommand ¶
func (c *Client) UpdateGuildCommand(ctx context.Context, app, guild, commandID objects.Snowflake, command *objects.ApplicationCommand) (*objects.ApplicationCommand, error)
func (*Client) UpdateUserApplicationRoleConnection ¶ added in v0.0.4
func (c *Client) UpdateUserApplicationRoleConnection( ctx context.Context, application objects.Snowflake, params *objects.ApplicationRoleConnection, ) (*objects.ApplicationRoleConnection, error)
type CreateAutoModerationRuleParams ¶
type CreateAutoModerationRuleParams struct { Name string `json:"name"` EventType objects.AutoModerationEventType `json:"event_type"` TriggerType objects.AutoModerationTriggerType `json:"trigger_type"` TriggerMetadata *objects.AutoModerationTriggerMetadata `json:"trigger_metadata,omitempty"` Actions []objects.AutoModerationAction `json:"actions"` Enabled bool `json:"enabled"` ExemptRoles []objects.Snowflake `json:"exempt_roles,omitempty"` ExemptChannels []objects.Snowflake `json:"exempt_channels,omitempty"` Reason string `json:"-"` }
type CreateDMParams ¶
type CreateFollowupMessageParams ¶
type CreateFollowupMessageParams struct { Content string `json:"content,omitempty" url:"-"` TTS bool `json:"tts,omitempty" url:"-"` Files []*objects.DiscordFile `json:"-" url:"-"` Embeds []*objects.Embed `json:"embeds,omitempty" url:"-"` AllowedMentions *objects.AllowedMentions `json:"allowed_mentions,omitempty" url:"-"` Components []*objects.Component `json:"components,omitempty" url:"-"` Attachments []*objects.Attachment `json:"attachments,omitempty" url:"-"` Flags objects.MessageFlag `json:"flags,omitempty" url:"-"` }
type CreateGroupDMParams ¶
type CreateGuildBanParams ¶
type CreateGuildParams ¶
type CreateGuildParams struct { Name string `json:"name"` Region string `json:"region,omitempty"` Icon string `json:"icon,omitempty"` VerificationLevel *objects.VerificationLevel `json:"verification_level,omitempty"` DefaultMessageNotifications *objects.MessageNotificationsLevel `json:"default_message_notifications,omitempty"` ExplicitContentFilter *objects.ExplicitContentFilterLevel `json:"explicit_content_filter,omitempty"` Roles []*objects.Role `json:"roles,omitempty"` Channels []*objects.Channel `json:"channels,omitempty"` AFKChannelID objects.Snowflake `json:"afk_channel_id,omitempty"` AFKTimeout int64 `json:"afk_timeout,omitempty"` SystemChannelID objects.Snowflake `json:"system_channel_id,omitempty"` Reason string `json:"-"` }
type CreateGuildRoleParams ¶
type CreateGuildRoleParams struct { Name string `json:"name,omitempty"` Permissions permissions.PermissionBit `json:"permissions,omitempty"` Color int `json:"color,omitempty"` Hoist bool `json:"hoist,omitempty"` Mentionable bool `json:"mentionable,omitempty"` Reason string `json:"-"` }
type CreateGuildScheduledEventParams ¶
type CreateGuildScheduledEventParams struct { ChannelID *objects.Snowflake `json:"channel_id,omitempty"` EntityMetadata *objects.GuildScheduledEventEntityMetadata `json:"entity_metadata,omitempty"` Name string `json:"name"` PrivacyLevel objects.PrivacyLevel `json:"privacy_level"` ScheduledStartTime objects.Time `json:"scheduled_start_time"` ScheduledEndTime *objects.Time `json:"scheduled_end_time,omitempty"` Description string `json:"description,omitempty"` EntityType objects.GuildScheduledEventEntityType `json:"entity_type"` Image []byte `json:"image,omitempty"` Reason string `json:"-"` }
type CreateGuildStickerParams ¶
type CreateGuildStickerParams struct { BaseStickerParams File io.Reader }
type CreateInviteParams ¶
type CreateInviteParams struct { MaxAge int64 `json:"max_age,omitempty"` MaxUses int64 `json:"max_uses,omitempty"` Temporary bool `json:"temporary,,omitempty"` Unique bool `json:"unique,omitempty"` TargetUser objects.Snowflake `json:"target_user_id,omitempty"` TargetType objects.InviteTargetType `json:"target_type,omitempty"` TargetApplication objects.Snowflake `json:"target_application_id,omitempty"` Reason string `json:"-"` }
type CreateMessageParams ¶
type CreateMessageParams struct { Content string `json:"content,omitempty"` TTS bool `json:"tts,omitempty"` Embeds []*objects.Embed `json:"embeds,omitempty"` AllowedMentions *objects.AllowedMentions `json:"allowed_mentions,omitempty"` MessageReference *objects.MessageReference `json:"message_reference,omitempty"` Components []*objects.Component `json:"components,omitempty"` StickerIDs []objects.Snowflake `json:"sticker_ids,omitempty"` Attachments []*objects.Attachment `json:"attachments,omitempty"` Flags objects.MessageFlag `json:"flags,omitempty"` Files []*objects.DiscordFile `json:"-"` }
type CreateWebhookParams ¶
type CurrentUserGuildsParams ¶
type DefaultHTTPClient ¶
type DefaultHTTPClient struct {
// contains filtered or unexported fields
}
func (*DefaultHTTPClient) Request ¶
func (c *DefaultHTTPClient) Request(req *request) (*DiscordResponse, error)
type DeleteMessagesParams ¶
type DiscordResponse ¶
func (*DiscordResponse) JSON ¶
func (r *DiscordResponse) JSON(v interface{}) error
type EditChannelParams ¶
type EditChannelParams struct { Allow permissions.PermissionBit `json:"allow"` Deny permissions.PermissionBit `json:"deny"` Type int `json:"type"` Reason string `json:"-"` }
type EditMessageParams ¶
type EditMessageParams struct { Content string `json:"content"` Embed *objects.Embed `json:"embed"` Flags objects.MessageFlag `json:"flags,omitempty"` AllowedMentions *objects.AllowedMentions `json:"allowed_mentions,omitempty"` Components []*objects.Component `json:"components"` }
type ExecuteWebhookParams ¶
type ExecuteWebhookParams struct { Wait bool `json:"-" url:"wait"` ThreadID objects.Snowflake `json:"-" url:"thread_id,omitempty"` Content string `json:"content,omitempty" url:"-"` Username string `json:"username,omitempty" url:"-"` AvatarURL string `json:"avatar_url,omitempty" url:"-"` TTS bool `json:"tts,omitempty" url:"-"` Files []*objects.DiscordFile `json:"-" url:"-"` Embeds []*objects.Embed `json:"embeds,omitempty" url:"-"` AllowedMentions *objects.AllowedMentions `json:"allowed_mentions,omitempty" url:"-"` Components []*objects.Component `json:"components,omitempty" url:"-"` Attachments []*objects.Attachment `json:"attachments,omitempty" url:"-"` Flags objects.MessageFlag `json:"flags,omitempty" url:"-"` }
type ForumThreadChannel ¶
type ForumThreadMessageParams ¶
type ForumThreadMessageParams struct { Content string `json:"content,omitempty"` Embeds []*objects.Embed `json:"embeds,omitempty"` AllowedMentions objects.AllowedMentions `json:"allowed_mentions,omitempty"` Components []*objects.Component `json:"components,omitempty"` StickerIDs []objects.Snowflake `json:"sticker_ids,omitempty"` Files []*objects.DiscordFile `json:"files,omitempty"` Attachments []*objects.Attachment `json:"attachments,omitempty"` Flags objects.MessageFlag `json:"flags,omitempty"` }
type GetAuditLogParams ¶
type GetGuildScheduledEventParams ¶
type GetGuildScheduledEventParams struct {
WithUserCount bool `url:"with_user_count,omitempty"`
}
type GetInviteParams ¶
type GetInviteParams struct {
WithCounts bool `url:"with_counts"`
}
type GetReactionsParams ¶
type GuildWidgetImageParams ¶
type GuildWidgetImageParams struct {
Style string
}
type GuildWidgetParams ¶
type HTTPClient ¶
type HTTPClient interface {
Request(req *request) (*DiscordResponse, error)
}
type LeakyBucketRatelimiter ¶
func NewLeakyBucketRatelimiter ¶
func NewLeakyBucketRatelimiter() *LeakyBucketRatelimiter
NewLeakyBucketRatelimiter creates a new LeakyBucketRatelimiter based on rate.Limiter
func NewMemoryRatelimiter ¶
func NewMemoryRatelimiter(conf *MemoryConf) *LeakyBucketRatelimiter
NewMemoryRatelimiter returns a *LeakyBucketRatelimiter, but is kept for backward compatibility
func (*LeakyBucketRatelimiter) GetBucket ¶
func (c *LeakyBucketRatelimiter) GetBucket(path string) (*rate.Limiter, error)
func (*LeakyBucketRatelimiter) Request ¶
func (c *LeakyBucketRatelimiter) Request(httpClient HTTPClient, req *request) (*DiscordResponse, error)
type ListGuildMembersParams ¶
type ListThreadsParams ¶
type ListThreadsResponse ¶
type ListThreadsResponse struct { Threads []*objects.Channel `json:"threads"` Members []*objects.ThreadMember `json:"members"` HasMore bool `json:"has_more"` }
type MemoryCache ¶
Reference in-memory implementation
func NewMemoryCache ¶
func NewMemoryCache() *MemoryCache
func (*MemoryCache) Get ¶
func (m *MemoryCache) Get(ctx context.Context, key string) (*DiscordResponse, error)
func (*MemoryCache) Put ¶
func (m *MemoryCache) Put(ctx context.Context, key string, resp *DiscordResponse) error
type MemoryCacheConfig ¶
type MemoryCacheConfig struct {
// contains filtered or unexported fields
}
type MemoryConf ¶
type MemoryConf struct {
MaxRetries int
}
type ModifyAutoModerationRuleParams ¶
type ModifyAutoModerationRuleParams struct { Name string `json:"name"` EventType objects.AutoModerationEventType `json:"event_type"` TriggerMetadata *objects.AutoModerationTriggerMetadata `json:"trigger_metadata,omitempty"` Actions []objects.AutoModerationAction `json:"actions"` Enabled bool `json:"enabled"` ExemptRoles []objects.Snowflake `json:"exempt_roles,omitempty"` ExemptChannels []objects.Snowflake `json:"exempt_channels,omitempty"` Reason string `json:"-"` }
type ModifyChannelParams ¶
type ModifyChannelParams struct { Name *string `json:"name,omitempty"` Type *objects.ChannelType `json:"type,omitempty"` Position *int64 `json:"position,omitempty"` Topic *string `json:"topic,omitempty"` NSFW *bool `json:"nsfw,omitempty"` RateLimitPerUser *int64 `json:"rate_limit_per_user,omitempty"` Bitrate *int64 `json:"bitrate,omitempty"` UserLimit *int64 `json:"user_limit,omitempty"` PermissionOverwrites *[]objects.PermissionOverwrite `json:"permission_overwrites,omitempty"` Parent *objects.Snowflake `json:"parent_id,omitempty"` Reason string `json:"-"` }
type ModifyCurrentUserParams ¶
type ModifyGuildMemberParams ¶
type ModifyGuildMemberParams struct { Nick *string `json:"nick,omitempty"` Roles *[]objects.Snowflake `json:"roles,omitempty"` Mute *bool `json:"mute,omitempty"` Deaf *bool `json:"deaf,omitempty"` ChannelID *objects.Snowflake `json:"channel_id,omitempty"` CommunicationDisabledUntil *objects.Time `json:"communication_disabled_until,omitempty"` Reason string `json:"-"` }
type ModifyGuildParams ¶
type ModifyGuildParams struct { Name string `json:"name,omitempty"` Region string `json:"region,omitempty"` VerificationLevel *objects.VerificationLevel `json:"verification_level,omitempty"` DefaultMessageNotifications *objects.MessageNotificationsLevel `json:"default_message_notifications,omitempty"` ExplicitContentFilter *objects.ExplicitContentFilterLevel `json:"explicit_content_filter,omitempty"` AFKChannelID objects.Snowflake `json:"afk_channel_id,omitempty"` AFKTimeout int64 `json:"afk_timeout,omitempty"` Icon string `json:"icon,omitempty"` OwnerID objects.Snowflake `json:"owner_id,omitempty"` Splash string `json:"splash,omitempty"` Banner string `json:"banner,omitempty"` SystemChannelID objects.Snowflake `json:"system_channel_id,omitempty"` RulesChannelID objects.Snowflake `json:"rules_channel_id,omitempty"` PublicUpdatesChannelID objects.Snowflake `json:"public_updates_channel_id,omitempty"` PreferredLocale string `json:"preferred_locale,omitempty"` Reason string `json:"-"` }
type ModifyGuildRoleParams ¶
type ModifyGuildRoleParams struct { Name string `json:"name,omitempty"` Permissions permissions.PermissionBit `json:"permissions,omitempty"` Color int `json:"color,omitempty"` Hoist *bool `json:"hoist,omitempty"` Mentionable *bool `json:"mentionable,omitempty"` Reason string `json:"-"` }
type ModifyGuildScheduledEventParams ¶
type ModifyGuildScheduledEventParams struct { CreateGuildScheduledEventParams Status objects.GuildScheduledEventStatus `json:"status,omitempty"` }
type ModifyWebhookParams ¶
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
func NewProxyClient ¶
type RESTClient ¶
type RESTClient interface { AddGuildCommand(context.Context, objects.Snowflake, objects.Snowflake, *objects.ApplicationCommand) (*objects.ApplicationCommand, error) AddGuildMember(context.Context, objects.Snowflake, objects.Snowflake, *AddGuildMemberParams) (*objects.GuildMember, error) AddGuildMemberRole(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake, string) error AddPinnedMessage(context.Context, objects.Snowflake, objects.Snowflake) error AddThreadMember(context.Context, objects.Snowflake, objects.Snowflake) error BatchEditApplicationCommandPermissions(context.Context, objects.Snowflake, objects.Snowflake, []*objects.GuildApplicationCommandPermissions) ([]*objects.GuildApplicationCommandPermissions, error) BeginGuildPrune(context.Context, objects.Snowflake, *BeginGuildPruneParams) (int, error) BulkDeleteMessages(context.Context, objects.Snowflake, *DeleteMessagesParams) error BulkOverwriteGlobalCommands(context.Context, objects.Snowflake, []*objects.ApplicationCommand) ([]*objects.ApplicationCommand, error) BulkOverwriteGuildCommands(context.Context, objects.Snowflake, objects.Snowflake, []*objects.ApplicationCommand) ([]*objects.ApplicationCommand, error) CreateAutoModerationRule(context.Context, objects.Snowflake, *CreateAutoModerationRuleParams) (*objects.AutoModerationRule, error) CreateBan(context.Context, objects.Snowflake, objects.Snowflake, *CreateGuildBanParams) error CreateChannelInvite(context.Context, objects.Snowflake, *CreateInviteParams) (*objects.Invite, error) CreateCommand(context.Context, objects.Snowflake, *objects.ApplicationCommand) (*objects.ApplicationCommand, error) CreateDM(context.Context, *CreateDMParams) (*objects.Channel, error) CreateFollowupMessage(context.Context, objects.Snowflake, string, *CreateFollowupMessageParams) (*objects.Message, error) CreateGroupDM(context.Context, *CreateGroupDMParams) (*objects.Channel, error) CreateGuild(context.Context, *CreateGuildParams) (*objects.Guild, error) CreateGuildChannel(context.Context, objects.Snowflake, *ChannelCreateParams) (*objects.Channel, error) CreateGuildFromTemplate(context.Context, string, string) (*objects.Guild, error) CreateGuildRole(context.Context, objects.Snowflake, *CreateGuildRoleParams) (*objects.Role, error) CreateGuildScheduledEvent(context.Context, objects.Snowflake, *CreateGuildScheduledEventParams) (*objects.GuildScheduledEvent, error) CreateGuildSticker(context.Context, objects.Snowflake, *CreateGuildStickerParams) (*objects.Sticker, error) CreateGuildTemplate(context.Context, objects.Snowflake, *CreateGuildTemplateParams) (*objects.Template, error) CreateInteractionResponse(context.Context, objects.Snowflake, string, *objects.InteractionResponse) error CreateMessage(context.Context, objects.Snowflake, *CreateMessageParams) (*objects.Message, error) CreateReaction(context.Context, objects.Snowflake, objects.Snowflake, interface{}) error CreateWebhook(context.Context, objects.Snowflake, *CreateWebhookParams) (*objects.Webhook, error) CrossPostMessage(context.Context, objects.Snowflake, objects.Snowflake) (*objects.Message, error) DeleteAllReactions(context.Context, objects.Snowflake, objects.Snowflake) error DeleteAutoModerationRule(context.Context, objects.Snowflake, objects.Snowflake, ...string) error DeleteChannel(context.Context, objects.Snowflake, string) (*objects.Channel, error) DeleteChannelPermission(context.Context, objects.Snowflake, objects.Snowflake, string) error DeleteCommand(context.Context, objects.Snowflake, objects.Snowflake) error DeleteEmojiReactions(context.Context, objects.Snowflake, objects.Snowflake, interface{}) error DeleteFollowupMessage(context.Context, objects.Snowflake, string, objects.Snowflake) error DeleteGuild(context.Context, objects.Snowflake) error DeleteGuildCommand(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake) error DeleteGuildIntegration(context.Context, objects.Snowflake, objects.Snowflake, string) error DeleteGuildRole(context.Context, objects.Snowflake, objects.Snowflake, string) error DeleteGuildScheduledEvent(context.Context, objects.Snowflake, objects.Snowflake) error DeleteGuildSticker(context.Context, objects.Snowflake, objects.Snowflake, ...string) error DeleteGuildTemplate(context.Context, objects.Snowflake, string, string) (*objects.Template, error) DeleteInvite(context.Context, string, string) (*objects.Invite, error) DeleteMessage(context.Context, objects.Snowflake, objects.Snowflake) error DeleteOriginalInteractionResponse(context.Context, objects.Snowflake, string) error DeleteOwnReaction(context.Context, objects.Snowflake, objects.Snowflake, interface{}) error DeletePinnedMessage(context.Context, objects.Snowflake, objects.Snowflake) error DeleteUserReaction(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake, interface{}) error DeleteWebhook(context.Context, objects.Snowflake) error DeleteWebhookMessage(context.Context, objects.Snowflake, objects.Snowflake, string) error DeleteWebhookWithToken(context.Context, objects.Snowflake, string) error EditApplicationCommandPermissions(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake, []*objects.ApplicationCommandPermissions) (*objects.GuildApplicationCommandPermissions, error) EditChannelPermissions(context.Context, objects.Snowflake, objects.Snowflake, *EditChannelParams) error EditFollowupMessage(context.Context, objects.Snowflake, string, objects.Snowflake, *EditWebhookMessageParams) (*objects.Message, error) EditMessage(context.Context, objects.Snowflake, objects.Snowflake, *EditMessageParams) (*objects.Message, error) EditOriginalInteractionResponse(context.Context, objects.Snowflake, string, *EditWebhookMessageParams) (*objects.Message, error) EditWebhookMessage(context.Context, objects.Snowflake, objects.Snowflake, string, *EditWebhookMessageParams) (*objects.Message, error) ExecuteWebhook(context.Context, objects.Snowflake, string, *ExecuteWebhookParams) (*objects.Message, error) FollowNewsChannel(context.Context, objects.Snowflake) (*objects.FollowedChannel, error) Gateway(context.Context) (*objects.Gateway, error) GatewayBot(context.Context) (*objects.Gateway, error) GetApplicationCommandPermissions(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake) (*objects.GuildApplicationCommandPermissions, error) GetApplicationRoleConnectionMetadataRecords(context.Context, objects.Snowflake) ([]*objects.ApplicationRoleConnectionMetadata, error) GetAuditLogs(context.Context, objects.Snowflake, *GetAuditLogParams) (*objects.AuditLog, error) GetAutoModerationRule(context.Context, objects.Snowflake, objects.Snowflake) (*objects.AutoModerationRule, error) GetAutoModerationRules(context.Context, objects.Snowflake) ([]*objects.AutoModerationRule, error) GetChannel(context.Context, objects.Snowflake) (*objects.Channel, error) GetChannelInvites(context.Context, objects.Snowflake) ([]*objects.Invite, error) GetChannelMessage(context.Context, objects.Snowflake, objects.Snowflake) (*objects.Message, error) GetChannelMessages(context.Context, objects.Snowflake, *GetChannelMessagesParams) ([]*objects.Message, error) GetChannelWebhooks(context.Context, objects.Snowflake) ([]*objects.Webhook, error) GetCommand(context.Context, objects.Snowflake, objects.Snowflake) (*objects.ApplicationCommand, error) GetCommands(context.Context, objects.Snowflake) ([]*objects.ApplicationCommand, error) GetCurrentUser(context.Context) (*objects.User, error) GetCurrentUserGuildMember(context.Context, objects.Snowflake) (*objects.GuildMember, error) GetCurrentUserGuilds(context.Context, *CurrentUserGuildsParams) ([]*objects.Guild, error) GetFollowupMessage(context.Context, objects.Snowflake, string, objects.Snowflake) (*objects.Message, error) GetGuild(context.Context, objects.Snowflake) (*objects.Guild, error) GetGuildApplicationCommandPermissions(context.Context, objects.Snowflake, objects.Snowflake) ([]*objects.GuildApplicationCommandPermissions, error) GetGuildBan(context.Context, objects.Snowflake, objects.Snowflake) (*objects.Ban, error) GetGuildBans(context.Context, objects.Snowflake) ([]*objects.Ban, error) GetGuildChannels(context.Context, objects.Snowflake) ([]*objects.Channel, error) GetGuildCommand(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake) (*objects.ApplicationCommand, error) GetGuildCommands(context.Context, objects.Snowflake, objects.Snowflake) ([]*objects.ApplicationCommand, error) GetGuildIntegrations(context.Context, objects.Snowflake) ([]*objects.Integration, error) GetGuildInvites(context.Context, objects.Snowflake) ([]*objects.Invite, error) GetGuildMember(context.Context, objects.Snowflake, objects.Snowflake) (*objects.GuildMember, error) GetGuildPreview(context.Context, objects.Snowflake) (*objects.GuildPreview, error) GetGuildPruneCount(context.Context, objects.Snowflake, *GetGuildPruneCountParams) (int, error) GetGuildRoles(context.Context, objects.Snowflake) ([]*objects.Role, error) GetGuildScheduledEvent(context.Context, objects.Snowflake, objects.Snowflake, ...*GetGuildScheduledEventParams) (*objects.GuildScheduledEvent, error) GetGuildScheduledEventUsers(context.Context, objects.Snowflake, objects.Snowflake, ...*GetGuildScheduledEventUsersParams) ([]*objects.GuildScheduledEventUser, error) GetGuildSticker(context.Context, objects.Snowflake, objects.Snowflake) (*objects.Sticker, error) GetGuildTemplates(context.Context, objects.Snowflake) ([]*objects.Template, error) GetGuildVanityURL(context.Context, objects.Snowflake) (*objects.Invite, error) GetGuildVoiceRegions(context.Context, objects.Snowflake) ([]*objects.VoiceRegion, error) GetGuildWebhooks(context.Context, objects.Snowflake) ([]*objects.Webhook, error) GetGuildWelcomeScreen(context.Context, objects.Snowflake) (*objects.MembershipScreening, error) GetGuildWidget(context.Context, objects.Snowflake) (*objects.GuildWidgetJSON, error) GetGuildWidgetImage(context.Context, objects.Snowflake, *GuildWidgetImageParams) (image.Image, error) GetGuildWidgetSettings(context.Context, objects.Snowflake) (*objects.GuildWidget, error) GetInvite(context.Context, string, *GetInviteParams) (*objects.Invite, error) GetOriginalInteractionResponse(context.Context, objects.Snowflake, string) (*objects.Message, error) GetPinnedMessages(context.Context, objects.Snowflake) ([]*objects.Message, error) GetReactions(context.Context, objects.Snowflake, objects.Snowflake, interface{}, *GetReactionsParams) ([]*objects.User, error) GetSticker(context.Context, objects.Snowflake) (*objects.Sticker, error) GetTemplate(context.Context, string) (*objects.Template, error) GetThreadMember(context.Context, objects.Snowflake, objects.Snowflake) (*objects.ThreadMember, error) GetUser(context.Context, objects.Snowflake) (*objects.User, error) GetUserApplicationRoleConnection(context.Context, objects.Snowflake) (*objects.ApplicationRoleConnection, error) GetUserConnections(context.Context) ([]*objects.Connection, error) GetVoiceRegions(context.Context) ([]*objects.VoiceRegion, error) GetWebhook(context.Context, objects.Snowflake) (*objects.Webhook, error) GetWebhookMesssage(context.Context, objects.Snowflake, objects.Snowflake, string) (*objects.Message, error) GetWebhookWithToken(context.Context, objects.Snowflake, string) (*objects.Webhook, error) JoinThread(context.Context, objects.Snowflake) error LeaveGuild(context.Context, objects.Snowflake) error LeaveThread(context.Context, objects.Snowflake) error ListActiveThreads(context.Context, objects.Snowflake) ([]*ListThreadsResponse, error) ListGuildMembers(context.Context, objects.Snowflake, *ListGuildMembersParams) ([]*objects.GuildMember, error) ListGuildStickers(context.Context, objects.Snowflake) ([]*objects.Sticker, error) ListJoinedPrivateArchivedThreads(context.Context, objects.Snowflake, ...*ListThreadsParams) (*ListThreadsResponse, error) ListNitroStickerPacks(context.Context) ([]*objects.StickerPack, error) ListPrivateArchivedThreads(context.Context, objects.Snowflake, ...*ListThreadsParams) (*ListThreadsResponse, error) ListPublicArchivedThreads(context.Context, objects.Snowflake, ...*ListThreadsParams) (*ListThreadsResponse, error) ListThreadMembers(context.Context, objects.Snowflake) ([]*objects.ThreadMember, error) ModifyAutoModerationRule(context.Context, objects.Snowflake, objects.Snowflake, *ModifyAutoModerationRuleParams) (*objects.AutoModerationRule, error) ModifyChannel(context.Context, objects.Snowflake, *ModifyChannelParams) (*objects.Channel, error) ModifyCurrentUser(context.Context, *ModifyCurrentUserParams) (*objects.User, error) ModifyCurrentUserNick(context.Context, objects.Snowflake, *ModifyCurrentUserNickParams) (*ModifyCurrentUserNickParams, error) ModifyGuild(context.Context, objects.Snowflake, *ModifyGuildParams) (*objects.Guild, error) ModifyGuildChannelPositions(context.Context, objects.Snowflake, []*ModifyChannelPositionParams, string) error ModifyGuildMember(context.Context, objects.Snowflake, objects.Snowflake, *ModifyGuildMemberParams) (*objects.GuildMember, error) ModifyGuildRole(context.Context, objects.Snowflake, objects.Snowflake, *ModifyGuildRoleParams) (*objects.Role, error) ModifyGuildRolePositions(context.Context, objects.Snowflake, []*ModifyGuildRolePositionsParams) ([]*objects.Role, error) ModifyGuildScheduledEvent(context.Context, objects.Snowflake, objects.Snowflake, *ModifyGuildScheduledEventParams) (*objects.GuildScheduledEvent, error) ModifyGuildSticker(context.Context, objects.Snowflake, objects.Snowflake, *BaseStickerParams) (*objects.Sticker, error) ModifyGuildTemplate(context.Context, objects.Snowflake, string, *ModifyGuildTemplateParams) (*objects.Template, error) ModifyGuildWelcomeScreen(context.Context, objects.Snowflake, *ModifyGuildMembershipScreeningParams) (*objects.MembershipScreening, error) ModifyGuildWidget(context.Context, objects.Snowflake, *GuildWidgetParams) (*objects.GuildWidget, error) ModifyWebhook(context.Context, objects.Snowflake, *ModifyWebhookParams) (*objects.Webhook, error) ModifyWebhookWithToken(context.Context, objects.Snowflake, string, *ModifyWebhookWithTokenParams) (*objects.Webhook, error) RemoveGuildBan(context.Context, objects.Snowflake, objects.Snowflake, string) error RemoveGuildMember(context.Context, objects.Snowflake, objects.Snowflake, string) error RemoveGuildMemberRole(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake, string) error RemoveThreadMember(context.Context, objects.Snowflake, objects.Snowflake) error StartThread(context.Context, objects.Snowflake, *StartThreadParams) (*objects.Channel, error) StartThreadInForumChannel(context.Context, objects.Snowflake, *StartThreadInForumChannelParams) (*objects.ForumThreadChannel, error) StartThreadWithMessage(context.Context, objects.Snowflake, objects.Snowflake, *StartThreadParams) (*objects.Channel, error) StartTyping(context.Context, objects.Snowflake) error SyncGuildTemplate(context.Context, objects.Snowflake, string) (*objects.Template, error) UpdateApplicationRoleConnectionMetadataRecords(context.Context, objects.Snowflake, []*objects.ApplicationRoleConnectionMetadata) ([]*objects.ApplicationRoleConnectionMetadata, error) UpdateCommand(context.Context, objects.Snowflake, objects.Snowflake, *objects.ApplicationCommand) (*objects.ApplicationCommand, error) UpdateGuildCommand(context.Context, objects.Snowflake, objects.Snowflake, objects.Snowflake, *objects.ApplicationCommand) (*objects.ApplicationCommand, error) UpdateUserApplicationRoleConnection(context.Context, objects.Snowflake, *objects.ApplicationRoleConnection) (*objects.ApplicationRoleConnection, error) }
RESTClient is the interface that contains all functions in *rest.Client.
func New ¶
func New(options ...RestOption) RESTClient
type Ratelimiter ¶
type Ratelimiter interface {
Request(httpClient HTTPClient, req *request) (*DiscordResponse, error)
}
type RedisCache ¶ added in v0.0.5
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶ added in v0.0.5
func NewRedisCache(rdb *redis.Client) *RedisCache
func (*RedisCache) Get ¶ added in v0.0.5
func (r *RedisCache) Get(ctx context.Context, key string) (*DiscordResponse, error)
func (*RedisCache) Put ¶ added in v0.0.5
func (r *RedisCache) Put(ctx context.Context, key string, value *DiscordResponse) error
type RedisRatelimiter ¶
type RedisRatelimiter struct { MaxRetries int // contains filtered or unexported fields }
func NewRedisRatelimiter ¶
func NewRedisRatelimiter(conf *RedisConf) (*RedisRatelimiter, error)
func (*RedisRatelimiter) Request ¶
func (r *RedisRatelimiter) Request(httpClient HTTPClient, req *request) (*DiscordResponse, error)
type RestOption ¶
type RestOption func(*Client)
func WithCache ¶
func WithCache(cache Cache) RestOption
func WithLogger ¶
func WithLogger(l zerolog.Logger) RestOption
func WithRateLimiter ¶
func WithRateLimiter(r Ratelimiter) RestOption
func WithUserAgent ¶
func WithUserAgent(a *UserAgent) RestOption
type StartThreadInForumChannelParams ¶
type StartThreadInForumChannelParams struct { Name string `json:"name"` AutoArchiveDuration uint64 `json:"auto_archive_duration"` RateLimitPerUser uint64 `json:"rate_limit_per_user"` Message *ForumThreadMessageParams `json:"message"` AppliedTags []objects.Snowflake `json:"applied_tags"` Reason string `json:"-"` }
type StartThreadParams ¶
type TestHTTPClient ¶
type TestHTTPClient struct { T *testing.T ExpectedRequest *request Response *DiscordResponse Error error }
TestHTTPClient is a replacement HTTP client that can be used during testing.
func (*TestHTTPClient) Request ¶
func (c *TestHTTPClient) Request(req *request) (*DiscordResponse, error)
Source Files ¶
- application_role.go
- audit_log.go
- auto_moderation.go
- cache.go
- cache_redis.go
- channel.go
- client.go
- commands.go
- constants.go
- gateway.go
- generate_interface.go
- guild.go
- guild_scheduled_event.go
- http_client.go
- interactions.go
- interface_gen.go
- invite.go
- options.go
- proxy.go
- ratelimit.go
- ratelimit_leakybucket.go
- ratelimit_memory.go
- ratelimit_redis.go
- response.go
- stickers.go
- template.go
- user.go
- voice.go
- webhook.go
Click to show internal directories.
Click to hide internal directories.