export declare class GuildsAPI
export declare class GuildsAPI
No summary provided.
constructor(rest)
Constructs a new instance of the
GuildsAPI
className | Type | Optional | Description |
---|---|---|---|
rest | REST | No | None |
addRoleToMember(guildId, userId, roleId, { reason, signal }?)
:
Promise<void>
Adds a role to a guild member
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
roleId | Snowflake | No | The id of the role |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
banUser(guildId, userId, body?, { reason, signal }?)
:
Promise<void>
Bans a user from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to ban the member in |
userId | Snowflake | No | The id of the user to ban |
body | RESTPutAPIGuildBanJSONBody | Yes | The payload for banning the user |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
beginPrune(guildId, body?, { reason, signal }?)
:
Promise<RESTPostAPIGuildPruneResult>
Prunes members in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to prune members in |
body | RESTPostAPIGuildPruneJSONBody | Yes | The options for pruning members |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
create(body, { signal }?)
:
Promise<APIGuild>
Creates a guild
Name | Type | Optional | Description |
---|---|---|---|
body | RESTPostAPIGuildsJSONBody | No | The guild to create |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
createAutoModerationRule(guildId, body, { reason, signal }?)
:
Promise<APIAutoModerationRule>
Creates a new auto moderation rule for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the auto moderation rule from |
body | RESTPostAPIAutoModerationRuleJSONBody | No | The data for creating the auto moderation rule |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createChannel(guildId, body, { reason, signal }?)
:
Promise<APIChannel>
Creates a guild channel
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the channel in |
body | RESTPostAPIGuildChannelJSONBody | No | The data to create the new channel |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createEmoji(guildId, body, { reason, signal }?)
:
Promise<APIEmoji>
Creates a new emoji for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the emoji from |
body | RESTPostAPIGuildEmojiJSONBody | No | The data for creating the emoji |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createRole(guildId, body, { reason, signal }?)
:
Promise<APIRole>
Creates a guild role
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the role in |
body | RESTPostAPIGuildRoleJSONBody | No | The data to create the role with |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createScheduledEvent(guildId, body, { reason, signal }?)
:
Promise<APIGuildScheduledEvent>
Creates a new scheduled event for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the scheduled event from |
body | RESTPostAPIGuildScheduledEventJSONBody | No | The data to create the event with |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createSticker(guildId, { file, ...body }, { reason, signal }?)
:
Promise<APISticker>
Creates a sticker for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the sticker for |
{ file, ...body } | Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & { file: RawFile; } | No | None |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
createTemplate(templateCode, body, { signal }?)
:
Promise<APITemplate>
Creates a new template
Name | Type | Optional | Description |
---|---|---|---|
templateCode | string | No | The code of the template |
body | RESTPostAPIGuildTemplatesJSONBody | No | The data for creating the template |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
delete(guildId, { signal, reason }?)
:
Promise<void>
Deletes a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete |
{ signal, reason } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteAutoModerationRule(guildId, ruleId, { reason, signal }?)
:
Promise<void>
Deletes an auto moderation rule for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the auto moderation rule from |
ruleId | Snowflake | No | The id of the auto moderation rule to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteEmoji(guildId, emojiId, { reason, signal }?)
:
Promise<void>
Deletes an emoji for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the emoji from |
emojiId | Snowflake | No | The id of the emoji to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteIntegration(guildId, integrationId, { reason, signal }?)
:
Promise<void>
Deletes an integration from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the integration from |
integrationId | Snowflake | No | The id of the integration to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteRole(guildId, roleId, { reason, signal }?)
:
Promise<void>
Deletes a guild role
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the role in |
roleId | Snowflake | No | The id of the role to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteScheduledEvent(guildId, eventId, { reason, signal }?)
:
Promise<void>
Deletes a scheduled event for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the scheduled event from |
eventId | Snowflake | No | The id of the scheduled event to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteSticker(guildId, stickerId, { reason, signal }?)
:
Promise<void>
Deletes a sticker for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the sticker from |
stickerId | Snowflake | No | The id of the sticker to delete |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
deleteTemplate(guildId, templateCode, { signal }?)
:
Promise<void>
Deletes a template for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the template from |
templateCode | string | No | The code of the template to delete |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
edit(guildId, body, { reason, signal }?)
:
Promise<APIGuild>
Edits a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit |
body | RESTPatchAPIGuildJSONBody | No | The new guild data |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editAutoModerationRule(guildId, ruleId, body, { reason, signal }?)
:
Promise<APIAutoModerationRule>
Edits an auto moderation rule for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the auto moderation rule from |
ruleId | Snowflake | No | The id of the auto moderation rule to edit |
body | RESTPatchAPIAutoModerationRuleJSONBody | No | The data for editing the auto moderation rule |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editEmoji(guildId, emojiId, body, { reason, signal }?)
:
Promise<APIEmoji>
Edits an emoji for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the emoji from |
emojiId | Snowflake | No | The id of the emoji to edit |
body | RESTPatchAPIGuildEmojiJSONBody | No | The data for editing the emoji |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editMember(guildId, userId, body?, { reason, signal }?)
:
Promise<APIGuildMember>
Edits a guild member
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
body | RESTPatchAPIGuildMemberJSONBody | Yes | The data for editing the guild member |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editMFALevel(guildId, level, { reason, signal }?)
:
Promise<RESTPostAPIGuildsMFAJSONBody>
Edits the multi-factor-authentication (MFA) level of a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the MFA level for |
level | GuildMFALevel | No | The new MFA level |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editRole(guildId, roleId, body, { reason, signal }?)
:
Promise<APIRole>
Edits a guild role
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the role in |
roleId | Snowflake | No | The id of the role to edit |
body | RESTPatchAPIGuildRoleJSONBody | No | data for editing the role |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editScheduledEvent(guildId, eventId, body, { reason, signal }?)
:
Promise<APIGuildScheduledEvent>
Edits a scheduled event for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the scheduled event from |
eventId | Snowflake | No | The id of the scheduled event to edit |
body | RESTPatchAPIGuildScheduledEventJSONBody | No | The new event data |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editSticker(guildId, stickerId, body, { reason, signal }?)
:
Promise<APISticker>
Edits a sticker for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the sticker from |
stickerId | Snowflake | No | The id of the sticker to edit |
body | RESTPatchAPIGuildStickerJSONBody | No | The data for editing the sticker |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editTemplate(guildId, templateCode, body, { signal }?)
:
Promise<APITemplate>
Edits a template for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the template from |
templateCode | string | No | The code of the template to edit |
body | RESTPatchAPIGuildTemplateJSONBody | No | The data for editing the template |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
editUserVoiceState(guildId, userId, body, { reason, signal }?)
:
Promise<void>
Edits a user's voice state in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the current user's voice state in |
userId | Snowflake | No | The id of the user to edit the voice state for |
body | RESTPatchAPIGuildVoiceStateUserJSONBody | No | The data for editing the voice state |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editWelcomeScreen(guildId, body?, { reason, signal }?)
:
Promise<APIGuildWelcomeScreen>
Edits the welcome screen for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the welcome screen for |
body | RESTPatchAPIGuildWelcomeScreenJSONBody | Yes | The new welcome screen data |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
editWidgetSettings(guildId, body, { reason, signal }?)
:
Promise<APIGuildWidgetSettings>
Edits the widget settings for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the widget settings from |
body | RESTPatchAPIGuildWidgetSettingsJSONBody | No | The new widget settings data |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
get(guildId, { signal }?)
:
Promise<APIGuild>
Fetches a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getActiveThreads(guildId, { signal }?)
:
Promise<APIThreadList>
Fetches the active threads in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the active threads from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getAuditLogs(guildId, query?, { signal }?)
:
Promise<APIAuditLog>
Fetches the audit logs for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the audit logs from |
query | RESTGetAPIAuditLogQuery | Yes | The query options for fetching the audit logs |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getAutoModerationRule(guildId, ruleId, { signal }?)
:
Promise<APIAutoModerationRule>
Fetches an auto moderation rule for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the auto moderation rule from |
ruleId | Snowflake | No | The id of the auto moderation rule to fetch |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getAutoModerationRules(guildId, { signal }?)
:
Promise<RESTGetAPIAutoModerationRulesResult>
Fetches all auto moderation rules for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the auto moderation rules from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getChannels(guildId, { signal }?)
:
Promise<RESTGetAPIGuildChannelsResult>
Fetches a guild's channels
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the channels from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getEmoji(guildId, emojiId, { signal }?)
:
Promise<APIEmoji>
Fetches an emoji for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the emoji from |
emojiId | Snowflake | No | The id of the emoji to fetch |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getEmojis(guildId, { signal }?)
:
Promise<RESTGetAPIGuildEmojisResult>
Fetches all emojis for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the emojis from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getIntegrations(guildId, { signal }?)
:
Promise<RESTGetAPIGuildIntegrationsResult>
Fetches the integrations for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the integrations from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getInvites(guildId, { signal }?)
:
Promise<RESTGetAPIGuildInvitesResult>
Fetches the invites for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the invites from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getMember(guildId, userId, { signal }?)
:
Promise<APIGuildMember>
Fetches a guild member
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getMemberBan(guildId, userId, { signal }?)
:
Promise<APIBan>
Fetches a guild member ban
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the ban from |
userId | Snowflake | No | The id of the user to fetch the ban |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getMemberBans(guildId, query?, { signal }?)
:
Promise<RESTGetAPIGuildBansResult>
Fetches guild member bans
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the bans from |
query | RESTGetAPIGuildBansQuery | Yes | The query options for fetching the bans |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getMembers(guildId, query?, { signal }?)
:
Promise<RESTGetAPIGuildMembersResult>
Fetches all the members of a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
query | RESTGetAPIGuildMembersQuery | Yes | The query for fetching the guild members |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getOnboarding(guildId, { signal }?)
:
Promise<APIGuildOnboarding>
Fetches a guild onboarding
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getPreview(guildId, { signal }?)
:
Promise<APIGuildPreview>
Fetches a guild preview
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the preview from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getPruneCount(guildId, query?, { signal }?)
:
Promise<RESTGetAPIGuildPruneCountResult>
Fetch the number of members that can be pruned from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the number of pruned members from |
query | RESTGetAPIGuildPruneCountQuery | Yes | The query options for fetching the number of pruned members |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getRoles(guildId, { signal }?)
:
Promise<RESTGetAPIGuildRolesResult>
Gets all the roles in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the roles from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getScheduledEvent(guildId, eventId, query?, { signal }?)
:
Promise<APIGuildScheduledEvent>
Fetches a scheduled event for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the scheduled event from |
eventId | Snowflake | No | The id of the scheduled event to fetch |
query | RESTGetAPIGuildScheduledEventQuery | Yes | The options for fetching the scheduled event |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getScheduledEvents(guildId, query?, { signal }?)
:
Promise<RESTGetAPIGuildScheduledEventsResult>
Fetches all scheduled events for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the scheduled events from |
query | RESTGetAPIGuildScheduledEventsQuery | Yes | The query options for fetching the scheduled events |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getScheduledEventUsers(guildId, eventId, query?, { signal }?)
:
Promise<RESTGetAPIGuildScheduledEventUsersResult>
Gets all users that are interested in a scheduled event
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the scheduled event users from |
eventId | Snowflake | No | The id of the scheduled event to fetch the users for |
query | RESTGetAPIGuildScheduledEventUsersQuery | Yes | The options for fetching the scheduled event users |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getSticker(guildId, stickerId, { signal }?)
:
Promise<APISticker>
Fetches a sticker for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the sticker from |
stickerId | Snowflake | No | The id of the sticker to fetch |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getStickers(guildId, { signal }?)
:
Promise<RESTGetAPIGuildStickersResult>
Fetches all the stickers for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the stickers from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getTemplate(templateCode, { signal }?)
:
Promise<APITemplate>
Fetches a guild template
Name | Type | Optional | Description |
---|---|---|---|
templateCode | string | No | The code of the template |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getTemplates(guildId, { signal }?)
:
Promise<RESTGetAPIGuildTemplatesResult>
Fetches all the templates for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the templates from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getVanityURL(guildId, { signal }?)
:
Promise<RESTGetAPIGuildVanityUrlResult>
Fetches the vanity url for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the vanity url from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getVoiceRegions(guildId, { signal }?)
:
Promise<RESTGetAPIGuildVoiceRegionsResult>
Fetches voice regions for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the voice regions from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getWebhooks(id)
:
Promise<RESTGetAPIGuildWebhooksResult>
Fetches webhooks for a guild
Name | Type | Optional | Description |
---|---|---|---|
id | Snowflake | No | The id of the guild |
getWelcomeScreen(guildId, { signal }?)
:
Promise<APIGuildWelcomeScreen>
Fetches the welcome screen for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the welcome screen from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getWidget(guildId, { signal }?)
:
Promise<APIGuildWidget>
Fetches the widget for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the widget from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getWidgetImage(guildId, style?, { signal }?)
:
Promise<ArrayBuffer>
Fetches the widget image for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the widget image from |
style | GuildWidgetStyle | Yes | The style of the widget image |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
getWidgetSettings(guildId, { signal }?)
:
Promise<APIGuildWidgetSettings>
Fetches the widget settings for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the widget settings from |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
removeMember(guildId, userId, { reason, signal }?)
:
Promise<unknown>
Removes a member from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
removeRoleFromMember(guildId, userId, roleId, { reason, signal }?)
:
Promise<void>
Removes a role from a guild member
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
roleId | Snowflake | No | The id of the role |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
searchForMembers(guildId, query, { signal }?)
:
Promise<RESTGetAPIGuildMembersSearchResult>
Searches for guild members
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to search in |
query | RESTGetAPIGuildMembersSearchQuery | No | The query to search for |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
setChannelPositions(guildId, body, { reason, signal }?)
:
Promise<void>
Edits a guild channel's positions
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the channel positions from |
body | RESTPatchAPIGuildChannelPositionsJSONBody | No | The data to edit the channel positions with |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
setRolePositions(guildId, body, { reason, signal }?)
:
Promise<RESTPatchAPIGuildRolePositionsResult>
Sets role positions in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to set role positions for |
body | RESTPatchAPIGuildRolePositionsJSONBody | No | The data for setting a role position |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |
setVoiceState(guildId, body?)
:
Promise<never>
Sets the voice state for the current user
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
body | RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody | Yes | The options for setting the voice state |
syncTemplate(guildId, templateCode, { signal }?)
:
Promise<APITemplate>
Syncs a template for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to sync the template from |
templateCode | string | No | The code of the template to sync |
{ signal } | Pick<RequestData, 'signal'> | Yes | None |
unbanUser(guildId, userId, { reason, signal }?)
:
Promise<void>
Unbans a user from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to unban the member in |
userId | Snowflake | No | The id of the user to unban |
{ reason, signal } | Pick<RequestData, 'reason' | 'signal'> | Yes | None |