No summary provided.
Constructs a new instance of the
GuildsAPI
className | Type | Optional | Description |
---|---|---|---|
rest | REST | No | None |
Adds user to the guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to add the user to |
userId | Snowflake | No | The id of the user to add |
body | RESTPutAPIGuildMemberJSONBody | No | The data for adding users to the guild |
options | Pick<RequestData, 'signal'> | Yes | The options for adding users to the guild |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for adding a role to a guild member |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for banning the user |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for initiating the prune |
Bulk ban users from a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to bulk ban users in |
body | RESTPostAPIGuildBulkBanJSONBody | No | The data for bulk banning users |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for bulk banning users |
Creates a guild
Name | Type | Optional | Description |
---|---|---|---|
body | RESTPostAPIGuildsJSONBody | No | The guild to create |
options | Pick<RequestData, 'signal'> | Yes | The options for creating the guild |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the auto moderation rule |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the guild channel |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the emoji |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the guild role |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the scheduled event |
Creates a new soundboard sound for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the soundboard sound for |
body | RESTPostAPIGuildSoundboardSoundJSONBody | No | The data for creating the soundboard sound |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the soundboard sound |
Creates a sticker for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to create the sticker for |
body | CreateStickerOptions | No | The data for creating the sticker |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the sticker |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for creating the template |
Deletes a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting this guild |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the auto moderation rule |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the emoji |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the integration |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the guild role |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the scheduled event |
Deletes a soundboard sound for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to delete the soundboard sound for |
soundId | Snowflake | No | The id of the soundboard sound to delete |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the soundboard sound |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the sticker |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the template |
Edits a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit |
body | RESTPatchAPIGuildJSONBody | No | The new guild data |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the guild |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the auto moderation rule |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the emoji |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the guild member |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the MFA level |
Edits a guild onboarding
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
body | RESTPutAPIGuildOnboardingJSONBody | No | The data for editing the guild onboarding |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the guild onboarding |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the guild role |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the scheduled event |
Edits a soundboard sound for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to edit the soundboard sound for |
soundId | Snowflake | No | The id of the soundboard sound to edit |
body | RESTPatchAPIGuildSoundboardSoundJSONBody | No | The data for editing the soundboard sound |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the soundboard sound |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the sticker |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for editing the template |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the welcome screen |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the widget settings |
Fetches a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
query | RESTGetAPIGuildQuery | Yes | The query options for fetching the guild |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the active threads |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the audit logs |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the auto moderation rule |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the auto moderation rules |
Fetches a guild's channels
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the channels from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild channels |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the emoji |
Fetches all emojis for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the emojis from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the emojis |
Fetches the integrations for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the integrations from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the integrations |
Fetches the invites for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the invites from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the invites |
Fetches a guild member
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
userId | Snowflake | No | The id of the user |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild member |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the ban |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the bans |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild members |
Fetches a guild onboarding
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild onboarding |
Fetches a guild preview
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the preview from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild preview |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the number of pruned members |
Get a role in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the role from |
roleId | Snowflake | No | The id of the role to fetch |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild role |
Gets all the roles in a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the roles from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild roles |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the scheduled event |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the scheduled events |
getScheduledEventUsers(guildId, eventId, query?, options?):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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the scheduled event users |
Fetches a soundboard sound for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the soundboard sound for |
soundId | Snowflake | No | The id of the soundboard sound to fetch |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the soundboard sound |
Fetches all the soundboard sounds for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the soundboard sounds for |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the soundboard sounds |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the sticker |
Fetches all the stickers for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the stickers from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the stickers |
Fetches a guild template
Name | Type | Optional | Description |
---|---|---|---|
templateCode | string | No | The code of the template |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the guild template |
Fetches all the templates for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the templates from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the templates |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the vanity url |
Fetches voice regions for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the voice regions from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the voice regions |
Fetches webhooks for a guild
Name | Type | Optional | Description |
---|---|---|---|
id | Snowflake | No | The id of the guild |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the welcome screen |
Fetches the widget for a guild
Name | Type | Optional | Description |
---|---|---|---|
guildId | Snowflake | No | The id of the guild to fetch the widget from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the widget |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the widget image |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the widget settings |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for removing the guild member |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for removing a role from a guild member |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for searching for guild members |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the guild channel positions |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for setting role positions |
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 |
options | Pick<RequestData, 'signal'> | Yes | The options for syncing the template |
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 |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for unbanning the user |