oceanic.js
Version:
A NodeJS library for interfacing with Discord.
648 lines (647 loc) • 34 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
/** @module REST/Guilds */
import type { ChannelTypeMap } from "../Constants";
import type RESTManager from "../rest/RESTManager";
import AutoModerationRule from "../structures/AutoModerationRule";
import Guild from "../structures/Guild";
import GuildPreview from "../structures/GuildPreview";
import GuildScheduledEvent from "../structures/GuildScheduledEvent";
import GuildTemplate from "../structures/GuildTemplate";
import Integration from "../structures/Integration";
import Invite from "../structures/Invite";
import type Member from "../structures/Member";
import Role from "../structures/Role";
import Soundboard from "../structures/Soundboard";
import VoiceState from "../structures/VoiceState";
import type { AuditLog, GetAuditLogOptions } from "../types/audit-log";
import type { CreateAutoModerationRuleOptions, EditAutoModerationRuleOptions } from "../types/auto-moderation";
import type { AnyGuildChannelWithoutThreads, AnyInviteChannel, GuildChannelsWithoutThreads, PartialInviteChannel } from "../types/channels";
import type { CreateTemplateOptions, EditGuildTemplateOptions } from "../types/guild-template";
import type { AddMemberOptions, Ban, BeginPruneOptions, BulkBanOptions, BulkBanResponse, CreateBanOptions, CreateChannelOptions, CreateGuildEmojiOptions, CreateRoleOptions, CreateSoundboardSoundOptions, CreateStickerOptions, EditCurrentMemberOptions, EditCurrentUserVoiceStateOptions, EditGuildEmojiOptions, EditGuildOptions, EditIncidentActionsOptions, EditMemberOptions, EditOnboardingOptions, EditRoleOptions, EditRolePositionsEntry, EditSoundboardSoundOptions, EditStickerOptions, EditUserVoiceStateOptions, EditWelcomeScreenOptions, GetActiveThreadsResponse, GetBansOptions, GetMembersOptions, GetPruneCountOptions, GetVanityURLResponse, GuildEmoji, IncidentActions, MemberSearchOptions, MemberSearchResults, ModifyChannelPositionsEntry, Onboarding, RawWidget, SearchMembersOptions, Sticker, WelcomeScreen, Widget, WidgetImageStyle, WidgetSettings } from "../types/guilds";
import type { CreateScheduledEventOptions, EditScheduledEventOptions, GetScheduledEventUsersOptions, ScheduledEventUser } from "../types/scheduled-events";
import type { Uncached } from "../types/shared";
import type { VoiceRegion } from "../types/voice";
/** Various methods for interacting with guilds. Located at {@link Client#rest | Client#rest}{@link RESTManager#guilds | .guilds}. */
export default class Guilds {
private _manager;
constructor(manager: RESTManager);
/**
* 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.
* @param guildID The ID of the guild.
* @param userID The ID of the user to add.
* @param options The options for adding the member.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}
*/
addMember(guildID: string, userID: string, options: AddMemberOptions): Promise<Member | undefined>;
/**
* Add a role to a member.
* @param guildID The ID of the guild.
* @param memberID The ID of the member.
* @param roleID The ID of the role to add.
* @param reason The reason for adding the role.
* @caching This method **does not** cache its result.
*/
addMemberRole(guildID: string, memberID: string, roleID: string, reason?: string): Promise<void>;
/**
* Begin a prune.
* @param guildID The ID of the guild.
* @param options The options for the prune.
* @caching This method **does not** cache its result.
*/
beginPrune(guildID: string, options?: BeginPruneOptions): Promise<number | null>;
/**
* Ban up to 200 members from a guild. This requires both the `BAN_MEMBERS` and `MANAGE_GUILD` permissions.
* If no members were banned, a {@link Constants~JSONErrorCodes.FAILED_TO_BAN_USERS | FAILED_TO_BAN_USERS } will be returned.
* The bot user is ignored.
* @param guildID The ID of the guild.
* @param options The options for banning.
*/
bulkBan(guildID: string, options: BulkBanOptions): Promise<BulkBanResponse>;
/**
* Create an auto moderation rule for a guild.
* @param guildID The ID of the guild.
* @param options The options for creating the rule.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
*/
createAutoModerationRule(guildID: string, options: CreateAutoModerationRuleOptions): Promise<AutoModerationRule>;
/**
* Create a ban for a user.
* @param guildID The ID of the guild.
* @param userID The ID of the user to ban.
* @param options The options for creating the ban.
* @caching This method **does not** cache its result.
*/
createBan(guildID: string, userID: string, options?: CreateBanOptions): Promise<void>;
/**
* Create a channel in a guild.
* @param guildID The ID of the guild.
* @param options The options for creating the channel.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#channels | Guild#channels}
*/
createChannel<T extends GuildChannelsWithoutThreads>(guildID: string, type: T, options: Omit<CreateChannelOptions, "type">): Promise<ChannelTypeMap[T]>;
/**
* Create an emoji in a guild.
* @param guildID The ID of the guild.
* @param options The options for creating the emoji.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#emojis | Guild#emojis}<br>{@link Client#users | Client#users} (creator, if applicable)
*/
createEmoji(guildID: string, options: CreateGuildEmojiOptions): Promise<GuildEmoji>;
/**
* Create a role.
* @param guildID The ID of the guild.
* @param options The options for creating the role.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#roles | Guild#roles}
*/
createRole(guildID: string, options?: CreateRoleOptions): Promise<Role>;
/**
* Create a scheduled event in a guild.
* @param guildID The ID of the guild.
* @param options The options for creating the scheduled event.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
*/
createScheduledEvent(guildID: string, options: CreateScheduledEventOptions): Promise<GuildScheduledEvent>;
/**
* Create a soundboard sound
* @param guildID The ID of the guild
* @param options The options for creating the soundboard sound
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
*/
createSoundboardSound(guildID: string, options: CreateSoundboardSoundOptions): Promise<Soundboard>;
/**
* Create a sticker.
* @param guildID The ID of the guild.
* @param options The options for creating the sticker.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#stickers | Guild#stickers}<br>{@link Client#users | Client#users} (creator, if applicable)
*/
createSticker(guildID: string, options: CreateStickerOptions): Promise<Sticker>;
/**
* Create a guild template.
* @param guildID The ID of the guild to create a template from.
* @param options The options for creating the template.
*/
createTemplate(guildID: string, options: CreateTemplateOptions): Promise<GuildTemplate>;
/**
* Delete an auto moderation rule.
* @param guildID The ID of the guild.
* @param ruleID The ID of the rule to delete.
* @param reason The reason for deleting the rule.
* @caching This method **does not** cache its result.
*/
deleteAutoModerationRule(guildID: string, ruleID: string, reason?: string): Promise<void>;
/**
* Delete an emoji.
* @param guildID The ID of the guild.
* @param emojiID The ID of the emoji.
* @param reason The reason for deleting the emoji.
* @caching This method **does not** cache its result.
*/
deleteEmoji(guildID: string, emojiID: string, reason?: string): Promise<void>;
/**
* Delete an integration.
* @param guildID The ID of the guild.
* @param integrationID The ID of the integration.
* @param reason The reason for deleting the integration.
* @caching This method **does not** cache its result.
*/
deleteIntegration(guildID: string, integrationID: string, reason?: string): Promise<void>;
/**
* Delete a role.
* @param guildID The ID of the guild.
* @param roleID The ID of the role to delete.
* @param reason The reason for deleting the role.
* @caching This method **does not** cache its result.
*/
deleteRole(guildID: string, roleID: string, reason?: string): Promise<void>;
/**
* Delete a scheduled event.
* @param guildID The ID of the guild.
* @param eventID The ID of the scheduled event.
* @param reason The reason for deleting the scheduled event. Discord's docs do not explicitly state a reason can be provided, so it may not be used.
* @caching This method **does not** cache its result.
*/
deleteScheduledEvent(guildID: string, eventID: string, reason?: string): Promise<void>;
/**
*
* @param guildID The ID of the guild.
* @param soundID The ID of the soundboard sound to delete.
* @param reason The reason for deleting the soundboard sound.
* @caching This method **does not** cache its result.
*/
deleteSoundboardSound(guildID: string, soundID: string, reason?: string): Promise<void>;
/**
* Delete a sticker.
* @param guildID The ID of the guild.
* @param stickerID The ID of the sticker to delete.
* @param reason The reason for deleting the sticker.
* @caching This method **does not** cache its result.
*/
deleteSticker(guildID: string, stickerID: string, reason?: string): Promise<void>;
/**
* Delete a template.
* @param guildID The ID of the guild.
* @param code The code of the template.
* @caching This method **does not** cache its result.
*/
deleteTemplate(guildID: string, code: string): Promise<void>;
/**
* Edit a guild.
* @param guildID The ID of the guild.
* @param options The options for editing the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not already cached.
* @caches {@link Client#guilds | Client#guilds}
*/
edit(guildID: string, options: EditGuildOptions): Promise<Guild>;
/**
* Edit an existing auto moderation rule.
* @param guildID The ID of the guild.
* @param ruleID The ID of the rule to edit.
* @param options The options for editing the rule.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
*/
editAutoModerationRule(guildID: string, ruleID: string, options: EditAutoModerationRuleOptions): Promise<AutoModerationRule>;
/**
* Edit the positions of channels in a guild.
* @param guildID The ID of the guild.
* @param options The channels to move. Unedited channels do not need to be specified.
* @caching This method **does not** cache its result.
*/
editChannelPositions(guildID: string, options: Array<ModifyChannelPositionsEntry>): Promise<void>;
/**
* Modify the current member in a guild.
* @param guildID The ID of the guild.
* @param options The options for editing the member.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}<br>{@link Guild#clientMember | Guild#clientMember}
*/
editCurrentMember(guildID: string, options: EditCurrentMemberOptions): Promise<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](https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state-caveats) for more information.
* @param guildID The ID of the guild.
* @param options The options for editing the voice state.
* @caching This method **does not** cache its result.
*/
editCurrentUserVoiceState(guildID: string, options: EditCurrentUserVoiceStateOptions): Promise<void>;
/**
* Edit an existing emoji.
* @param guildID The ID of the guild the emoji is in.
* @param options The options for editing the emoji.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#emojis | Guild#emojis}
*/
editEmoji(guildID: string, emojiID: string, options: EditGuildEmojiOptions): Promise<GuildEmoji>;
/**
* Edit the incident actions for a guild.
* @param guildID The ID of the guild.
* @param options The options for editing the incident actions.
* @caching This method **does not** cache its result.
*/
editIncidentActions(guildID: string, options: EditIncidentActionsOptions): Promise<IncidentActions>;
/**
* Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the `CHANGE_NICKNAME` permission.
* @param guildID The ID of the guild.
* @param memberID The ID of the member.
* @param options The options for editing the member.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}
*/
editMember(guildID: string, memberID: string, options: EditMemberOptions): Promise<Member>;
/**
* Edit a guild's onboarding configuration.
* @param guildID The ID of the guild.
* @param options The options for editing the onboarding configuration.
* @caching This method **does not** cache its result.
*/
editOnboarding(guildID: string, options: EditOnboardingOptions): Promise<Onboarding>;
/**
* Edit an existing role.
* @param guildID The ID of the guild.
* @param options The options for editing the role.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#roles | Guild#roles}
*/
editRole(guildID: string, roleID: string, options: EditRoleOptions): Promise<Role>;
/**
* Edit the position of roles in a guild.
* @param guildID The ID of the guild.
* @param options The roles to move.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#roles | Guild#roles}
*/
editRolePositions(guildID: string, options: Array<EditRolePositionsEntry>, reason?: string): Promise<Array<Role>>;
/**
* Edit an existing scheduled event in a guild.
* @param guildID The ID of the guild.
* @param scheduledEventID The ID of the scheduled event.
* @param options The options for editing the scheduled event.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
*/
editScheduledEvent(guildID: string, scheduledEventID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
/**
* Edit a soundboard sound.
* @param guildID The ID of the guild.
* @param soundID The ID of the soundboard sound to edit.
* @param options The options for editing the soundboard sound.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
*/
editSoundboardSound(guildID: string, soundID: string, options: EditSoundboardSoundOptions): Promise<Soundboard>;
/**
* Edit a sticker.
* @param guildID The ID of the guild.
* @param options The options for editing the sticker.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#stickers | Guild#stickers}
*/
editSticker(guildID: string, stickerID: string, options: EditStickerOptions): Promise<Sticker>;
/**
* Edit a guild template.
* @param guildID The ID of the guild.
* @param code The code of the template.
* @param options The options for editing the template.
* @caching This method **does not** cache its result.
*/
editTemplate(guildID: string, code: string, options: EditGuildTemplateOptions): Promise<GuildTemplate>;
/**
* Edit a guild member's voice state. `channelID` is required, and the user must already be in that channel. See [Discord's docs](https://discord.com/developers/docs/resources/guild#modify-user-voice-state) for more information.
* @param guildID The ID of the guild.
* @param memberID The ID of the member.
* @param options The options for editing the voice state.
* @caching This method **does not** cache its result.
*/
editUserVoiceState(guildID: string, memberID: string, options: EditUserVoiceStateOptions): Promise<void>;
/**
* Edit the welcome screen in a guild.
* @param guildID The ID of the guild.
* @param options The options for editing the welcome screen.
* @caching This method **does not** cache its result.
*/
editWelcomeScreen(guildID: string, options: EditWelcomeScreenOptions): Promise<WelcomeScreen>;
/**
* Edit the widget of a guild.
* @param guildID The ID of the guild.
* @param options The options for editing the widget.
* @caching This method **does not** cache its result.
*/
editWidget(guildID: string, options: WidgetSettings): Promise<Widget>;
/**
* Get a guild.
* @param guildID The ID of the guild.
* @param withCounts If the approximate number of members and online members should be included.
* @caching This method **may** cache its result. The result will not be cached if the guild is not already cached.
* @caches {@link Client#guilds | Client#guilds}
*/
get(guildID: string, withCounts?: boolean): Promise<Guild>;
/**
* Get the active threads in a guild.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#threads | Guild#threads}
*/
getActiveThreads(guildID: string): Promise<GetActiveThreadsResponse>;
/**
* Get a guild's audit log.
* @param guildID The ID of the guild.
* @param options The options for getting the audit logs.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}<br>{@link Guild#scheduledEvents | Guild#scheduledEvents}<br>{@link Guild#integrations | Guild#integrations}<br>{@link Guild#threads | Guild#threads}<br>{@link Client#users | Client#users}
*/
getAuditLog(guildID: string, options?: GetAuditLogOptions): Promise<AuditLog>;
/**
* Get an auto moderation rule for a guild.
* @param guildID The ID of the guild.
* @param ruleID The ID of the rule to get.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
*/
getAutoModerationRule(guildID: string, ruleID: string): Promise<AutoModerationRule>;
/**
* Get the auto moderation rules for a guild.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
*/
getAutoModerationRules(guildID: string): Promise<Array<AutoModerationRule>>;
/**
* Get a ban.
* @param guildID The ID of the guild.
* @param userID The ID of the user to get the ban of.
* @caching This method **does** cache part of its result.
* @caches {@link Client#users | Client#users}
*/
getBan(guildID: string, userID: string): Promise<Ban>;
/**
* Get the bans in a guild.
* @param guildID The ID of the guild.
* @param options The options for getting the bans.
* @caching This method **does** cache part of its result.
* @caches {@link Client#users | Client#users}
*/
getBans(guildID: string, options?: GetBansOptions): Promise<Array<Ban>>;
/**
* Get the channels in a guild. Does not include threads.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#channels | Guild#channels}
*/
getChannels(guildID: string): Promise<Array<AnyGuildChannelWithoutThreads>>;
/**
* Get an emoji in a guild.
* @param guildID The ID of the guild.
* @param emojiID The ID of the emoji to get.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#emojis | Guild#emojis}
*/
getEmoji(guildID: string, emojiID: string): Promise<GuildEmoji>;
/**
* Get the emojis in a guild.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#emojis | Guild#emojis} (will be completely cleared and refilled)
*/
getEmojis(guildID: string): Promise<Array<GuildEmoji>>;
/**
* Get the integrations in a guild.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#integrations | Guild#integrations}
*/
getIntegrations(guildID: string): Promise<Array<Integration>>;
/**
* Get the invites of a guild.
* @param guildID The ID of the guild to get the invites of.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#invites | Guild#invites}
*/
getInvites<CH extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(guildID: string): Promise<Array<Invite<"withMetadata", CH>>>;
/**
* Get a guild member.
* @param guildID The ID of the guild.
* @param memberID The ID of the member.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}
*/
getMember(guildID: string, memberID: string): Promise<Member>;
/**
* Get a guild's members. This requires the `GUILD_MEMBERS` intent.
* @param guildID The ID of the guild.
* @param options The options for getting the members.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}}
*/
getMembers(guildID: string, options?: GetMembersOptions): Promise<Array<Member>>;
/**
* Get a guild's onboarding info.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getOnboarding(guildID: string): Promise<Onboarding>;
/**
* Get a preview of a guild. If the client is not already in this guild, the guild must be lurkable.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getPreview(guildID: string): Promise<GuildPreview>;
/**
* Get the prune count of a guild.
* @param guildID The ID of the guild.
* @param options The options for getting the prune count.
* @caching This method **does not** cache its result.
*/
getPruneCount(guildID: string, options?: GetPruneCountOptions): Promise<number>;
/**
* Get a role in a guild.
* @param guildID The ID of the guild.
* @param roleID The ID of the role to get.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#roles | Guild#roles}
*/
getRole(guildID: string, roleID: string): Promise<Role>;
/**
* Get the roles in a guild.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#roles | Guild#roles}
*/
getRoles(guildID: string): Promise<Array<Role>>;
/**
* Get a scheduled event.
* @param guildID The ID of the guild.
* @param eventID The ID of the scheduled event to get.
* @param withUserCount If the number of users subscribed to the event should be included.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
*/
getScheduledEvent(guildID: string, eventID: string, withUserCount?: number): Promise<GuildScheduledEvent>;
/**
* Get the users subscribed to a scheduled event.
* @param guildID The ID of the guild.
* @param eventID The ID of the scheduled event.
* @param options The options for getting the users.
* @caching This method **does** cache part its result. Members will not be cached if the guild is not cached.
* @caches {@link Client#users | Client#users}<br>{@link Guild#members | Guild#members}
*/
getScheduledEventUsers(guildID: string, eventID: string, options?: GetScheduledEventUsersOptions): Promise<Array<ScheduledEventUser>>;
/**
* Get a guild's scheduled events.
* @param guildID The ID of the guild.
* @param withUserCount If the number of users subscribed to the event should be included.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
*/
getScheduledEvents(guildID: string, withUserCount?: number): Promise<Array<GuildScheduledEvent>>;
/**
* Get a soundboard sound.
* @param guildID The ID of the guild.
* @param soundID The ID of the soundboard sound to get.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
*/
getSoundboardSound(guildID: string, soundID: string): Promise<Soundboard>;
/**
* Get a guild's soundboard sounds.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
*/
getSoundboardSounds(guildID: string): Promise<Array<Soundboard>>;
/**
* Get a sticker. Response will include a user if the client has the `MANAGE_EMOJIS_AND_STICKERS` permissions.
* @param guildID The ID of the guild.
* @param stickerID The ID of the sticker to get.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#stickers | Guild#stickers}
*/
getSticker(guildID: string, stickerID: string): Promise<Sticker>;
/**
* Get a guild's stickers. Stickers will include a user if the client has the `MANAGE_EMOJIS_AND_STICKERS` permissions.
* @param guildID The ID of the guild.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#stickers | Guild#stickers} (will be completely cleared and refilled)
*/
getStickers(guildID: string): Promise<Array<Sticker>>;
/**
* Get a guild template.
* @param code The code of the template to get.
* @caching This method **does not** cache its result.
*/
getTemplate(code: string): Promise<GuildTemplate>;
/**
* Get a guild's templates.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getTemplates(guildID: string): Promise<Array<GuildTemplate>>;
/**
* Get the vanity url of a guild.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getVanityURL(guildID: string): Promise<GetVanityURLResponse>;
/**
* Get the list of usable voice regions for a guild. This will return VIP servers when the guild is VIP-enabled.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getVoiceRegions(guildID: string): Promise<Array<VoiceRegion>>;
/**
* Get the voice state of a member.
* @param guildID The ID of the guild.
* @param memberID The ID of the member. Use `@me` for the bot user.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#voiceStates | Guild#voiceStates}
*/
getVoiceState(guildID: string, memberID: string): Promise<VoiceState>;
/**
* Get the welcome screen for a guild.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getWelcomeScreen(guildID: string): Promise<WelcomeScreen>;
/**
* Get the widget of a guild.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getWidget(guildID: string): Promise<Widget>;
/**
* Get the widget image of a guild.
* @param guildID The ID of the guild.
* @param style The style of the image.
* @caching This method **does not** cache its result.
*/
getWidgetImage(guildID: string, style?: WidgetImageStyle): Promise<Buffer>;
/**
* Get the raw JSON widget of a guild.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getWidgetJSON(guildID: string): Promise<RawWidget>;
/**
* Get a guild's widget settings.
* @param guildID The ID of the guild.
* @caching This method **does not** cache its result.
*/
getWidgetSettings(guildID: string): Promise<WidgetSettings>;
/**
* Search a guild's members.
* @param guildID The ID of the guild.
* @param options The options to search with.
* @param retryOnIndexNotAvailable If the search should be retried if Discord replies with an index unavailable response. This will retry at most one time, waiting for `retry_after` or 15-45 seconds.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}
*/
memberSearch(guildID: string, options?: MemberSearchOptions, retryOnIndexNotAvailable?: boolean): Promise<MemberSearchResults>;
/**
* Remove a ban.
* @param guildID The ID of the guild.
* @param userID The ID of the user to remove the ban from.
* @param reason The reason for removing the ban.
* @caching This method **does not** cache its result.
*/
removeBan(guildID: string, userID: string, reason?: string): Promise<void>;
/**
* Remove a member from a guild.
* @param guildID The ID of the guild.
* @param memberID The ID of the user to remove.
* @param reason The reason for the removal.
* @caching This method **does not** cache its result.
*/
removeMember(guildID: string, memberID: string, reason?: string): Promise<void>;
/**
* Remove a role from a member.
* @param guildID The ID of the guild.
* @param memberID The ID of the member.
* @param roleID The ID of the role to remove.
* @param reason The reason for removing the role.
* @caching This method **does not** cache its result.
*/
removeMemberRole(guildID: string, memberID: string, roleID: string, reason?: string): Promise<void>;
/**
* Search the username & nicknames of members in a guild. See {@link REST/Guilds#memberSearch | memberSearch} for a more detailed search.
* @param guildID The ID of the guild.
* @param options The options to search with.
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
* @caches {@link Guild#members | Guild#members}
*/
searchMembers(guildID: string, options: SearchMembersOptions): Promise<Array<Member>>;
/**
* Sync a guild template.
* @param guildID The ID of the guild.
* @param code The code of the template to sync.
* @caching This method **does not** cache its result.
*/
syncTemplate(guildID: string, code: string): Promise<GuildTemplate>;
}