import { type APIGuildMember, type APIMessage, type APIThreadChannel, type RESTDeleteAPIChannelResult, type RESTDeleteAPIGuildTemplateResult, type RESTDeleteAPIInviteResult, type RESTGetAPIApplicationCommandPermissionsResult, type RESTGetAPIApplicationCommandResult, type RESTGetAPIApplicationCommandsQuery, type RESTGetAPIApplicationCommandsResult, type RESTGetAPIApplicationEmojiResult, type RESTGetAPIApplicationEmojisResult, type RESTGetAPIApplicationGuildCommandResult, type RESTGetAPIApplicationGuildCommandsQuery, type RESTGetAPIApplicationGuildCommandsResult, type RESTGetAPIApplicationRoleConnectionMetadataResult, type RESTGetAPIAuditLogQuery, type RESTGetAPIAuditLogResult, type RESTGetAPIAutoModerationRuleResult, type RESTGetAPIAutoModerationRulesResult, type RESTGetAPIChannelInvitesResult, type RESTGetAPIChannelMessageReactionUsersQuery, type RESTGetAPIChannelMessageReactionUsersResult, type RESTGetAPIChannelMessageResult, type RESTGetAPIChannelMessagesPinsQuery, type RESTGetAPIChannelMessagesPinsResult, type RESTGetAPIChannelMessagesQuery, type RESTGetAPIChannelMessagesResult, type RESTGetAPIChannelPinsResult, type RESTGetAPIChannelResult, type RESTGetAPIChannelThreadMemberQuery, type RESTGetAPIChannelThreadMemberResult, type RESTGetAPIChannelThreadMembersQuery, type RESTGetAPIChannelThreadMembersResult, type RESTGetAPIChannelThreadsArchivedQuery, type RESTGetAPIChannelUsersThreadsArchivedResult, type RESTGetAPIChannelWebhooksResult, type RESTGetAPICurrentUserApplicationRoleConnectionResult, type RESTGetAPICurrentUserConnectionsResult, type RESTGetAPICurrentUserGuildsQuery, type RESTGetAPICurrentUserGuildsResult, type RESTGetAPIEntitlementResult, type RESTGetAPIEntitlementsQuery, type RESTGetAPIEntitlementsResult, type RESTGetAPIGatewayBotResult, type RESTGetAPIGatewayResult, type RESTGetAPIGuildApplicationCommandsPermissionsResult, type RESTGetAPIGuildBanResult, type RESTGetAPIGuildBansQuery, type RESTGetAPIGuildBansResult, type RESTGetAPIGuildChannelsResult, type RESTGetAPIGuildEmojiResult, type RESTGetAPIGuildEmojisResult, type RESTGetAPIGuildIntegrationsResult, type RESTGetAPIGuildInvitesResult, type RESTGetAPIGuildMemberResult, type RESTGetAPIGuildMembersQuery, type RESTGetAPIGuildMembersResult, type RESTGetAPIGuildMembersSearchQuery, type RESTGetAPIGuildMembersSearchResult, type RESTGetAPIGuildOnboardingResult, type RESTGetAPIGuildPreviewResult, type RESTGetAPIGuildPruneCountQuery, type RESTGetAPIGuildPruneCountResult, type RESTGetAPIGuildQuery, type RESTGetAPIGuildResult, type RESTGetAPIGuildRoleResult, type RESTGetAPIGuildRolesResult, type RESTGetAPIGuildScheduledEventQuery, type RESTGetAPIGuildScheduledEventResult, type RESTGetAPIGuildScheduledEventsQuery, type RESTGetAPIGuildScheduledEventsResult, type RESTGetAPIGuildScheduledEventUsersQuery, type RESTGetAPIGuildScheduledEventUsersResult, type RESTGetAPIGuildSoundboardSoundResult, type RESTGetAPIGuildStickerResult, type RESTGetAPIGuildStickersResult, type RESTGetAPIGuildTemplatesResult, type RESTGetAPIGuildThreadsResult, type RESTGetAPIGuildVanityUrlResult, type RESTGetAPIGuildVoiceRegionsResult, type RESTGetAPIGuildVoiceStateUserResult, type RESTGetAPIGuildWebhooksResult, type RESTGetAPIGuildWelcomeScreenResult, type RESTGetAPIGuildWidgetImageQuery, type RESTGetAPIGuildWidgetImageResult, type RESTGetAPIGuildWidgetJSONResult, type RESTGetAPIGuildWidgetSettingsResult, type RESTGetAPIInviteQuery, type RESTGetAPIInviteResult, type RESTGetAPIPollAnswerVotersQuery, type RESTGetAPIPollAnswerVotersResult, type RESTGetAPISKUSubscriptionResult, type RESTGetAPISKUSubscriptionsQuery, type RESTGetAPISKUSubscriptionsResult, type RESTGetAPISKUsResult, type RESTGetAPISoundboardDefaultSoundsResult, type RESTGetAPIStageInstanceResult, type RESTGetAPIStickerPackResult, type RESTGetAPIStickerResult, type RESTGetAPITemplateResult, type RESTGetAPIUserResult, type RESTGetAPIVoiceRegionsResult, type RESTGetAPIWebhookResult, type RESTGetAPIWebhookWithTokenMessageQuery, type RESTGetAPIWebhookWithTokenMessageResult, type RESTGetAPIWebhookWithTokenResult, type RESTGetCurrentApplicationResult, type RESTGetStickerPacksResult, type RESTPatchAPIApplicationCommandJSONBody, type RESTPatchAPIApplicationCommandResult, type RESTPatchAPIApplicationEmojiJSONBody, type RESTPatchAPIApplicationEmojiResult, type RESTPatchAPIApplicationGuildCommandJSONBody, type RESTPatchAPIApplicationGuildCommandResult, type RESTPatchAPIAutoModerationRuleJSONBody, type RESTPatchAPIAutoModerationRuleResult, type RESTPatchAPIChannelJSONBody, type RESTPatchAPIChannelMessageJSONBody, type RESTPatchAPIChannelMessageResult, type RESTPatchAPIChannelResult, type RESTPatchAPICurrentGuildMemberJSONBody, type RESTPatchAPICurrentUserJSONBody, type RESTPatchAPICurrentUserResult, type RESTPatchAPIGuildChannelPositionsJSONBody, type RESTPatchAPIGuildEmojiJSONBody, type RESTPatchAPIGuildEmojiResult, type RESTPatchAPIGuildJSONBody, type RESTPatchAPIGuildMemberJSONBody, type RESTPatchAPIGuildMemberResult, type RESTPatchAPIGuildResult, type RESTPatchAPIGuildRoleJSONBody, type RESTPatchAPIGuildRolePositionsJSONBody, type RESTPatchAPIGuildRolePositionsResult, type RESTPatchAPIGuildRoleResult, type RESTPatchAPIGuildScheduledEventJSONBody, type RESTPatchAPIGuildScheduledEventResult, type RESTPatchAPIGuildSoundboardSoundJSONBody, type RESTPatchAPIGuildSoundboardSoundResult, type RESTPatchAPIGuildStickerJSONBody, type RESTPatchAPIGuildStickerResult, type RESTPatchAPIGuildTemplateJSONBody, type RESTPatchAPIGuildTemplateResult, type RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, type RESTPatchAPIGuildWelcomeScreenJSONBody, type RESTPatchAPIGuildWelcomeScreenResult, type RESTPatchAPIGuildWidgetSettingsJSONBody, type RESTPatchAPIGuildWidgetSettingsResult, type RESTPatchAPIStageInstanceJSONBody, type RESTPatchAPIStageInstanceResult, type RESTPatchAPIWebhookJSONBody, type RESTPatchAPIWebhookResult, type RESTPatchAPIWebhookWithTokenJSONBody, type RESTPatchAPIWebhookWithTokenMessageJSONBody, type RESTPatchAPIWebhookWithTokenMessageQuery, type RESTPatchAPIWebhookWithTokenMessageResult, type RESTPatchAPIWebhookWithTokenResult, type RESTPatchCurrentApplicationJSONBody, type RESTPatchCurrentApplicationResult, type RESTPostAPIApplicationCommandsJSONBody, type RESTPostAPIApplicationCommandsResult, type RESTPostAPIApplicationEmojiJSONBody, type RESTPostAPIApplicationEmojiResult, type RESTPostAPIApplicationGuildCommandsJSONBody, type RESTPostAPIApplicationGuildCommandsResult, type RESTPostAPIAutoModerationRuleJSONBody, type RESTPostAPIAutoModerationRuleResult, type RESTPostAPIChannelFollowersJSONBody, type RESTPostAPIChannelFollowersResult, type RESTPostAPIChannelInviteJSONBody, type RESTPostAPIChannelInviteResult, type RESTPostAPIChannelMessageCrosspostResult, type RESTPostAPIChannelMessageJSONBody, type RESTPostAPIChannelMessageResult, type RESTPostAPIChannelMessagesBulkDeleteJSONBody, type RESTPostAPIChannelThreadsJSONBody, type RESTPostAPIChannelThreadsResult, type RESTPostAPIChannelWebhookJSONBody, type RESTPostAPIChannelWebhookResult, type RESTPostAPICurrentUserCreateDMChannelResult, type RESTPostAPIEntitlementJSONBody, type RESTPostAPIEntitlementResult, type RESTPostAPIGuildBulkBanJSONBody, type RESTPostAPIGuildBulkBanResult, type RESTPostAPIGuildChannelJSONBody, type RESTPostAPIGuildChannelResult, type RESTPostAPIGuildEmojiJSONBody, type RESTPostAPIGuildEmojiResult, type RESTPostAPIGuildForumThreadsJSONBody, type RESTPostAPIGuildPruneJSONBody, type RESTPostAPIGuildPruneResult, type RESTPostAPIGuildRoleJSONBody, type RESTPostAPIGuildRoleResult, type RESTPostAPIGuildScheduledEventJSONBody, type RESTPostAPIGuildScheduledEventResult, type RESTPostAPIGuildSoundboardSoundJSONBody, type RESTPostAPIGuildSoundboardSoundResult, type RESTPostAPIGuildStickerFormDataBody, type RESTPostAPIGuildStickerResult, type RESTPostAPIGuildsJSONBody, type RESTPostAPIGuildsMFAJSONBody, type RESTPostAPIGuildsMFAResult, type RESTPostAPIGuildsResult, type RESTPostAPIGuildTemplatesJSONBody, type RESTPostAPIGuildTemplatesResult, type RESTPostAPIPollExpireResult, type RESTPostAPISendSoundboardSoundResult, type RESTPostAPISoundboardSendSoundJSONBody, type RESTPostAPIStageInstanceJSONBody, type RESTPostAPIStageInstanceResult, type RESTPostAPITemplateCreateGuildJSONBody, type RESTPostAPITemplateCreateGuildResult, type RESTPostAPIWebhookWithTokenJSONBody, type RESTPostAPIWebhookWithTokenQuery, type RESTPostAPIWebhookWithTokenWaitResult, type RESTPutAPIApplicationCommandPermissionsJSONBody, type RESTPutAPIApplicationCommandPermissionsResult, type RESTPutAPIApplicationCommandsJSONBody, type RESTPutAPIApplicationCommandsResult, type RESTPutAPIApplicationGuildCommandsJSONBody, type RESTPutAPIApplicationGuildCommandsResult, type RESTPutAPIApplicationRoleConnectionMetadataResult, type RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, type RESTPutAPICurrentUserApplicationRoleConnectionResult, type RESTPutAPIGuildBanJSONBody, type RESTPutAPIGuildIncidentActionsJSONBody, type RESTPutAPIGuildMemberJSONBody, type RESTPutAPIGuildMemberResult, type RESTPutAPIGuildOnboardingJSONBody, type RESTPutAPIGuildOnboardingResult, type RESTPutAPIGuildTemplateSyncResult, type Snowflake, type ThreadChannelType } from "discord-api-types/v10"; import type { RawFile } from "../types/file.ts"; import { type CallConfig } from "../utils/call-discord.ts"; /** * Fetch all of the global commands for your application. * @warn The objects returned by this endpoint may be augmented with [additional fields if localization is active](https://discord.com/developers/docs/interactions/application-commands#retrieving-localized-commands). * @see https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */ export declare function listGlobalCommands(params?: RESTGetAPIApplicationCommandsQuery, $req?: CallConfig): Promise; /** * Create a new global command. * @warn Creating a command with the same name as an existing command for your application will overwrite the old command. * @see https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */ export declare function createGlobalCommand(data: RESTPostAPIApplicationCommandsJSONBody, $req?: CallConfig): Promise; /** * Fetch a global command for your application. * @see https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */ export declare function getGlobalCommand(commandId: Snowflake, $req?: CallConfig): Promise; /** * Edit a global command. * @see https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */ export declare function modifyGlobalCommand(commandId: Snowflake, data: RESTPatchAPIApplicationCommandJSONBody, $req?: CallConfig): Promise; /** * Deletes a global command. * @see https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */ export declare function deleteGlobalCommand(commandId: Snowflake, $req?: CallConfig): Promise; /** * Takes a list of application commands, overwriting the existing global command list for this application. * @danger This will overwrite all types of application commands: slash commands, user commands, and message commands. * @see https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */ export declare function bulkOverwriteGlobalCommands(data: RESTPutAPIApplicationCommandsJSONBody, $req?: CallConfig): Promise; /** * Fetch all of the guild commands for your application for a specific guild. * @warn The objects returned by this endpoint may be augmented with [additional fields if localization is active](https://discord.com/developers/docs/interactions/application-commands#retrieving-localized-commands). * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */ export declare function listGuildCommands(guildId: Snowflake, params?: RESTGetAPIApplicationGuildCommandsQuery, $req?: CallConfig): Promise; /** * Create a new guild command. New guild commands will be available in the guild immediately. * @danger Creating a command with the same name as an existing command for your application will overwrite the old command. * @see https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */ export declare function createGuildCommand(guildId: Snowflake, data: RESTPostAPIApplicationGuildCommandsJSONBody, $req?: CallConfig): Promise; /** * Fetch a guild command for your application. * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */ export declare function getGuildCommand(guildId: Snowflake, commandId: Snowflake, $req?: CallConfig): Promise; /** * Edit a guild command. Updates for guild commands will be available immediately. * @see https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */ export declare function modifyGuildCommand(guildId: Snowflake, commandId: Snowflake, data: RESTPatchAPIApplicationGuildCommandJSONBody, $req?: CallConfig): Promise; /** * Delete a guild command. * @see https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */ export declare function deleteGuildCommand(guildId: Snowflake, commandId: Snowflake, $req?: CallConfig): Promise; /** * Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. * @danger This will overwrite **all** types of application commands: slash commands, user commands, and message commands. * @see https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */ export declare function bulkOverwriteGuildCommands(guildId: Snowflake, data: RESTPutAPIApplicationGuildCommandsJSONBody, $req?: CallConfig): Promise; /** * Fetches permissions for all commands for your application in a guild. * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */ export declare function listGuildCommandsPermissions(guildId: Snowflake, $req?: CallConfig): Promise; /** * Fetches permissions for a specific command for your application in a guild. * @see https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */ export declare function getGuildCommandPermissions(guildId: Snowflake, commandId: Snowflake, $req?: CallConfig): Promise; /** * Edits command permissions for a specific command for your application in a guild. * @warn This endpoint will overwrite existing permissions for the command in that guild * @warn Deleting or renaming a command will permanently delete all permissions for the command * @see https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */ export declare function modifyGuildCommandPermissions(guildId: Snowflake, commandId: Snowflake, data: RESTPutAPIApplicationCommandPermissionsJSONBody, $req?: CallConfig): Promise; /** * Returns a list of [application role connection metadata](https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) objects for the given application. * @see https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */ export declare function listAppRoleConnectionMetadata($req?: CallConfig): Promise; /** * Updates and returns a list of [application role connection metadata](https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) objects for the given application. * @info An application can have a maximum of 5 metadata records. * @see https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */ export declare function modifyAppRoleConnectionMetadata($req?: CallConfig): Promise; /** * Returns the [application](https://discord.com/developers/docs/resources/application#application-object) object associated with the requesting bot user. * @see https://discord.com/developers/docs/resources/application#get-current-application */ export declare function getApp($req?: CallConfig): Promise; /** * Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. * @see https://discord.com/developers/docs/resources/application#edit-current-application */ export declare function modifyApp(data: RESTPatchCurrentApplicationJSONBody, $req?: CallConfig): Promise; /** * Returns an [audit log](https://discord.com/developers/docs/resources/audit-log#audit-log-object) object for the guild. * @info Requires the [`VIEW_AUDIT_LOG`](https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags) permission. * @see https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */ export declare function getAuditLog(guildId: Snowflake, params?: RESTGetAPIAuditLogQuery, $req?: CallConfig): Promise; /** * Get a list of all rules currently configured for the guild. * @info This endpoint requires the `MANAGE_GUILD` [permission](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-permission-requirements). * @see https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */ export declare function listAutomodRules(guildId: Snowflake, $req?: CallConfig): Promise; /** * Get a single rule. * @info This endpoint requires the `MANAGE_GUILD` [permission](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-permission-requirements). * @see https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */ export declare function getAutomodRule(guildId: Snowflake, ruleId: Snowflake, $req?: CallConfig): Promise; /** * Create a new rule. * @info This endpoint requires the `MANAGE_GUILD` [permission](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-permission-requirements). * @see https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */ export declare function createAutomodRule(guildId: Snowflake, data: RESTPostAPIAutoModerationRuleJSONBody, $req?: CallConfig): Promise; /** * Modify an existing rule. * @info This endpoint requires the `MANAGE_GUILD` [permission](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-permission-requirements). * @see https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */ export declare function modifyAutomodRule(guildId: Snowflake, ruleId: Snowflake, data: RESTPatchAPIAutoModerationRuleJSONBody, $req?: CallConfig): Promise; /** * Delete a rule. * @info This endpoint requires the `MANAGE_GUILD` [permission](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-permission-requirements). * @see https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */ export declare function deleteAutomodRule(guildId: Snowflake, ruleId: Snowflake, $req?: CallConfig): Promise; /** * Get a channel by ID. * @see https://discord.com/developers/docs/resources/channel#get-channel */ export declare function getChannel(channelId: Snowflake, $req?: CallConfig): Promise; /** * Update a channel's settings. * @see https://discord.com/developers/docs/resources/channel#modify-channel */ export declare function modifyChannel(channelId: Snowflake, data: RESTPatchAPIChannelJSONBody, $req?: CallConfig): Promise; /** * Delete a channel, or close a private message. * @info Requires the `MANAGE_CHANNELS` permission for the guild, or `MANAGE_THREADS` if the channel is a thread. * @info For Community guilds, the Rules or Guidelines channel and the Community Updates channel cannot be deleted. * @warn Deleting a guild channel cannot be undone. Use this with caution, as it is impossible to undo this action when performed on a guild channel. In contrast, when used with a private message, it is possible to undo the action by opening a private message with the recipient again. * @see https://discord.com/developers/docs/resources/channel#deleteclose-channel */ export declare function deleteChannel(channelId: Snowflake, $req?: CallConfig): Promise; /** * Edit the channel permission overwrites for a user or role in a channel. * @info Only usable for guild channels. * @info Requires the `MANAGE_ROLES` permission. * @info Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). * @see https://discord.com/developers/docs/resources/channel#edit-channel-permissions */ export declare function modifyChannelPermissions(channelId: Snowflake, overwriteId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [invite](https://discord.com/developers/docs/resources/invite#invite-object) objects (with [invite metadata](https://discord.com/developers/docs/resources/invite#invite-metadata-object)) for the channel. * @info Only usable for guild channels. * @info Requires the `MANAGE_CHANNELS` permission. * @see https://discord.com/developers/docs/resources/channel#get-channel-invites */ export declare function listChannelInvites(channelId: Snowflake, $req?: CallConfig): Promise; /** * Create a new [invite](https://discord.com/developers/docs/resources/invite#invite-object) object for the channel. * @info Only usable for guild channels. * @info Requires the `CREATE_INSTANT_INVITE` permission. * @see https://discord.com/developers/docs/resources/channel#create-channel-invite */ export declare function createChannelInvite(channelId: Snowflake, data: RESTPostAPIChannelInviteJSONBody, $req?: CallConfig): Promise; /** * Delete a channel permission overwrite for a user or role in a channel. * TODO rename to something like `deleteChannelPermission` * @info Only usable for guild channels. * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/channel#delete-channel-permission */ export declare function deleteChannelPermissions(channelId: Snowflake, overwriteId: Snowflake, $req?: CallConfig): Promise; /** * Follow an Announcement Channel to send messages to a target channel. * @info Requires the `MANAGE_WEBHOOKS` permission in the target channel. * @see https://discord.com/developers/docs/resources/channel#follow-announcement-channel */ export declare function followChannel(channelId: Snowflake, data: RESTPostAPIChannelFollowersJSONBody, $req?: CallConfig): Promise; /** * Post a typing indicator for the specified channel, which expires after 10 seconds. * @info Generally bots should **not** use this route. * @see https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */ export declare function createTypingIndicator(channelId: Snowflake, $req?: CallConfig): Promise; /** * Adds a recipient to a Group DM using their access token. * @see https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */ export declare function addGDMMember(channelId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Removes a recipient from a Group DM. * @see https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient */ export declare function removeGDMMember(channelId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Creates a new thread, include a message ID to start the thread from an existing message. * @info When called on a `GUILD_TEXT` channel, creates a `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel, creates a `ANNOUNCEMENT_THREAD`. * @info Does not work on a [`GUILD_FORUM`](https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel) or a `GUILD_MEDIA` channel. * @info The id of the created thread will be the same as the id of the source message, and as such a message can only have a single thread created from it. * @see https://discord.com/developers/docs/resources/channel#start-thread-from-message */ export declare function createThread(channelId: Snowflake, data: Omit & { type?: "Public" | "Private" | "Announcement" | ThreadChannelType; }, messageId?: Snowflake, $req?: CallConfig): Promise; /** * Creates a new thread in a forum or a media channel, and sends a message within the created thread. * @info The type of the created thread is `PUBLIC_THREAD`. * @info The current user must have the `SEND_MESSAGES` permission (`CREATE_PUBLIC_THREADS` is ignored). * @see https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */ export declare function createForumThread(channelId: Snowflake, data: Omit & { message: string | (RESTPostAPIGuildForumThreadsJSONBody["message"] & { files?: RawFile[]; }); }, $req?: CallConfig): Promise; /** * Adds a member to a thread. * @param userId Member to add, defaults to self * @info Adding another member requires the ability to send messages in the thread. * @see https://discord.com/developers/docs/resources/channel#add-thread-member */ export declare function addThreadMember(threadId: Snowflake, userId?: Snowflake, $req?: CallConfig): Promise; /** * Removes a member from a thread. * @param userId Member to remove, defaults to self * @info Requires the ability to send messages in the thread. * @info Removing another member also requires the thread is not archived. * @see https://discord.com/developers/docs/resources/channel#remove-thread-member */ export declare function removeThreadMember(threadId: Snowflake, userId?: Snowflake, $req?: CallConfig): Promise; /** * Returns a [thread member](https://discord.com/developers/docs/resources/channel#thread-member-object) object for the specified user if they are a member of the thread. * @info When `with_member` is set to `true`, the thread member object will include a `member` field containing a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) object. * @see https://discord.com/developers/docs/resources/channel#get-thread-member */ export declare function getThreadMember(threadId: Snowflake, userId: Snowflake, params?: RESTGetAPIChannelThreadMemberQuery, $req?: CallConfig): Promise; /** * Returns array of [thread members](https://discord.com/developers/docs/resources/channel#thread-member-object) objects that are members of the thread. * @info When `with_member` is set to `true`, the results will be paginated and each thread member object will include a `member` field containing a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) object. * @warn Starting in API v11, this endpoint will always return paginated results. Paginated results can be enabled before API v11 by setting `with_member` to `true`. Read [the changelog](https://discord.com/developers/docs/change-log#thread-member-details-and-pagination) for details. * @warn This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](https://discord.com/developers/docs/events/gateway#privileged-intents) is enabled for your application. * @see https://discord.com/developers/docs/resources/channel#list-thread-members */ export declare function listThreadMembers(threadId: Snowflake, params?: RESTGetAPIChannelThreadMembersQuery, $req?: CallConfig): Promise; /** * Returns a list of archived threads in the channel. Alternatively, returns a list of joined private threads in the channel. * @see https://discord.com/developers/docs/resources/channel#list-private-archived-threads */ export declare function listArchivedThreads(channelId: Snowflake, archivedStatus: "public" | "private", joinedOnly?: boolean, params?: RESTGetAPIChannelThreadsArchivedQuery, $req?: CallConfig): Promise; /** * Returns a list of [emoji](https://discord.com/developers/docs/resources/emoji#emoji-object) objects for the given guild. * @info Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/emoji#list-guild-emojis */ export declare function listEmojis(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns an [emoji](https://discord.com/developers/docs/resources/emoji#emoji-object) object for the given guild and emoji IDs. * @info Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission, or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/emoji#get-guild-emoji */ export declare function getEmoji(guildId: Snowflake, emojiId: Snowflake, $req?: CallConfig): Promise; /** * Create a new emoji for the guild. * @info Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info We highly recommend that developers use the `.webp` extension when fetching emoji so they're rendered as WebP for maximum performance and compatibility. See the [Emoji Formats](https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-formats) section above for more details. * @warn Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](https://discord.com/developers/docs/topics/opcodes-and-status-codes#json). * @see https://discord.com/developers/docs/resources/emoji#create-guild-emoji */ export declare function createEmoji(guildId: Snowflake, data: RESTPostAPIGuildEmojiJSONBody, $req?: CallConfig): Promise; /** * Modify the given emoji. * @info For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/emoji#moify-guild-emoji */ export declare function modifyEmoji(guildId: Snowflake, emojiId: Snowflake, data: RESTPatchAPIGuildEmojiJSONBody, $req?: CallConfig): Promise; /** * Delete the given emoji. * @info For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */ export declare function deleteEmoji(guildId: Snowflake, emojiId: Snowflake, $req?: CallConfig): Promise; /** * Returns an object containing a list of [emoji](https://discord.com/developers/docs/resources/emoji#emoji-object) objects for the given application under the `items` key. * @info Includes a `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API. * @see https://discord.com/developers/docs/resources/emoji#list-application-emojis */ export declare function listApplicationEmojis($req?: CallConfig): Promise; /** * Returns an [emoji](https://discord.com/developers/docs/resources/emoji#emoji-object) object for the given application and emoji IDs. * @info Includes the `user` field. * @see https://discord.com/developers/docs/resources/emoji#get-application-emoji */ export declare function getApplicationEmoji(emojiId: Snowflake, $req?: CallConfig): Promise; /** * Create a new emoji for the application. * @info We highly recommend that developers use the `.webp` extension when fetching emoji so they're rendered as WebP for maximum performance and compatibility. See the [Emoji Formats](https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-formats) section above for more details. * @warn Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](https://discord.com/developers/docs/topics/opcodes-and-status-codes#json). * @see https://discord.com/developers/docs/resources/emoji#create-application-emoji */ export declare function createApplicationEmoji(data: RESTPostAPIApplicationEmojiJSONBody, $req?: CallConfig): Promise; /** * Modify the given emoji. * @see https://discord.com/developers/docs/resources/emoji#modify-application-emoji */ export declare function modifyApplicationEmoji(emojiId: Snowflake, data: RESTPatchAPIApplicationEmojiJSONBody, $req?: CallConfig): Promise; /** * Delete the given emoji. * @see https://discord.com/developers/docs/resources/emoji#delete-application-emoji */ export declare function deleteApplicationEmoji(emojiId: Snowflake, $req?: CallConfig): Promise; /** * Returns all entitlements for a given app, active and expired. * @see https://discord.com/developers/docs/resources/entitlement#list-entitlements */ export declare function listEntitlements(params?: RESTGetAPIEntitlementsQuery, $req?: CallConfig): Promise; /** * Returns an entitlement. * @see https://discord.com/developers/docs/resources/entitlement#get-entitlement */ export declare function getEntitlement(entitlementId: Snowflake, $req?: CallConfig): Promise; /** * For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. * @info The entitlement will have `consumed: true` when using [List Entitlements](https://discord.com/developers/docs/resources/entitlement#list-entitlements). * @see https://discord.com/developers/docs/resources/entitlement#consume-entitlement */ export declare function consumeEntitlement(entitlementId: Snowflake, $req?: CallConfig): Promise; /** * Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering. * @info After creating a test entitlement, you'll need to reload your Discord client. After doing so, you'll see that your server or user now has premium access. * @see https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */ export declare function createTestEntitlement(data: RESTPostAPIEntitlementJSONBody, $req?: CallConfig): Promise; /** * Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering. * @info After creating a test entitlement, you'll need to reload your Discord client. After doing so, you'll see that your server or user now has premium access. * @see https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement */ export declare function deleteTestEntitlement(entitlementId: Snowflake, $req?: CallConfig): Promise; /** * Returns an object with a valid WSS URL which the app can use when [Connecting](https://discord.com/developers/docs/events/gateway#connecting) to the Gateway. Apps should cache this value and only call this endpoint to retrieve a new URL when they are unable to properly establish a connection using the cached one. * @info This endpoint does not require authentication. * @see https://discord.com/developers/docs/events/gateway#get-gateway */ export declare function getGateway($req?: CallConfig): Promise; /** * Returns an object based on the information in [Get Gateway](https://discord.com/developers/docs/events/gateway#get-gateway), plus additional metadata that can help during the operation of large or [sharded](https://discord.com/developers/docs/events/gateway#sharding) bots. Unlike the [Get Gateway](https://discord.com/developers/docs/events/gateway#get-gateway), this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds. * @warn This endpoint requires authentication using a valid bot token. * @see https://discord.com/developers/docs/events/gateway#get-gateway-bot */ export declare function getGatewayBot($req?: CallConfig): Promise; /** * Returns a list of [guild scheduled event](https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object) objects for the given guild. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#list-guild-scheduled-events */ export declare function listScheduledEvents(guildId: Snowflake, params?: RESTGetAPIGuildScheduledEventsQuery, $req?: CallConfig): Promise; /** * Create a guild scheduled event in the guild. * @info A guild can have a maximum of 100 events with `SCHEDULED` or `ACTIVE` status at any time. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */ export declare function createScheduledEvent(guildId: Snowflake, data: RESTPostAPIGuildScheduledEventJSONBody, $req?: CallConfig): Promise; /** * Get a guild scheduled event. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event */ export declare function getScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake, params?: RESTGetAPIGuildScheduledEventQuery, $req?: CallConfig): Promise; /** * Modify a guild scheduled event. * @info To start or end an event, use this endpoint to modify the event's [status](https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status) field. * @info This endpoint silently discards `entity_metadata` for non-`EXTERNAL` events. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */ export declare function modifyScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake, data: RESTPatchAPIGuildScheduledEventJSONBody, $req?: CallConfig): Promise; /** * Delete a guild scheduled event. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event */ export declare function deleteScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake, $req?: CallConfig): Promise; /** * Get a list of guild scheduled event users subscribed to a guild scheduled event. * @see https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users */ export declare function getScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake, params?: RESTGetAPIGuildScheduledEventUsersQuery, $req?: CallConfig): Promise; /** * Returns a [guild template](https://discord.com/developers/docs/resources/guild-template#guild-template-object) object for the given code. * @see https://discord.com/developers/docs/resources/guild-template#get-guild-template */ export declare function getTemplate(code: string, $req?: CallConfig): Promise; /** * Returns a [guild template](https://discord.com/developers/docs/resources/guild-template#guild-template-object) object for the given code. * @see https://discord.com/developers/docs/change-log#guild-create-deprecation * @deprecated */ export declare function createFromTemplate(code: string, data: RESTPostAPITemplateCreateGuildJSONBody, $req?: CallConfig): Promise; /** * Returns an array of [guild template](https://discord.com/developers/docs/resources/guild-template#guild-template-object) objects. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild-template#get-guild-templates */ export declare function listTemplates(guildId: Snowflake, $req?: CallConfig): Promise; /** * Creates a template for the guild. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild-template#create-guild-template */ export declare function createTemplate(guildId: Snowflake, data: RESTPostAPIGuildTemplatesJSONBody, $req?: CallConfig): Promise; /** * Syncs the template to the guild's current state. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild-template#sync-guild-template */ export declare function syncTemplate(guildId: Snowflake, code: string, $req?: CallConfig): Promise; /** * Modifies the template's metadata. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild-template#modify-guild-template */ export declare function modifyTemplate(guildId: Snowflake, code: string, data: RESTPatchAPIGuildTemplateJSONBody, $req?: CallConfig): Promise; /** * Deletes the template. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild-template#delete-guild-template */ export declare function deleteTemplate(guildId: Snowflake, code: string, $req?: CallConfig): Promise; /** * Create a new guild. * @see https://discord.com/developers/docs/change-log#guild-create-deprecation * @deprecated */ export declare function createGuild(data: RESTPostAPIGuildsJSONBody, $req?: CallConfig): Promise; /** * Returns the [guild](https://discord.com/developers/docs/resources/guild#guild-object) object for the given id. * @info If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild. * @see https://discord.com/developers/docs/resources/guild#get-guild */ export declare function getGuild(guildId: Snowflake, params?: RESTGetAPIGuildQuery, $req?: CallConfig): Promise; /** * Returns the [guild preview](https://discord.com/developers/docs/resources/guild#guild-preview-object) object for the given id. * @info If the user is not in the guild, then the guild must be [discoverable](https://discord.com/developers/docs/resources/guild#guild-object-guild-features). * @see https://discord.com/developers/docs/resources/guild#get-guild-preview */ export declare function getGuildPreview(guildId: Snowflake, $req?: CallConfig): Promise; /** * Modify a guild's settings. * @info Requires the `MANAGE_GUILD` permission. * @warn Attempting to add or remove the `COMMUNITY` [guild feature](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) requires the `ADMINISTRATOR` permission. * @see https://discord.com/developers/docs/resources/guild#modify-guild */ export declare function modifyGuild(guildId: Snowflake, data: RESTPatchAPIGuildJSONBody, $req?: CallConfig): Promise; /** * Delete a guild. * @see https://discord.com/developers/docs/change-log#guild-create-deprecation * @deprecated */ export declare function deleteGuild(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of guild [channel](https://discord.com/developers/docs/resources/channel#channel-object) objects. * @info Does not include threads. * @see https://discord.com/developers/docs/resources/guild#get-guild-channels */ export declare function listChannels(guildId: Snowflake, $req?: CallConfig): Promise; /** * Create a new [channel](https://discord.com/developers/docs/resources/channel#channel-object) object for the guild. * @info Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. * @info Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. * @see https://discord.com/developers/docs/resources/guild#create-guild-channel */ export declare function createChannel(guildId: Snowflake, data: RESTPostAPIGuildChannelJSONBody, $req?: CallConfig): Promise; /** * Modify the positions of a set of [channel](https://discord.com/developers/docs/resources/channel#channel-object) objects for the guild. * @info Requires the `MANAGE_GUILD` permission. * @info Only channels to be modified are required. * @see https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */ export declare function modifyChannelPositions(guildId: Snowflake, data: RESTPatchAPIGuildChannelPositionsJSONBody, $req?: CallConfig): Promise; /** * Returns all active threads in the guild, including public and private threads. * @info Threads are ordered by their `id`, in descending order. * @see https://discord.com/developers/docs/resources/guild#list-active-guild-threads */ export declare function listActiveThreads(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) object for the specified user. * @see https://discord.com/developers/docs/resources/guild#get-guild-member */ export declare function getMember(guildId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) objects that are members of the guild. * @warn This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](https://discord.com/developers/docs/events/gateway#privileged-intents) is enabled for your application. * @see https://discord.com/developers/docs/resources/guild#list-guild-members */ export declare function listMembers(guildId: Snowflake, params?: RESTGetAPIGuildMembersQuery, $req?: CallConfig): Promise; /** * Returns a list of [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) objects whose username or nickname starts with a provided string. * @see https://discord.com/developers/docs/resources/guild#search-guild-members */ export declare function searchMembers(guildId: Snowflake, params?: RESTGetAPIGuildMembersSearchQuery, $req?: CallConfig): Promise; /** * Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. * @info The Authorization header must be a Bot token (belonging to the same application used for authorization), and the bot must be a member of the guild with `CREATE_INSTANT_INVITE` permission. * @see https://discord.com/developers/docs/resources/guild#add-guild-member */ export declare function addMember(guildId: Snowflake, userId: Snowflake, data: RESTPutAPIGuildMemberJSONBody, $req?: CallConfig): Promise; /** * Modify attributes of a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object), defaults to self. * @see https://discord.com/developers/docs/resources/guild#modify-guild-member */ export declare function modifyMember(guildId: Snowflake, userId: T, data: T extends "@me" ? RESTPatchAPICurrentGuildMemberJSONBody : RESTPatchAPIGuildMemberJSONBody, $req?: CallConfig): Promise; /** * Adds a role to a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object). * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#add-guild-member-role */ export declare function addMemberRole(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, $req?: CallConfig): Promise; /** * Removes a role from a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object). * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#remove-guild-member-role */ export declare function removeMemberRole(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, $req?: CallConfig): Promise; /** * Remove a member from a guild. * @info Requires `KICK_MEMBERS` permission. * @see https://discord.com/developers/docs/resources/guild#remove-guild-member */ export declare function removeMember(guildId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [ban](https://discord.com/developers/docs/resources/guild#ban-object) objects for the users banned from this guild. * @info Requires `BAN_MEMBERS` permission. * @see https://discord.com/developers/docs/resources/guild#get-guild-bans */ export declare function listBans(guildId: Snowflake, params?: RESTGetAPIGuildBansQuery, $req?: CallConfig): Promise; /** * Returns a [ban](https://discord.com/developers/docs/resources/guild#ban-object) object for the given user or a 404 not found if the ban cannot be found. * @info Requires `BAN_MEMBERS` permission. * @see https://discord.com/developers/docs/resources/guild#get-guild-ban */ export declare function getBan(guildId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Create a guild ban, and optionally delete previous messages sent by the banned user. * @info Requires `BAN_MEMBERS` permission. * @see https://discord.com/developers/docs/resources/guild#create-guild-ban */ export declare function createBan(guildId: Snowflake, userId: Snowflake, data: RESTPutAPIGuildBanJSONBody, $req?: CallConfig): Promise; /** * Remove the ban for a user. * @info Requires `BAN_MEMBERS` permission. * @see https://discord.com/developers/docs/resources/guild#remove-guild-ban */ export declare function deleteBan(guildId: Snowflake, userId: Snowflake, $req?: CallConfig): Promise; /** * Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users. * @info Requires both the `BAN_MEMBERS` and `MANAGE_GUILD` permissions. * @info If none of the users could be banned, an error response code `500000: Failed to ban users` is returned instead. * @see https://discord.com/developers/docs/resources/guild#bulk-guild-ban */ export declare function bulkCreateBan(guildId: Snowflake, data: RESTPostAPIGuildBulkBanJSONBody, $req?: CallConfig): Promise; /** * Returns a list of [role](https://discord.com/developers/docs/topics/permissions#role-object) objects for the guild. * @see https://discord.com/developers/docs/resources/guild#get-guild-roles */ export declare function listRoles(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [role](https://discord.com/developers/docs/topics/permissions#role-object) object for the specified role. * @see https://discord.com/developers/docs/resources/guild#get-guild-role */ export declare function getRole(guildId: Snowflake, roleId: Snowflake, $req?: CallConfig): Promise; /** * Create a new [role](https://discord.com/developers/docs/topics/permissions#role-object) for the guild. * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#create-guild-role */ export declare function createRole(guildId: Snowflake, data: RESTPostAPIGuildRoleJSONBody, $req?: CallConfig): Promise; /** * Modify the positions of a set of [role](https://discord.com/developers/docs/topics/permissions#role-object) objects for the guild. * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#modify-guild-role-positions */ export declare function modifyRolePositions(guildId: Snowflake, data: RESTPatchAPIGuildRolePositionsJSONBody, $req?: CallConfig): Promise; /** * Modify a guild role. * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#modify-guild-role */ export declare function modifyRole(guildId: Snowflake, roleId: Snowflake, data: RESTPatchAPIGuildRoleJSONBody, $req?: CallConfig): Promise; /** * Modify a guild's MFA level. * @info Requires guild ownership. * @see https://discord.com/developers/docs/change-log#guild-create-deprecation * @deprecated */ export declare function modifyMFALevel(guildId: Snowflake, data: RESTPostAPIGuildsMFAJSONBody, $req?: CallConfig): Promise; /** * Delete a guild role. * @info Requires the `MANAGE_ROLES` permission. * @see https://discord.com/developers/docs/resources/guild#delete-guild-role */ export declare function deleteRole(guildId: Snowflake, roleId: Snowflake, $req?: CallConfig): Promise; /** * Returns an object with one `pruned` key indicating the number of members that would be removed in a prune operation. * @info By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be counted in the prune and users with additional roles will not. * @see https://discord.com/developers/docs/resources/guild#get-guild-prune-count */ export declare function getPruneCount(guildId: Snowflake, params?: RESTGetAPIGuildPruneCountQuery, $req?: CallConfig): Promise; /** * Begin a prune operation. * @info Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions. * @info By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not. * @see https://discord.com/developers/docs/resources/guild#begin-guild-prune */ export declare function startPrune(guildId: Snowflake, data: RESTPostAPIGuildPruneJSONBody, $req?: CallConfig): Promise; /** * Returns a list of [voice region](https://discord.com/developers/docs/resources/voice#voice-region-object) objects for the guild. * @info Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled. * @see https://discord.com/developers/docs/resources/guild#get-guild-voice-regions */ export declare function listGuildVoiceRegions(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [invite](https://discord.com/developers/docs/resources/invite#invite-object) objects. * @info Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission. * @info [Invite Metadata](https://discord.com/developers/docs/resources/invite#invite-metadata-object) is included with the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#get-guild-invites */ export declare function listInvites(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [integration](https://discord.com/developers/docs/resources/guild#integration-object) objects for the guild. * @info Requires the `MANAGE_GUILD` permission. * @info This endpoint returns a maximum of 50 integrations. If a guild has more integrations, they cannot be accessed. * @see https://discord.com/developers/docs/resources/guild#get-guild-integrations */ export declare function listIntegrations(guildId: Snowflake, $req?: CallConfig): Promise; /** * Delete the attached [integration](https://discord.com/developers/docs/resources/guild#integration-object) object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#delete-guild-integration */ export declare function deleteIntegration(guildId: Snowflake, integrationId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [guild widget settings](https://discord.com/developers/docs/resources/guild#guild-widget-settings-object) object. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#get-guild-widget-settings */ export declare function getWidgetSettings(guildId: Snowflake, $req?: CallConfig): Promise; /** * Modify a [guild widget settings](https://discord.com/developers/docs/resources/guild#guild-widget-settings-object) object for the guild. All attributes may be passed in with JSON and modified. * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#modify-guild-widget-settings */ export declare function modifyWidgetSettings(guildId: Snowflake, data: RESTPatchAPIGuildWidgetSettingsJSONBody, $req?: CallConfig): Promise; /** * Returns the [widget](https://discord.com/developers/docs/resources/guild#guild-widget-object) for the guild. * @see https://discord.com/developers/docs/resources/guild#get-guild-widget */ export declare function getWidgetJSON(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a partial [invite](https://discord.com/developers/docs/resources/invite#invite-object) object for guilds with that feature enabled. * @info Requires the `MANAGE_GUILD` permission. * @info `code` will be null if a vanity url for the guild is not set. * @info This endpoint is required to get the usage count of the vanity invite, but the invite code can be accessed as `vanity_url_code` in the [guild object](https://discord.com/developers/docs/resources/guild#guild-object) without having the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#get-guild-vanity-url */ export declare function getVanityInvite(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a PNG image widget for the guild. * @info Requires no permissions or authentication. * @see https://discord.com/developers/docs/resources/guild#get-guild-widget-image */ export declare function getWidgetImage(guildId: Snowflake, params?: RESTGetAPIGuildWidgetImageQuery, $req?: CallConfig): Promise; /** * Returns the [Welcome Screen](https://discord.com/developers/docs/resources/guild#welcome-screen-object) object for the guild. * @info If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required. * @see https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */ export declare function getWelcomeScreen(guildId: Snowflake, $req?: CallConfig): Promise; /** * Modify the guild's [Welcome Screen](https://discord.com/developers/docs/resources/guild#welcome-screen-object). * @info Requires the `MANAGE_GUILD` permission. * @see https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen */ export declare function modifyWelcomeScreen(guildId: Snowflake, data: RESTPatchAPIGuildWelcomeScreenJSONBody, $req?: CallConfig): Promise; /** * Returns the [Onboarding](https://discord.com/developers/docs/resources/guild#guild-onboarding-object) object for the guild. * @see https://discord.com/developers/docs/resources/guild#get-guild-onboarding */ export declare function getOnboarding(guildId: Snowflake, $req?: CallConfig): Promise; /** * Modifies the onboarding configuration of the guild. * @info Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions. * @info Onboarding enforces constraints when enabled. These constraints are that there must be at least 7 Default Channels and at least 5 of them must allow sending messages to the @everyone role. The `mode` field modifies what is considered when enforcing these constraints. * @see https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */ export declare function modifyOnboarding(guildId: Snowflake, data: RESTPutAPIGuildOnboardingJSONBody, $req?: CallConfig): Promise; /** * Modifies the incident actions of the guild. * TODO rename to `modifyIncidentActions` * @info Requires the `MANAGE_GUILD` permission. * @info Both `invites_disabled_until` and `dms_disabled_until` can be enabled for a maximal timespan of 24 hours in the future. * @see https://discord.com/developers/docs/resources/guild#modify-incident-actions */ export declare function modifyGuildIncidentActions(guildId: Snowflake, data: RESTPutAPIGuildIncidentActionsJSONBody, $req?: CallConfig): Promise; /** * Returns an [invite](https://discord.com/developers/docs/resources/invite#invite-object) object for the given code. * @see https://discord.com/developers/docs/resources/invite#get-invite */ export declare function getInvite(code: string, params?: RESTGetAPIInviteQuery, $req?: CallConfig): Promise; /** * Delete an invite. * @info Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. * @see https://discord.com/developers/docs/resources/invite#delete-invite */ export declare function deleteInvite(code: string, $req?: CallConfig): Promise; /** * Retrieves the messages in a channel. * @info If operating on a guild channel, this endpoint requires the current user to have the `VIEW_CHANNEL` permission. If the channel is a voice channel, they must _also_ have the `CONNECT` permission. * @info If the current user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no messages will be returned. * @info The `before`, `after`, and `around` parameters are mutually exclusive, only one may be passed at a time. * @see https://discord.com/developers/docs/resources/message#get-channel-messages */ export declare function listMessages(channelId: Snowflake, params?: RESTGetAPIChannelMessagesQuery, $req?: CallConfig): Promise; /** * Retrieves a specific message in the channel. * @info If operating on a guild channel, this endpoint requires the current user to have the `VIEW_CHANNEL` and `READ_MESSAGE_HISTORY` permissions. If the channel is a voice channel, they must _also_ have the `CONNECT` permission. * @see https://discord.com/developers/docs/resources/message#get-channel-message */ export declare function getMessage(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Post a message to a guild text or DM channel. * @info To create a message as a reply or forward of another message, apps can include a [`message_reference`](https://discord.com/developers/docs/resources/message#message-reference-structure). * @warn Discord may strip certain characters from message content, like invalid unicode characters or characters which cause unexpected message formatting. If you are passing user-generated strings into message content, consider sanitizing the data to prevent unexpected behavior and using `allowed_mentions` to prevent unexpected mentions. * @see https://discord.com/developers/docs/resources/message#create-message */ export declare function createMessage(channelId: Snowflake, data: string | (RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; }), $req?: CallConfig): Promise; /** * Crosspost a message in an Announcement Channel to following channels. * @info This endpoint requires the `SEND_MESSAGES` permission, if the current user sent the message, or additionally the `MANAGE_MESSAGES` permission, for all other messages, to be present for the current user. * @see https://discord.com/developers/docs/resources/message#crosspost-message */ export declare function crosspostMessage(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Create a reaction for the message. * @info This endpoint requires the `READ_MESSAGE_HISTORY` permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the `ADD_REACTIONS` permission to be present on the current user. * @see https://discord.com/developers/docs/resources/message#create-reaction */ export declare function createReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, $req?: CallConfig): Promise; /** * Delete a user's reaction, defaults to removing the current user's reaction for a message. * @see https://discord.com/developers/docs/resources/message#delete-reaction */ export declare function deleteReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId?: Snowflake, $req?: CallConfig): Promise; /** * Get a list of users that reacted with this emoji. * @see https://discord.com/developers/docs/resources/message#get-reactions */ export declare function listReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, params?: RESTGetAPIChannelMessageReactionUsersQuery, $req?: CallConfig): Promise; /** * Deletes all reactions on a message. * @info This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. * @see https://discord.com/developers/docs/resources/message#delete-all-reactions */ export declare function deleteAllReactions(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Deletes all the reactions for a given emoji on a message. * @info This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. * @see https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji */ export declare function deleteAllEmojiReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, $req?: CallConfig): Promise; /** * Edit a previously sent message. * @info The fields `content`, `embeds`, `flags` and `components` can be edited by the original message author. Other users can only edit `flags` and only if they have the `MANAGE_MESSAGES` permission in the corresponding channel. * @info When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. * @info When the `content` field is edited, the arrays `mentions` and `mention_roles` and the boolean `mention_everyone` in the message object will be reconstructed from scratch based on the new content. * @info When the message flag `IS_COMPONENTS_V2` is set, the reconstructed arrays and boolean are based on the edited content in the `components` array. The `allowed_mentions` field of the edit request controls how this happens. If there is no explicit `allowed_mentions` in the edit request, the content will be parsed with _default_ allowances, that is, without regard to whether or not an `allowed_mentions` was present in the request that originally created the message. * @warn Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * @see https://discord.com/developers/docs/resources/message#edit-message */ export declare function editMessage(channelId: Snowflake, messageId: Snowflake, data: string | (RESTPatchAPIChannelMessageJSONBody & { files?: RawFile[]; }), $req?: CallConfig): Promise; /** * Delete a message. * @info If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the `MANAGE_MESSAGES` permission. * @see https://discord.com/developers/docs/resources/message#delete-message */ export declare function deleteMessage(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Delete multiple messages in a single request. * @info This endpoint can only be used on guild channels and requires the `MANAGE_MESSAGES` permission. * @warn This endpoint will not delete messages older than 2 weeks, and will fail with a 400 BAD REQUEST if any message provided is older than that or if any duplicate message IDs are provided. * @see https://discord.com/developers/docs/resources/message#bulk-delete-messages */ export declare function bulkDelete(channelId: Snowflake, data: RESTPostAPIChannelMessagesBulkDeleteJSONBody, $req?: CallConfig): Promise; /** * Gets the first 50 pinned messages in a channel, returning an array of [message](https://discord.com/developers/docs/resources/message#message-object) objects on success. * @info Requires the `VIEW_CHANNEL` permission. If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned. * @see https://discord.com/developers/docs/resources/message#get-pinned-messages-deprecated * @deprecated */ export declare function listPins(channelId: Snowflake, $req?: CallConfig): Promise; /** * Retrieves the list of pins in a channel. * @info Requires the `VIEW_CHANNEL` permission. If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned. * @see https://discord.com/developers/docs/resources/message#get-channel-pins */ export declare function listChannelPins(channelId: Snowflake, params?: RESTGetAPIChannelMessagesPinsQuery, $req?: CallConfig): Promise; /** * Pin a message in a channel. * @info Requires the `PIN_MESSAGES` permission. * @see https://discord.com/developers/docs/resources/message#pin-message */ export declare function createPin(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Unpin a message in a channel. * @info Requires the `PIN_MESSAGES` permission. * @see https://discord.com/developers/docs/resources/message#unpin-message */ export declare function deletePin(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Get a list of users that voted for this specific answer. * @see https://discord.com/developers/docs/resources/poll#get-answer-voters */ export declare function listAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, params?: RESTGetAPIPollAnswerVotersQuery, $req?: CallConfig): Promise; /** * Immediately ends the poll. You cannot end polls from other users. * @see https://discord.com/developers/docs/resources/poll#end-poll */ export declare function endPoll(channelId: Snowflake, messageId: Snowflake, $req?: CallConfig): Promise; /** * Returns all SKUs for a given application. * @info Because of how our SKU and subscription systems work, you will see two SKUs for your subscription offering. For integration and testing entitlements for Subscriptions, you should use the SKU with `type: 5`. * @see https://discord.com/developers/docs/resources/sku#list-skus */ export declare function listSKUs($req?: CallConfig): Promise; /** * Send a soundboard sound to a voice channel the user is connected to. * @info Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNAL_SOUNDS` permission if the sound is from a different server. Additionally, requires the user to be connected to the voice channel, having a [voice state](https://discord.com/developers/docs/resources/voice#voice-state-object) without `deaf`, `self_deaf`, `mute`, or `suppress` enabled. * @see https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */ export declare function sendSound(channelId: Snowflake, data: RESTPostAPISoundboardSendSoundJSONBody, $req?: CallConfig): Promise; /** * Returns an array of [soundboard sound](https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object) objects that can be used by all users. * @param guildId Returns a list of the guild's soundboard sounds. * @info Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */ export declare function listSounds(guildId?: Snowflake, $req?: CallConfig): Promise; /** * Returns a [soundboard sound](https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object) object for the given sound id. * @info Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */ export declare function getSound(guildId: Snowflake, soundId: Snowflake, $req?: CallConfig): Promise; /** * Create a new soundboard sound for the guild. * @info Requires the `CREATE_GUILD_EXPRESSIONS` permission. * @info Soundboard sounds have a max file size of 512kb and a max duration of 5.2 seconds. * @see https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */ export declare function createSound(guildId: Snowflake, data: RESTPostAPIGuildSoundboardSoundJSONBody, $req?: CallConfig): Promise; /** * Modify the given soundboard sound. * @info For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound */ export declare function modifySound(guildId: Snowflake, soundId: Snowflake, data: RESTPatchAPIGuildSoundboardSoundJSONBody, $req?: CallConfig): Promise; /** * Delete the given soundboard sound. * @info For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */ export declare function deleteSound(guildId: Snowflake, soundId: Snowflake, $req?: CallConfig): Promise; /** * Creates a new Stage instance associated to a Stage channel. * @info Requires the user to be a moderator of the Stage channel. * @see https://discord.com/developers/docs/resources/stage-instance#create-stage-instance */ export declare function createStage(data: RESTPostAPIStageInstanceJSONBody, $req?: CallConfig): Promise; /** * Gets the stage instance associated with the Stage channel, if it exists. * @see https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */ export declare function getStage(channelId: Snowflake, $req?: CallConfig): Promise; /** * Updates fields of an existing Stage instance. * @info Requires the user to be a moderator of the Stage channel. * @see https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */ export declare function modifyStage(channelId: Snowflake, data: RESTPatchAPIStageInstanceJSONBody, $req?: CallConfig): Promise; /** * Deletes the Stage instance. * @info Requires the user to be a moderator of the Stage channel. * @see https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance */ export declare function deleteStage(channelId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [sticker](https://discord.com/developers/docs/resources/sticker#sticker-object) object for the given sticker ID. * @see https://discord.com/developers/docs/resources/sticker#get-sticker */ export declare function getSticker(stickerId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of available sticker packs. * @see https://discord.com/developers/docs/resources/sticker#list-sticker-packs */ export declare function listStickerPacks($req?: CallConfig): Promise; /** * Returns a [sticker pack](https://discord.com/developers/docs/resources/sticker#sticker-pack-object) object for the given sticker pack ID. * @see https://discord.com/developers/docs/resources/sticker#get-sticker-pack */ export declare function getStickerPack(packId: Snowflake, $req?: CallConfig): Promise; /** * Returns an array of [sticker](https://discord.com/developers/docs/resources/sticker#sticker-object) objects for the given guild. * @info Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/sticker#list-guild-stickers */ export declare function listStickers(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [sticker](https://discord.com/developers/docs/resources/sticker#sticker-object) object for the given guild and sticker IDs. * @info Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/sticker#get-guild-sticker */ export declare function getGuildSticker(guildId: Snowflake, stickerId: Snowflake, $req?: CallConfig): Promise; /** * Create a new sticker for the guild. * @info Requires the `CREATE_GUILD_EXPRESSIONS` permission. * @warn Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` [guild feature](https://discord.com/developers/docs/resources/guild#guild-object-guild-features). * @warn Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels. * @see https://discord.com/developers/docs/resources/sticker#create-guild-sticker */ export declare function createSticker(guildId: Snowflake, data: RESTPostAPIGuildStickerFormDataBody & { file: RawFile; }, $req?: CallConfig): Promise; /** * Modify the given sticker. * @info For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */ export declare function modifySticker(guildId: Snowflake, stickerId: Snowflake, data: RESTPatchAPIGuildStickerJSONBody, $req?: CallConfig): Promise; /** * Delete the given sticker. * @info For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. * @info For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. * @see https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */ export declare function deleteSticker(guildId: Snowflake, stickerId: Snowflake, $req?: CallConfig): Promise; /** * Returns all subscriptions containing the SKU, filtered by user. * @see https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */ export declare function listSubscriptions(skuId: Snowflake, params?: RESTGetAPISKUSubscriptionsQuery, $req?: CallConfig): Promise; /** * Get a subscription by its ID. * @see https://discord.com/developers/docs/resources/subscription#get-sku-subscription */ export declare function getSubscription(skuId: Snowflake, subscriptionId: Snowflake, $req?: CallConfig): Promise; /** * Returns a [user](https://discord.com/developers/docs/resources/user#user-object) object for a given user ID, defaults to self. * @see https://discord.com/developers/docs/resources/user#get-user */ export declare function getUser(userId?: Snowflake, $req?: CallConfig): Promise; /** * Modify the requester's user account settings. * @see https://discord.com/developers/docs/resources/user#modify-current-user */ export declare function modifyUser(data: RESTPatchAPICurrentUserJSONBody, $req?: CallConfig): Promise; /** * Returns a list of partial [guild](https://discord.com/developers/docs/resources/guild#guild-object) objects the current user is a member of. * @info For OAuth2, requires the `guilds` scope. * @info This endpoint returns 200 guilds by default, which is the maximum number of guilds a non-bot user can join. Therefore, pagination is **not needed** for integrations that need to get a list of the users' guilds. * @see https://discord.com/developers/docs/resources/user#get-current-user-guilds */ export declare function listGuilds(params?: RESTGetAPICurrentUserGuildsQuery, $req?: CallConfig): Promise; /** * Returns a [guild member](https://discord.com/developers/docs/resources/guild#guild-member-object) object for the current user. * @info Requires the `guilds.members.read` OAuth2 scope. * @warn Bots cannot use this endpoint * @see https://discord.com/developers/docs/resources/user#get-current-user-guild-member */ export declare function getCurrentUserMember(guildId: Snowflake, $req?: CallConfig): Promise; /** * Leave a guild. * @see https://discord.com/developers/docs/resources/user#leave-member */ export declare function leaveGuild(guildId: Snowflake, $req?: CallConfig): Promise; /** * Create a new DM channel with a user. * @warn You should not use this endpoint to DM everyone in a server about something. DMs should generally be initiated by a user action. If you open a significant amount of DMs too quickly, your bot may be rate limited or blocked from opening new ones. * @see https://discord.com/developers/docs/resources/user#create-dm */ export declare function createDM(data: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of [connection](https://discord.com/developers/docs/resources/user#connection-object) objects. * @info Requires the `connections` OAuth2 scope. * @see https://discord.com/developers/docs/resources/user#get-current-user-connections */ export declare function listConnections($req?: CallConfig): Promise; /** * Returns the [application role connection](https://discord.com/developers/docs/resources/user#application-role-connection-object) for the user. * @info Requires the `connections` OAuth2 scope. * @see https://discord.com/developers/docs/resources/user#get-current-user-application-role-connection */ export declare function getRoleConnection(applicationId?: Snowflake, $req?: CallConfig): Promise; /** * Updates and returns the [application role connection](https://discord.com/developers/docs/resources/user#application-role-connection-object) for the user. * @info Requires the `connections` OAuth2 scope. * @see https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection */ export declare function modifyRoleConnection(applicationId: Snowflake | undefined, data: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, $req?: CallConfig): Promise; /** * Returns an array of [voice region](https://discord.com/developers/docs/resources/voice#voice-region-object) objects that can be used when setting a voice or stage channel's [`rtc_region`](https://discord.com/developers/docs/resources/channel#channel-object-channel-structure). * @see https://discord.com/developers/docs/resources/voice#list-voice-regions */ export declare function listVoiceRegions($req?: CallConfig): Promise; /** * Returns the specified user's [voice state](https://discord.com/developers/docs/resources/voice#voice-state-object) in the guild, defaults to self. * @see https://discord.com/developers/docs/resources/voice#get-user-voice-state */ export declare function getVoiceState(guildId: Snowflake, userId?: Snowflake, $req?: CallConfig): Promise; /** * Updates a user's voice state, defaults to self. * @param data.request_to_speak_timestamp Not usable for other users * @see https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state */ export declare function modifyVoiceState(guildId: Snowflake, data: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, userId?: Snowflake, $req?: CallConfig): Promise; /** * Creates a new webhook and returns a [webhook](https://discord.com/developers/docs/resources/webhook#webhook-object) object on success. * @info Requires the `MANAGE_WEBHOOKS` permission. * @see https://discord.com/developers/docs/resources/webhook#create-webhook */ export declare function createWebhook(channelId: Snowflake, data: RESTPostAPIChannelWebhookJSONBody, $req?: CallConfig): Promise; /** * Returns a list of channel [webhook](https://discord.com/developers/docs/resources/webhook#webhook-object) objects. * @info Requires the `MANAGE_WEBHOOKS` permission. * @see https://discord.com/developers/docs/resources/webhook#get-channel-webhooks */ export declare function listChannelWebhooks(channelId: Snowflake, $req?: CallConfig): Promise; /** * Returns a list of guild [webhook](https://discord.com/developers/docs/resources/webhook#webhook-object) objects. * @info Requires the `MANAGE_WEBHOOKS` permission. * @see https://discord.com/developers/docs/resources/webhook#get-guild-webhooks */ export declare function listGuildWebhooks(guildId: Snowflake, $req?: CallConfig): Promise; /** * Returns the new [webhook](https://discord.com/developers/docs/resources/webhook#webhook-object) object for the given id. * @info This request requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook. [(see: webhook.application_id)](https://discord.com/developers/docs/resources/webhook#webhook-object) * @see https://discord.com/developers/docs/resources/webhook#get-webhook */ export declare function getWebhook(webhookId: Snowflake, webhookToken?: T, $req?: CallConfig): Promise; /** * Modify a webhook. * @info Requires the `MANAGE_WEBHOOKS` permission. * @see https://discord.com/developers/docs/resources/webhook#modify-webhook */ export declare function modifyWebhook(webhookId: Snowflake, data: T extends string ? RESTPatchAPIWebhookWithTokenJSONBody : RESTPatchAPIWebhookJSONBody, webhookToken?: T, $req?: CallConfig): Promise; /** * Delete a webhook permanently. * @info Requires the `MANAGE_WEBHOOKS` permission. * @see https://discord.com/developers/docs/resources/webhook#delete-webhook */ export declare function deleteWebhook(webhookId: Snowflake, webhookToken?: string, $req?: CallConfig): Promise; /** * Execute a webhook. * @info If the webhook channel is a forum or media channel, you must provide either `thread_id` in the query string params, or `thread_name` in the JSON/form params. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the channel. * @info For the webhook embed objects, you can set every field except `type` (it will be `rich` regardless of if you try to set it), `provider`, `video`, and any `height`, `width`, or `proxy_url` values for images. * @see https://discord.com/developers/docs/resources/webhook#execute-webhook */ export declare function executeWebhook(webhookId: Snowflake, webhookToken: string, data: string | (RESTPostAPIWebhookWithTokenJSONBody & { files?: RawFile[]; }), params?: T, $req?: CallConfig): Promise; /** * Returns a previously-sent webhook message from the same token. * @see https://discord.com/developers/docs/resources/webhook#get-webhook-message */ export declare function getWebhookMessage(webhookId: Snowflake, webhookToken: string, messageId: Snowflake, params?: RESTGetAPIWebhookWithTokenMessageQuery, $req?: CallConfig): Promise; /** * Edits a previously-sent webhook message from the same token. * @warn Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. * @see https://discord.com/developers/docs/resources/webhook#edit-webhook-message */ export declare function editWebhookMessage(webhookId: Snowflake, webhookToken: string, messageId: Snowflake, data: string | (RESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; }), params?: RESTPatchAPIWebhookWithTokenMessageQuery, $req?: CallConfig): Promise; /** * Deletes a message that was created by the webhook. * @see https://discord.com/developers/docs/resources/webhook#delete-webhook-message */ export declare function deleteWebhookMessage(webhookId: Snowflake, webhookToken: string, messageId: Snowflake, params?: Pick, $req?: CallConfig): Promise;