GuildManager
classe · Source
Manages API methods for Guilds and stores their cache.
Extends: CachedManager
Properties
cache
The cache of this Manager Source
_cache
The private cache of items for this manager. Source
holds
The data structure belonging to this manager. Source
client
The client that instantiated this Manager Source
Methods
resolve
Resolves a GuildResolvable to a Guild object. Parameters
| Name | Type | Description |
|---|---|---|
guild | GuildResolvable | The guild resolvable to identify |
Returns: GuildSource
resolveId
Resolves a GuildResolvable to a Guild id string. Parameters
| Name | Type | Description |
|---|---|---|
guild | GuildResolvable | The guild resolvable to identify |
Returns: SnowflakeSource
create
Creates a guild. This endpoint is no longer part of the public application API. It is retained only for undocumented user-account compatibility and may stop working without notice. Parameters
| Name | Type | Description |
|---|---|---|
name | string | The name of the guild |
options? | GuildCreateOptions | Options for creating the guild |
Returns: Promise<Guild> — The guild that was created Source
fetch
Obtains one or multiple guilds from Discord, or the guild cache if it's already available. Parameters
| Name | Type | Description |
|---|---|---|
options? | GuildResolvable | FetchGuildOptions | FetchGuildsOptions | The guild's id or options |
Returns: Promise<(Guild\|Collection<Snowflake, OAuth2Guild>)>Source
setIncidentActions
Sets the incident actions for a guild. Parameters
| Name | Type | Description |
|---|---|---|
guild | GuildResolvable | The guild |
incidentActions | IncidentActionsEditOptions | The incident actions to set |
Returns: Promise<IncidentActions>Source