Add a member to a guild. Requires an access token with the guilds.join
scope.
Returns the newly added member upon success, or void if the member is already in the guild.
The ID of the guild.
The ID of the user to add.
The options for adding the member.
Add a role to a member.
The ID of the guild.
The ID of the member.
The ID of the role to add.
Optional
reason: stringThe reason for adding the role.
Begin a prune.
The ID of the guild.
Optional
options: BeginPruneOptionsThe options for the prune.
Create a guild. This can only be used by bots in under 10 guilds.
Note: This does NOT add the guild to the client's cache.
The options for creating the guild.
Create an auto moderation rule for a guild.
The ID of the guild.
The options for creating the rule.
Create a bon for a user.
The ID of the guild.
The ID of the user to ban.
Optional
options: CreateBanOptionsThe options for creating the bon.
Create a channel in a guild.
The ID of the guild.
The options for creating the channel.
Create an emoji in a guild.
The ID of the guild.
The options for creating the emoji.
Create a guild from a template. This can only be used by bots in less than 10 guilds.
Note: This does NOT add the guild to the client's cache.
The code of the template to use.
The options for creating the guild.
Create a role.
The ID of the guild.
Optional
options: CreateRoleOptionsThe options for creating the role.
Create a scheduled event in a guild.
The ID of the guild.
The options for creating the scheduled event.
Create a sticker.
The ID of the guild.
The options for creating the sticker.
Create a guild template.
The ID of the guild to create a template from.
The options for creating the template.
Delete a scheduled event.
The ID of the guild.
The ID of the scheduled event.
Optional
reason: stringThe reason for deleting the scheduled event. Discord's docs do not explicitly state a reason can be provided, so it may not be used.
Edit a guild.
Note: If the client's cache does not already contain the guild, it will not be added.
The ID of the guild.
The options for editing the guild.
Edit an existing auto moderation rule.
The ID of the guild.
The ID of the rule to edit.
The options for editing the rule.
Edit the positions of channels in a guild.
The ID of the guild.
The channels to move. Unedited channels do not need to be specified.
Modify the current member in a guild.
The ID of the guild.
The options for editing the member.
Edit the current member's voice state in a guild. channelID
is required, and the current member must already be in that channel. See Discord's docs for more information.
The ID of the guild.
The options for editing the voice state.
Edit an existing emoji.
The ID of the guild the emoji is in.
The options for editing the emoji.
Edit the mfa level of a guild. This can only be used by the guild owner.
The ID of the guild.
The options for editing the MFA level.
Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the CHANGE_NICKNAME permission.
The ID of the guild.
The ID of the member.
The options for editing the member.
Edit an existing role.
The ID of the guild.
The options for editing the role.
Edit the position of roles in a guild.
The ID of the guild.
The roles to move.
Optional
reason: stringEdit an existing scheduled event in a guild.
The ID of the guild.
The options for editing the scheduled event.
Edit a sticker.
The ID of the guild.
The options for editing the sticker.
Edit a guild template.
The ID of the guild.
The code of the template.
The options for editing the template.
Edit a guild member's voice state. channelID
is required, and the user must already be in that channel. See Discord's docs for more information.
The ID of the guild.
The ID of the member.
The options for editing the voice state.
Edit the welcome screen in a guild.
The ID of the guild.
The options for editing the welcome screen.
Edit the widget of a guild.
The ID of the guild.
The options for editing the widget.
Get a guild.
Note: If the guild is not already in the client's cache, this will not add it.
The ID of the guild.
Optional
withCounts: booleanIf the approximate number of members and online members should be included.
Get the active threads in a guild.
The ID of the guild.
Get a guild's audit log.
The ID of the guild.
Optional
options: GetAuditLogOptionsThe options for getting the audit logs.
Get an auto moderation rule for a guild.
The ID of the guild.
The ID of the rule to get.
Get the auto moderation rules for a guild.
The ID of the guild.
Get the bans in a guild.
The ID of the guild.
Optional
options: GetBansOptionsThe options for getting the bans.
Get the channels in a guild. Does not include threads.
The ID of the guild.
Get an emoji in a guild.
The ID of the guild.
The ID of the emoji to get.
Get the emojis in a guild.
The ID of the guild.
Get the integrations in a guild.
The ID of the guild.
Get the invites of a guild.
The ID of the guild to get the invites of.
Get a guild's members. This requires the GUILD_MEMBERS
intent.
The ID of the guild.
Optional
options: GetMembersOptionsThe options for getting the members.
Get a preview of a guild. If the client is not already in this guild, the guild must be lurkable.
The ID of the guild.
Get the prune count of a guild.
The ID of the guild.
Optional
options: GetPruneCountOptionsThe options for getting the prune count.
Get a scheduled event.
The ID of the guild.
The ID of the scheduled event to get.
Optional
withUserCount: numberIf the number of users subscribed to the event should be included.
Get the users subscribed to a scheduled event.
The ID of the guild.
The ID of the scheduled event.
Optional
options: GetScheduledEventUsersOptionsThe options for getting the users.
Get a guild's scheduled events.
The ID of the guild.
Optional
withUserCount: numberIf the number of users subscribed to the event should be included.
Get a guild template.
The code of the template to get.
Get a guild's templates.
The ID of the guild.
Get the vanity url of a guild.
The ID of the guild.
Get the list of usable voice regions for a guild. This will return VIP servers when the guild is VIP-enabled.
The ID of the guild.
Get the welcome screen for a guild.
The ID of the guild.
Get the widget image of a guild.
The ID of the guild.
Optional
style: WidgetImageStyleThe style of the image.
Get a guild's widget settings.
The ID of the guild.
remove a role from a member.
The ID of the guild.
The ID of the member.
The ID of the role to remove.
Optional
reason: stringThe reason for removing the role.
Search the username & nicknames of members in a guild.
The ID of the guild.
The options to search with.
Sync a guild template.
The ID of the guild.
The code of the template to sync.
Various methods for interacting with guilds.