import type { AuditLogEvent, MFALevel, OnboardingMode, PrivacyLevel } from "#enums"; import type { ListArchivedThreadsReturnStructure, GetGatewayBotResponse, ApplicationCommand, LilybirdAttachment, AutoModeration, DebugFunction, StageInstance, Application, Interaction, AuditLog, Channel, Message, Sticker, Webhook, Invite, Emoji, Guild, Voice, Role, User, Poll } from "../typings/index.js"; export interface DiscordErrorMessage { code: number; message: string; errors?: Record; } export declare class RestError extends Error { readonly code: number; readonly errors: DiscordErrorMessage["errors"]; constructor(error: DiscordErrorMessage); } export type TokenType = "Bearer" | "Bot"; export declare class REST { #private; static readonly BaseURL = "https://discord.com/api/v10/"; constructor(token?: string, tokenType?: TokenType); makeAPIRequest(method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT", path: string, data: FormData, reason?: string): Promise; makeAPIRequest(method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT", path: string, data?: Record, files?: Array): Promise; setToken(token: string | undefined, tokenType?: TokenType): void; getGateway(): Promise<{ url: string; }>; getGatewayBot(): Promise; getGlobalApplicationCommands(clientId: string): Promise>; getGlobalApplicationCommands(clientId: string, withLocalizations: true): Promise>; createGlobalApplicationCommand(clientId: string, body: ApplicationCommand.Create.ApplicationCommandJSONParams): Promise; getGlobalApplicationCommand(clientId: string, commandId: string): Promise; editGlobalApplicationCommand(clientId: string, commandId: string, body: Partial): Promise; deleteGlobalApplicationCommand(clientId: string, commandId: string): Promise; bulkOverwriteGlobalApplicationCommand(clientId: string, body: Array): Promise>; getGuildApplicationCommands(clientId: string): Promise>; getGuildApplicationCommands(clientId: string, withLocalizations: true): Promise>; createGuildApplicationCommand(clientId: string, guildId: string, body: ApplicationCommand.Create.ApplicationCommandJSONParams): Promise; getGuildApplicationCommand(clientId: string, guildId: string, commandId: string): Promise; editGuildApplicationCommand(clientId: string, guildId: string, commandId: string, body: Partial): Promise; deleteGuildApplicationCommand(clientId: string, guildId: string, commandId: string): Promise; bulkOverwriteGuildApplicationCommand(clientId: string, guildId: string, body: Array): Promise>; getGuildApplicationCommandPermissions(clientId: string, guildId: string): Promise>; getApplicationCommandPermissions(clientId: string, guildId: string, commandId: string): Promise; editApplicationCommandPermissions(clientId: string, guildId: string, commandId: string, body: { permissions: Array; }): Promise; createInteractionResponse(interactionId: string, interactionToken: string, body: Interaction.ResponseJSONParams, files?: Array): Promise; getOriginalInteractionResponse(clientId: string, interactionToken: string): Promise; editOriginalInteractionResponse(clientId: string, interactionToken: string, body: Webhook.EditWebhookJSONParams, files?: Array): Promise; deleteOriginalInteractionResponse(clientId: string, interactionToken: string): Promise; createFollowupMessage(clientId: string, interactionToken: string, body: Webhook.ExecuteWebhookJSONParams, files?: Array): Promise; getFollowupMessage(clientId: string, interactionToken: string, messageId: string): Promise; editFollowupMessage(clientId: string, interactionToken: string, messageId: string, body: Webhook.EditWebhookJSONParams, files?: Array): Promise; deleteFollowupMessage(clientId: string, interactionToken: string, messageId: string): Promise; getCurrentApplication(): Promise; editCurrentApplication(app: Application.EditApplicationJSONParams): Promise; getApplicationRoleConnectionMetadataRecords(applicationId: string): Promise>; updateApplicationRoleConnectionMetadataRecords(applicationId: string): Promise>; getGuildAuditLog(guildId: string, params: { user_id?: string; action_type?: AuditLogEvent; before?: string; after?: string; limit?: number; }): Promise; listAutoModerationRulesForGuild(guildId: string): Promise>; getAutoModerationRule(guildId: string, ruleId: string): Promise; createAutoModerationRule(guildId: string, rule: AutoModeration.CreateJSONParams): Promise; modifyAutoModerationRule(guildId: string, ruleId: string, rule: Partial>): Promise; deleteAutoModerationRule(guildId: string, ruleId: string, reason: string): Promise; getChannel(channelId: string): Promise; modifyChannel(channelId: string, body: Channel.Modify.GuildChannelStructure | Channel.Modify.DMChannelStructure | Channel.Modify.ThreadChannelStructure): Promise; deleteChannel(channelId: string, reason?: string): Promise; editChannelPermissions(channelId: string, overwriteId: string, params: { reason?: string; allow?: string | null; deny?: string | null; type: 0 | 1; }): Promise; getChannelInvites(channelId: string): Promise>; createChannelInvite(channelId: string, body: Invite.CreateJSONParams): Promise; deleteChannelPermission(channelId: string, overwriteId: string, reason?: string): Promise; followAnnouncementChannel(channelId: string, body: { webhook_channel_id?: string; }): Promise; triggerTypingIndicator(channelId: string): Promise; getPinnedMessages(channelId: string): Promise; pinMessage(channelId: string, messageId: string, reason?: string): Promise; unpinMessage(channelId: string, messageId: string, reason?: string): Promise; groupDMAddRecipient(channelId: string, userId: string, body: { access_token: string; nick: string; }): Promise; groupDMRemoveRecipient(channelId: string, userId: string): Promise; startThreadFromMessage(channelId: string, messageId: string, body: Channel.Create.ThreadFromMessageJSONParams): Promise; startThreadWithoutMessage(channelId: string, body: Channel.Create.ThreadJSONParams): Promise; startThreadInForumOrMediaChannel(channelId: string, body: Channel.Create.ForumMediaThreadJSONParams, files?: Array): Promise; joinThread(channelId: string): Promise; addThreadMember(channelId: string, userId: string): Promise; leaveThread(channelId: string): Promise; removeThreadMember(channelId: string, userId: string): Promise; getThreadMember(channelId: string, userId: string, withMember?: boolean): Promise; listThreadMembers(channelId: string, params?: { after?: number; limit?: string; }): Promise>; listPublicArchivedThreads(channelId: string, params?: { before?: string; limit?: string; }): Promise; listPrivateArchivedThreads(channelId: string, params?: { before?: string; limit?: string; }): Promise; listJoinedPrivateArchivedThreads(channelId: string, params?: { before?: string; limit?: string; }): Promise; listGuildEmojis(guildId: string): Promise>; getGuildEmoji(guildId: string, emojiId: string): Promise; createGuildEmoji(guildId: string, params: { name: string; image: ImageData; roles: Array; reason?: string; }): Promise; modifyGuildEmoji(guildId: string, emojiId: string, params: { name?: string; roles?: Array | null; reason: string; }): Promise; deleteGuildEmoji(guildId: string, emojiId: string, reason?: string): Promise; listApplicationEmojis(applicationId: string): Promise>; getApplicationEmoji(applicationId: string, emojiId: string): Promise; createApplicationEmoji(applicationId: string, params: { name: string; image: ImageData; }): Promise; modifyApplicationEmoji(applicationId: string, emojiId: string, params: { name: string; }): Promise; deleteApplicationEmoji(applicationId: string, emojiId: string): Promise; getGuild(guildId: string, withCounts?: boolean): Promise; getGuildPreview(guildId: string): Promise; modifyGuild(guildId: string, body: Guild.Modify.GuildJSONParams): Promise; deleteGuild(guildId: string): Promise; getGuildChannels(guildId: string): Promise>; createGuildChannel(guildId: string, body: Guild.Create.GuildChannelJSONParams): Promise; modifyGuildChannelPositions(guildId: string, body: Array): Promise; listActiveGuildThreads(guildId: string): Promise<{ threads: Array; members: Array; }>; getGuildMember(guildId: string, userId: string): Promise; listGuildMembers(guildId: string, params: { limit: number; after: string; }): Promise>; searchGuildMembers(guildId: string, params: { query: string; limit: number; }): Promise>; addGuildMember(guildId: string, userId: string, body: { access_token: string; nick?: string; roles?: Array; mute?: boolean; deaf?: boolean; }): Promise; modifyGuildMember(guildId: string, userId: string, body: { reason?: string | null; nick?: string | null; roles?: Array | null; mute?: boolean | null; deaf?: boolean | null; channel_id?: string | null; communication_disabled_until?: string | null; flags?: number | null; }): Promise; modifyCurrentMember(guildId: string, body: { reason?: string | null; nick?: string | null; }): Promise; addGuildMemberRole(guildId: string, userId: string, roleId: string, reason: string): Promise; removeGuildMemberRole(guildId: string, userId: string, roleId: string, reason: string): Promise; removeGuildMember(guildId: string, userId: string, reason: string): Promise; getGuildBans(guildId: string, params: { before: string; after: string; limit: string; }): Promise>; getGuildBan(guildId: string, userId: string): Promise; createGuildBan(guildId: string, userId: string, body: { reason?: string; delete_message_seconds?: number; }): Promise; removeGuildBan(guildId: string, userId: string, reason?: string): Promise; getGuildRoles(guildId: string): Promise>; getGuildRole(guildId: string, roleId: string): Promise; createGuildRole(guildId: string, body: Role.JSONParams): Promise; modifyGuildRolePosition(guildId: string, body: { reason?: string; id: string; position?: number | null; }): Promise>; modifyGuildRole(guildId: string, roleId: string, body: Partial): Promise; modifyGuildMFALevel(guildId: string, level: MFALevel): Promise; deleteGuildRole(guildId: string, roleId: string, reason?: string): Promise; getGuildPruneCount(guildId: string, params: { days: number; include_roles?: string; }): Promise<{ pruned: number; }>; beginGuildPrune(guildId: string, body: { days?: number; compute_prune_count?: boolean; include_roles?: Array; reason?: string; }): Promise<{ pruned: number | null; }>; getGuildVoiceRegions(guildId: string): Promise>; getGuildInvites(guildId: string): Promise>; getGuildIntegrations(guildId: string): Promise>; deleteGuildIntegration(guildId: string, integrationId: string, reason?: string): Promise; getGuildWidgetSettings(guildId: string): Promise; modifyGuildWidget(guildId: string, body: Guild.WidgetSettingsStructure & { reason?: string; }): Promise; getGuildWidget(guildId: string): Promise; getGuildVanityUrl(guildId: string): Promise>; getGuildWidgetImage(guildId: string, style?: string): Promise; getGuildWelcomeScreen(guildId: string): Promise; modifyGuildWelcomeScreen(guildId: string, body: { reason?: string; enabled?: boolean | null; welcome_channels?: Array | null; description?: string | null; }): Promise; getGuildOnboarding(guildId: string): Promise; modifyGuildOnboarding(guildId: string, body: { reason?: string; prompts: Array; default_channel_ids: Array; enabled: boolean; mode: OnboardingMode; }): Promise; modifyCurrentUserVoiceState(guildId: string, body: { channel_id?: string; suppress?: boolean; request_to_speak_timestamp?: string | null; }): Promise; modifyUserVoiceState(guildId: string, userId: string, body: { channel_id: string; suppress?: boolean; }): Promise; listScheduledEventsForGuild(guildId: string, params: { with_user_count?: boolean; }): Promise>; createGuildScheduledEvent(guildId: string, event: Guild.Create.ScheduledEventJSONParams): Promise; getGuildScheduledEvent(guildId: string, eventId: string, params: { with_user_count?: boolean; }): Promise>; modifyGuildScheduledEvent(guildId: string, eventId: string, event: Partial): Promise; deleteGuildScheduledEvent(guildId: string, eventId: string): Promise; getGuildScheduledEventUsers(guildId: string, eventId: string, params: { limit?: number; with_member?: boolean; before?: string; after?: string; }): Promise<{ guild_scheduled_event_id: string; user: User.Structure; member?: Guild.MemberStructure; }>; getGuildTemplate(templateCode: string): Promise; createGuildFromGuildTemplate(templateCode: string, guild: { name: string; image?: ImageData; }): Promise; getGuildTemplates(guildId: string): Promise>; createGuildTemplate(guildId: string, template: { name: string; description?: string | null; }): Promise; syncGuildTemplate(guildId: string, templateCode: string): Promise>; modifyGuildTemplate(guildId: string, templateCode: string, template: { name?: string; description?: string | null; }): Promise; deleteGuildTemplate(guildId: string, templateCode: string): Promise; getInvite(inviteCode: string): Promise; deleteInvite(inviteCode: string, reason?: string): Promise; getChannelMessages(channelId: string, params: { around?: string; before?: string; after?: string; limit?: number; }): Promise>; getChannelMessage(channelId: string, messageId: string): Promise; createMessage(channelId: string, body: Message.CreateJSONParams, files?: Array): Promise; crosspostMessage(channelId: string, messageId: string): Promise; createReaction(channelId: string, messageId: string, emoji: string, isCustom?: boolean): Promise; deleteOwnReaction(channelId: string, messageId: string, emoji: string, isCustom?: boolean): Promise; deleteUserReaction(channelId: string, messageId: string, userId: string, emoji: string, isCustom?: boolean): Promise; getReactions(channelId: string, messageId: string, emoji: string, isCustom?: boolean, params?: { after?: number; limit?: string; }): Promise>; deleteAllReactions(channelId: string, messageId: string): Promise; deleteAllReactionsForEmoji(channelId: string, messageId: string, emoji: string, isCustom?: boolean): Promise; editMessage(channelId: string, messageId: string, body: Message.EditJSONParams, files?: Array): Promise; deleteMessage(channelId: string, messageId: string, reason?: string): Promise; bulkDeleteMessages(channelId: string, messageIds: Array, reason?: string): Promise; getAnswerVoters(channelId: string, messageId: string, answerId: number, params: { after?: string; limit?: number; }): Promise; endPoll(channelId: string, messageId: string): Promise; createStageInstance(instance: StageInstance.CreateJSONParams): Promise; getStageInstance(channelId: string): Promise; modifyStageInstance(channelId: string, data: { topic?: string; privacy_level?: PrivacyLevel; reason?: string; }): Promise; deleteStageInstance(channelId: string, reason?: string): Promise; getSticker(stickerId: string): Promise; listStickerPacks(): Promise<{ sticker_packs: Array; }>; getStickerPack(packId: string): Promise; listGuildStickers(guildId: string): Promise>; getGuildSticker(guildId: string, stickerId: string): Promise; createGuildSticker(guildId: string, stickerId: string, params: { name: string; description: string; tags: string; file: Blob; reason?: string; }): Promise; modifyGuildSticker(guildId: string, stickerId: string, params: { name?: string; description?: string; tags?: string; reason?: string; }): Promise; deleteGuildSticker(guildId: string, stickerId: string, reason?: string): Promise; getCurrentUser(): Promise; getUser(userId: string): Promise; modifyCurrentUser(body?: { username?: string; avatar?: string; }): Promise; getCurrentUserGuilds(params: { before: string; after: string; limit: string; withCounts: boolean; }): Promise>>; getCurrentUserGuildMember(guildId: string): Promise; leaveGuild(guildId: string): Promise; createDM(userId: string): Promise; createGroupDM(tokens: Array, nicks: Record): Promise; listVoiceRegions(): Promise>; getCurrentUserVoiceState(guildId: string): Promise; getUserVoiceState(guildId: string, userId: string): Promise; createWebhook(channelId: string, webhook: { name: string; avatar?: ImageData | null; }): Promise; getChannelWebhooks(channelId: string): Promise>; getGuildWebhooks(guildId: string): Promise>; getWebhook(webhookId: string): Promise; getWebhookWithToken(webhookId: string, token: string): Promise; modifyWebhook(webhookId: string, webhook: { name?: string; avatar?: ImageData | null; channel_id?: string; reason?: string; }): Promise; modifyWebhookWithToken(webhookId: string, token: string, webhook: { name?: string; avatar?: ImageData | null; channel_id?: string; reason?: string; }): Promise; deleteWebhook(webhookId: string, reason?: string): Promise; deleteWebhookWithToken(webhookId: string, token: string, reason?: string): Promise; executeWebhook(webhookId: string, token: string, params: { wait?: boolean; thread_id?: string; }, body: Webhook.ExecuteWebhookJSONParams, files?: Array): Promise; getWebhookMessage(webhookId: string, token: string, messageId: string, params: { thread_id?: string; }): Promise; editWebhookMessage(webhookId: string, token: string, messageId: string, params: { thread_id?: string; }, body: Webhook.EditWebhookJSONParams, files?: Array): Promise; deleteWebhookMessage(webhookId: string, token: string, messageId: string, params: { thread_id?: string; }): Promise; } export declare class DebugREST extends REST { #private; constructor(debug?: DebugFunction, token?: string); makeAPIRequest(method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT", path: string, data: FormData, reason?: string | undefined): Promise; makeAPIRequest(method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT", path: string, data?: Record | undefined, files?: Array | undefined): Promise; } //# sourceMappingURL=rest.d.ts.map