dressed
Version:
A sleek, serverless-ready Discord bot framework.
265 lines (264 loc) • 13.8 kB
TypeScript
import type { RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildOnboardingResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRoleResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPIVoiceRegionsResult, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildOnboardingJSONBody, RESTPutAPIGuildOnboardingResult, Snowflake } from "discord-api-types/v10";
/**
* @deprecated Discord is removing the ability for applications to create guilds after 2025-07-15
*
* Create a new guild.
* @param guild The guild data
*/
export declare function createGuild(data: RESTPostAPIGuildsJSONBody): Promise<RESTPostAPIGuildsResult>;
/**
* Get a guild by ID.
* @param guild The guild to fetch
* @param options Optional parameters for the request
*/
export declare function getGuild(guild: Snowflake, options?: RESTGetAPIGuildQuery): Promise<RESTGetAPIGuildResult>;
/**
* Returns the guild preview object for the given id.
* @param guild The guild to fetch
*/
export declare function getGuildPreview(guild: Snowflake): Promise<RESTGetAPIGuildPreviewResult>;
/**
* Modify a guild's settings.
* @param guild The guild to modify
* @param data The new data for the guild
*/
export declare function modifyGuild(guild: Snowflake, data: RESTPatchAPIGuildJSONBody): Promise<RESTPatchAPIGuildResult>;
/**
* Delete a guild permanently. User must be owner.
* @param guild The guild to delete
*/
export declare function deleteGuild(guild: Snowflake): Promise<void>;
/**
* Get a list of channels in a guild, does not include threads
* @param guild The guild to get the channels from
*/
export declare function listChannels(guild: Snowflake): Promise<RESTGetAPIGuildChannelsResult>;
/**
* Create a new channel.
* @param guild The guild to create the channels in
* @param data The data for the new channel
*/
export declare function createChannel(guild: Snowflake, data: RESTPostAPIGuildChannelJSONBody): Promise<RESTPostAPIGuildChannelResult>;
/**
* Modify the positions of a set of channel objects for the guild.
* @param guild The guild to modify the channels in
* @param data The new positions for the channels
*/
export declare function modifyChannelPositions(guild: Snowflake, data: RESTPatchAPIGuildChannelPositionsJSONBody): Promise<void>;
/**
* Returns all active threads in the guild, including public and private threads.
* @param guild The guild to get the active threads from
*/
export declare function listActiveThreads(guild: Snowflake): Promise<RESTGetAPIGuildThreadsResult>;
/**
* Get a specific member from a guild
* @param guild The guild to get the member from
* @param member The member to get (defaults to self)
*/
export declare function getMember(guild: Snowflake, member?: Snowflake): Promise<RESTGetAPIGuildMemberResult>;
/**
* Get a list of members in a guild
* @param guild The guild to get the members from
* @param options Optional parameters for the request
*/
export declare function listMembers(guild: Snowflake, options?: RESTGetAPIGuildMembersQuery): Promise<RESTGetAPIGuildMembersResult>;
/**
* Returns a list of guild member objects whose username or nickname starts with a provided string.
* @param guild The guild to get the members from
* @param options Parameters for the request
*/
export declare function searchMembers(guild: Snowflake, options: RESTGetAPIGuildMembersSearchQuery): Promise<RESTGetAPIGuildMembersSearchResult>;
/**
* Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope.
* @param guild The guild to add the member to
* @param user The user to add
* @param data The data for the new member
*/
export declare function addMember(guild: Snowflake, user: Snowflake, data: RESTPutAPIGuildMemberJSONBody): Promise<RESTPutAPIGuildMemberResult>;
/**
* Modify attributes of a guild member.
* @param guild The guild to modify the member in
* @param data The data for the new member
* @param member The member to modify (defaults to self)
*/
export declare function modifyMember(guild: Snowflake, data: RESTPatchAPIGuildMemberJSONBody, member?: Snowflake): Promise<RESTPatchAPIGuildMemberResult>;
/**
* Adds a role to a guild member.
* @param guild The guild to add the role in
* @param member The member to give the role to
* @param role The role to give
*/
export declare function addMemberRole(guild: Snowflake, member: Snowflake, role: Snowflake): Promise<void>;
/**
* Removes a role from a guild member.
* @param guild The guild to remove the role in
* @param member The member to remove the role from
* @param role The role to remove
*/
export declare function removeMemberRole(guild: Snowflake, member: Snowflake, role: Snowflake): Promise<void>;
/**
* Remove a member from a guild.
* @param guild The guild to remove the member from
* @param member The member to remove
*/
export declare function removeMember(guild: Snowflake, member: Snowflake): Promise<void>;
/**
* Returns a list of ban objects for the users banned from this guild.
* @param guild The guild to get the bans from
* @param options Optional parameters for the request
*/
export declare function listBans(guild: Snowflake, options?: RESTGetAPIGuildBansQuery): Promise<RESTGetAPIGuildBansResult>;
/**
* Returns a ban object for the given user.
* @param guild The guild to get the ban from
* @param user The user to get the ban for
*/
export declare function getBan(guild: Snowflake, user: Snowflake): Promise<RESTGetAPIGuildBanResult>;
/**
* Create a guild ban, and optionally delete previous messages sent by the banned user.
* @param guild The guild to ban from
* @param user The user to ban
* @param data The data for the ban
*/
export declare function createBan(guild: Snowflake, user: Snowflake, data: RESTPutAPIGuildBanJSONBody): Promise<void>;
/**
* Remove the ban for a user.
* @param guild The guild to ban from
* @param user The user to ban
*/
export declare function deleteBan(guild: Snowflake, user: Snowflake): Promise<void>;
/**
* Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users.
* @param guild The guild to ban from
* @param data The data for the bans
*/
export declare function bulkCreateBan(guild: Snowflake, data: RESTPostAPIGuildBulkBanJSONBody): Promise<RESTPostAPIGuildBulkBanResult>;
/**
* Get a list of roles in a guild
* @param guild The guild to get the roles from
*/
export declare function listRoles(guild: Snowflake): Promise<RESTGetAPIGuildRolesResult>;
/**
* Get a role from a guild
* @param guild The guild to get the role from
* @param role The role to get
*/
export declare function getRole(guild: Snowflake, role: Snowflake): Promise<RESTGetAPIGuildRoleResult>;
/**
* Create a new role for the guild.
* @param guild The guild to create the role in
* @param data The data for the new role
*/
export declare function createRole(guild: Snowflake, data: RESTPostAPIGuildRoleJSONBody): Promise<RESTPostAPIGuildRoleResult>;
/**
* Modify the positions of a set of role objects for the guild.
* @param guild The guild to modify the roles in
* @param data The new positions for the roles
*/
export declare function modifyRolePositions(guild: Snowflake, data: RESTPatchAPIGuildRolePositionsJSONBody): Promise<RESTPatchAPIGuildRolePositionsResult>;
/**
* Create a new role for the guild.
* @param guild The guild to modify the role in
* @param role The role to modify
* @param data The new data for the role
*/
export declare function modifyRole(guild: Snowflake, role: Snowflake, data: RESTPatchAPIGuildRoleJSONBody): Promise<RESTPatchAPIGuildRoleResult>;
/**
* Modify a guild's MFA level. Requires guild ownership.
* @param guild The guild to modify the MFA for
*/
export declare function modifyMFALevel(guild: Snowflake, data: RESTPostAPIGuildsMFAJSONBody): Promise<RESTPostAPIGuildsMFAResult>;
/**
* Delete a guild role.
* @param guild The guild to delete the role from
* @param role The role to delete
*/
export declare function deleteRole(guild: Snowflake, role: Snowflake): Promise<void>;
/**
* Returns an object with one pruned key indicating the number of members that would be removed in a prune operation.
* @param guild The guild to get the prune count for
* @param options Optional parameters for the request
*/
export declare function getPruneCount(guild: Snowflake, options?: RESTGetAPIGuildPruneCountQuery): Promise<RESTGetAPIGuildPruneCountResult>;
/**
* Begin a prune operation.
* @param guild The guild to get the prune count for
* @param data The data for the prune operation
*/
export declare function startPrune(guild: Snowflake, data: RESTPostAPIGuildPruneJSONBody): Promise<RESTPostAPIGuildPruneResult>;
/**
* Returns a list of voice region objects for the guild.
* @param guild The guild to get the voice regions for
*/
export declare function listGuildVoiceRegions(guild: Snowflake): Promise<RESTGetAPIVoiceRegionsResult>;
/**
* Returns a list of invite objects (with invite metadata) for the guild.
* @param guild The guild to get the invites for
*/
export declare function listInvites(guild: Snowflake): Promise<RESTGetAPIGuildInvitesResult>;
/**
* Returns a list of integration objects for the guild.
* @param guild The guild to get the integrations for
*/
export declare function listIntegrations(guild: Snowflake): Promise<RESTGetAPIGuildIntegrationsResult>;
/**
* Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one.
* @param guild The guild to delete the integration from
* @param integration The integration to delete
*/
export declare function deleteIntegration(guild: Snowflake, integration: Snowflake): Promise<void>;
/**
* Returns a guild widget settings object.
* @param guild The guild to get the widget settings from
*/
export declare function getWidgetSettings(guild: Snowflake): Promise<RESTGetAPIGuildWidgetSettingsResult>;
/**
* Modify a guild widget settings object for the guild.
* @param guild The guild to modify the widget settings for
* @param data The new data for the widget settings
*/
export declare function modifyWidgetSettinga(guild: Snowflake, data: RESTPatchAPIGuildWidgetSettingsJSONBody): Promise<RESTPatchAPIGuildWidgetSettingsResult>;
/**
* Returns the widget for the guild.
* @param guild The guild to get the widget from
*/
export declare function getWidgetJSON(guild: Snowflake): Promise<RESTGetAPIGuildWidgetJSONResult>;
/**
* Returns a partial invite object for guilds with that feature enabled.
* @param guild The guild to get the invite from
*/
export declare function getVanityInvite(guild: Snowflake): Promise<RESTGetAPIGuildVanityUrlResult>;
/**
* Returns a PNG image widget for the guild.
* @param guild The guild to get the widget from
* @param options Optional parameters for the request
*/
export declare function getWidgetImage(guild: Snowflake, options?: RESTGetAPIGuildWidgetImageQuery): Promise<RESTGetAPIGuildWidgetImageResult>;
/**
* Returns the Welcome Screen object for the guild.
* @param guild The guild to get the welcome screen from
*/
export declare function getWelcomeScreen(guild: Snowflake): Promise<RESTGetAPIGuildWelcomeScreenResult>;
/**
* Modify the guild's Welcome Screen.
* @param guild The guild to modify the welcome screen for
* @param data The new data for the welcome screen
*/
export declare function modifyWelcomeScreen(guild: Snowflake, data: RESTPatchAPIGuildWelcomeScreenJSONBody): Promise<RESTPatchAPIGuildWelcomeScreenResult>;
/**
* Returns the Onboarding object for the guild.
* @param guild The guild to get the onboarding from
*/
export declare function getOnboarding(guild: Snowflake): Promise<RESTGetAPIGuildOnboardingResult>;
/**
* Modifies the onboarding configuration of the guild.
* @param guild The guild to modify the onboarding for
* @param data The new data for the onboarding
*/
export declare function modifyOnboarding(guild: Snowflake, data: RESTPutAPIGuildOnboardingJSONBody): Promise<RESTPutAPIGuildOnboardingResult>;
/**
* Modifies the incident actions of the guild.
* @param guild The guild to modify the actions for
* @param data The new data for the onboarding
*/
export declare function modifyGuildIncidentActions(guild: Snowflake, data: RESTPutAPIGuildIncidentActionsJSONBody): Promise<void>;