GuildsAPI

export declare class GuildsAPI
export declare class GuildsAPI

No summary provided.

constructor(rest)
Constructs a new instance of the GuildsAPI class
NameTypeOptionalDescription
restRESTNoNone
addMember(guildId, userId, body, options?):Promise<RESTPutAPIGuildMemberResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to add the user to
userIdSnowflakeNo
The id of the user to add
bodyRESTPutAPIGuildMemberJSONBodyNo
The data for adding users to the guild
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for adding users to the guild
addRoleToMember(guildId, userId, roleId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
userIdSnowflakeNo
The id of the user
roleIdSnowflakeNo
The id of the role
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for adding a role to a guild member
banUser(guildId, userId, body?, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to ban the member in
userIdSnowflakeNo
The id of the user to ban
bodyRESTPutAPIGuildBanJSONBodyYes
The payload for banning the user
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for banning the user
beginPrune(guildId, body?, options?):Promise<RESTPostAPIGuildPruneResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to prune members in
bodyRESTPostAPIGuildPruneJSONBodyYes
The options for pruning members
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for initiating the prune
bulkBanUsers(guildId, body, options?):Promise<RESTPostAPIGuildBulkBanResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to bulk ban users in
bodyRESTPostAPIGuildBulkBanJSONBodyNo
The data for bulk banning users
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for bulk banning users
create(body, options?):Promise<APIGuild>
NameTypeOptionalDescription
bodyRESTPostAPIGuildsJSONBodyNo
The guild to create
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for creating the guild
createAutoModerationRule(guildId, body, options?):Promise<APIAutoModerationRule>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the auto moderation rule from
bodyRESTPostAPIAutoModerationRuleJSONBodyNo
The data for creating the auto moderation rule
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the auto moderation rule
createChannel(guildId, body, options?):Promise<APIChannel>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the channel in
bodyRESTPostAPIGuildChannelJSONBodyNo
The data to create the new channel
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the guild channel
createEmoji(guildId, body, options?):Promise<APIEmoji>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the emoji from
bodyRESTPostAPIGuildEmojiJSONBodyNo
The data for creating the emoji
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the emoji
createRole(guildId, body, options?):Promise<APIRole>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the role in
bodyRESTPostAPIGuildRoleJSONBodyNo
The data to create the role with
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the guild role
createScheduledEvent(guildId, body, options?):Promise<APIGuildScheduledEvent>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the scheduled event from
bodyRESTPostAPIGuildScheduledEventJSONBodyNo
The data to create the event with
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the scheduled event
createSoundboardSound(guildId, body, options?):Promise<APISoundboardSound>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the soundboard sound for
bodyRESTPostAPIGuildSoundboardSoundJSONBodyNo
The data for creating the soundboard sound
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the soundboard sound
createSticker(guildId, body, options?):Promise<APISticker>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to create the sticker for
bodyCreateStickerOptionsNo
The data for creating the sticker
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for creating the sticker
createTemplate(templateCode, body, options?):Promise<APITemplate>
NameTypeOptionalDescription
templateCodestringNo
The code of the template
bodyRESTPostAPIGuildTemplatesJSONBodyNo
The data for creating the template
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for creating the template
delete(guildId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting this guild
deleteAutoModerationRule(guildId, ruleId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the auto moderation rule from
ruleIdSnowflakeNo
The id of the auto moderation rule to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the auto moderation rule
deleteEmoji(guildId, emojiId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the emoji from
emojiIdSnowflakeNo
The id of the emoji to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the emoji
deleteIntegration(guildId, integrationId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the integration from
integrationIdSnowflakeNo
The id of the integration to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the integration
deleteRole(guildId, roleId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the role in
roleIdSnowflakeNo
The id of the role to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the guild role
deleteScheduledEvent(guildId, eventId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the scheduled event from
eventIdSnowflakeNo
The id of the scheduled event to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the scheduled event
deleteSoundboardSound(guildId, soundId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the soundboard sound for
soundIdSnowflakeNo
The id of the soundboard sound to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the soundboard sound
deleteSticker(guildId, stickerId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the sticker from
stickerIdSnowflakeNo
The id of the sticker to delete
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for deleting the sticker
deleteTemplate(guildId, templateCode, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to delete the template from
templateCodestringNo
The code of the template to delete
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for deleting the template
edit(guildId, body, options?):Promise<APIGuild>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit
bodyRESTPatchAPIGuildJSONBodyNo
The new guild data
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the guild
editAutoModerationRule(guildId, ruleId, body, options?):Promise<APIAutoModerationRule>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the auto moderation rule from
ruleIdSnowflakeNo
The id of the auto moderation rule to edit
bodyRESTPatchAPIAutoModerationRuleJSONBodyNo
The data for editing the auto moderation rule
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the auto moderation rule
editEmoji(guildId, emojiId, body, options?):Promise<APIEmoji>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the emoji from
emojiIdSnowflakeNo
The id of the emoji to edit
bodyRESTPatchAPIGuildEmojiJSONBodyNo
The data for editing the emoji
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the emoji
editMember(guildId, userId, body?, options?):Promise<APIGuildMember>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
userIdSnowflakeNo
The id of the user
bodyRESTPatchAPIGuildMemberJSONBodyYes
The data for editing the guild member
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the guild member
editMFALevel(guildId, level, options?):Promise<RESTPostAPIGuildsMFAJSONBody>
Edits the multi-factor-authentication (MFA) level of a guild
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the MFA level for
levelGuildMFALevelNo
The new MFA level
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the MFA level
editOnboarding(guildId, body, options?):Promise<APIGuildOnboarding>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
bodyRESTPutAPIGuildOnboardingJSONBodyNo
The data for editing the guild onboarding
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the guild onboarding
editRole(guildId, roleId, body, options?):Promise<APIRole>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the role in
roleIdSnowflakeNo
The id of the role to edit
bodyRESTPatchAPIGuildRoleJSONBodyNo
data for editing the role
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the guild role
editScheduledEvent(guildId, eventId, body, options?):Promise<APIGuildScheduledEvent>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the scheduled event from
eventIdSnowflakeNo
The id of the scheduled event to edit
bodyRESTPatchAPIGuildScheduledEventJSONBodyNo
The new event data
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the scheduled event
editSoundboardSound(guildId, soundId, body, options?):Promise<APISoundboardSound>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the soundboard sound for
soundIdSnowflakeNo
The id of the soundboard sound to edit
bodyRESTPatchAPIGuildSoundboardSoundJSONBodyNo
The data for editing the soundboard sound
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the soundboard sound
editSticker(guildId, stickerId, body, options?):Promise<APISticker>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the sticker from
stickerIdSnowflakeNo
The id of the sticker to edit
bodyRESTPatchAPIGuildStickerJSONBodyNo
The data for editing the sticker
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the sticker
editTemplate(guildId, templateCode, body, options?):Promise<APITemplate>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the template from
templateCodestringNo
The code of the template to edit
bodyRESTPatchAPIGuildTemplateJSONBodyNo
The data for editing the template
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for editing the template
editWelcomeScreen(guildId, body?, options?):Promise<APIGuildWelcomeScreen>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the welcome screen for
bodyRESTPatchAPIGuildWelcomeScreenJSONBodyYes
The new welcome screen data
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the welcome screen
editWidgetSettings(guildId, body, options?):Promise<APIGuildWidgetSettings>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the widget settings from
bodyRESTPatchAPIGuildWidgetSettingsJSONBodyNo
The new widget settings data
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the widget settings
get(guildId, query?, options?):Promise<APIGuild>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
queryRESTGetAPIGuildQueryYes
The query options for fetching the guild
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild
getActiveThreads(guildId, options?):Promise<APIThreadList>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the active threads from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the active threads
getAuditLogs(guildId, query?, options?):Promise<APIAuditLog>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the audit logs from
queryRESTGetAPIAuditLogQueryYes
The query options for fetching the audit logs
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the audit logs
getAutoModerationRule(guildId, ruleId, options?):Promise<APIAutoModerationRule>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the auto moderation rule from
ruleIdSnowflakeNo
The id of the auto moderation rule to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the auto moderation rule
getAutoModerationRules(guildId, options?):Promise<RESTGetAPIAutoModerationRulesResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the auto moderation rules from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the auto moderation rules
getChannels(guildId, options?):Promise<RESTGetAPIGuildChannelsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the channels from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild channels
getEmoji(guildId, emojiId, options?):Promise<APIEmoji>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the emoji from
emojiIdSnowflakeNo
The id of the emoji to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the emoji
getEmojis(guildId, options?):Promise<RESTGetAPIGuildEmojisResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the emojis from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the emojis
getIntegrations(guildId, options?):Promise<RESTGetAPIGuildIntegrationsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the integrations from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the integrations
getInvites(guildId, options?):Promise<RESTGetAPIGuildInvitesResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the invites from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the invites
getMember(guildId, userId, options?):Promise<APIGuildMember>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
userIdSnowflakeNo
The id of the user
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild member
getMemberBan(guildId, userId, options?):Promise<APIBan>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the ban from
userIdSnowflakeNo
The id of the user to fetch the ban
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the ban
getMemberBans(guildId, query?, options?):Promise<RESTGetAPIGuildBansResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the bans from
queryRESTGetAPIGuildBansQueryYes
The query options for fetching the bans
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the bans
getMembers(guildId, query?, options?):Promise<RESTGetAPIGuildMembersResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
queryRESTGetAPIGuildMembersQueryYes
The query for fetching the guild members
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild members
getOnboarding(guildId, options?):Promise<APIGuildOnboarding>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild onboarding
getPreview(guildId, options?):Promise<APIGuildPreview>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the preview from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild preview
getPruneCount(guildId, query?, options?):Promise<RESTGetAPIGuildPruneCountResult>
Fetch the number of members that can be pruned from a guild
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the number of pruned members from
queryRESTGetAPIGuildPruneCountQueryYes
The query options for fetching the number of pruned members
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the number of pruned members
getRole(guildId, roleId, options?):Promise<APIRole>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the role from
roleIdSnowflakeNo
The id of the role to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild role
getRoles(guildId, options?):Promise<RESTGetAPIGuildRolesResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the roles from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild roles
getScheduledEvent(guildId, eventId, query?, options?):Promise<APIGuildScheduledEvent>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the scheduled event from
eventIdSnowflakeNo
The id of the scheduled event to fetch
queryRESTGetAPIGuildScheduledEventQueryYes
The options for fetching the scheduled event
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the scheduled event
getScheduledEvents(guildId, query?, options?):Promise<RESTGetAPIGuildScheduledEventsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the scheduled events from
queryRESTGetAPIGuildScheduledEventsQueryYes
The query options for fetching the scheduled events
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the scheduled events
getScheduledEventUsers(guildId, eventId, query?, options?):Promise<RESTGetAPIGuildScheduledEventUsersResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the scheduled event users from
eventIdSnowflakeNo
The id of the scheduled event to fetch the users for
queryRESTGetAPIGuildScheduledEventUsersQueryYes
The options for fetching the scheduled event users
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the scheduled event users
getSoundboardSound(guildId, soundId, options?):Promise<APISoundboardSound>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the soundboard sound for
soundIdSnowflakeNo
The id of the soundboard sound to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the soundboard sound
getSoundboardSounds(guildId, options?):Promise<RESTGetAPIGuildSoundboardSoundsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the soundboard sounds for
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the soundboard sounds
getSticker(guildId, stickerId, options?):Promise<APISticker>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the sticker from
stickerIdSnowflakeNo
The id of the sticker to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the sticker
getStickers(guildId, options?):Promise<RESTGetAPIGuildStickersResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the stickers from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the stickers
getTemplate(templateCode, options?):Promise<APITemplate>
NameTypeOptionalDescription
templateCodestringNo
The code of the template
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the guild template
getTemplates(guildId, options?):Promise<RESTGetAPIGuildTemplatesResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the templates from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the templates
getVanityURL(guildId, options?):Promise<RESTGetAPIGuildVanityUrlResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the vanity url from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the vanity url
getVoiceRegions(guildId, options?):Promise<RESTGetAPIGuildVoiceRegionsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the voice regions from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the voice regions
getWebhooks(id, options?):Promise<RESTGetAPIGuildWebhooksResult>
NameTypeOptionalDescription
idSnowflakeNo
The id of the guild
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the webhooks
getWelcomeScreen(guildId, options?):Promise<APIGuildWelcomeScreen>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the welcome screen from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the welcome screen
getWidget(guildId, options?):Promise<APIGuildWidget>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the widget from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the widget
getWidgetImage(guildId, style?, options?):Promise<ArrayBuffer>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the widget image from
styleGuildWidgetStyleYes
The style of the widget image
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the widget image
getWidgetSettings(guildId, options?):Promise<APIGuildWidgetSettings>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to fetch the widget settings from
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the widget settings
removeMember(guildId, userId, options?):Promise<unknown>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
userIdSnowflakeNo
The id of the user
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for removing the guild member
removeRoleFromMember(guildId, userId, roleId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild
userIdSnowflakeNo
The id of the user
roleIdSnowflakeNo
The id of the role
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for removing a role from a guild member
searchForMembers(guildId, query, options?):Promise<RESTGetAPIGuildMembersSearchResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to search in
queryRESTGetAPIGuildMembersSearchQueryNo
The query to search for
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for searching for guild members
setChannelPositions(guildId, body, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to edit the channel positions from
bodyRESTPatchAPIGuildChannelPositionsJSONBodyNo
The data to edit the channel positions with
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for editing the guild channel positions
setRolePositions(guildId, body, options?):Promise<RESTPatchAPIGuildRolePositionsResult>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to set role positions for
bodyRESTPatchAPIGuildRolePositionsJSONBodyNo
The data for setting a role position
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for setting role positions
syncTemplate(guildId, templateCode, options?):Promise<APITemplate>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to sync the template from
templateCodestringNo
The code of the template to sync
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for syncing the template
unbanUser(guildId, userId, options?):Promise<void>
NameTypeOptionalDescription
guildIdSnowflakeNo
The id of the guild to unban the member in
userIdSnowflakeNo
The id of the user to unban
optionsPick<RequestData, 'auth' | 'reason' | 'signal'>Yes
The options for unbanning the user