GuildScheduledEvent
GuildScheduledEvent ⇐ Base
Represents a scheduled event in a guild.
Kind: global class
Extends: Base
- GuildScheduledEvent ⇐
Base
- new GuildScheduledEvent([data], guildId, client)
- .guild ⇒
- .creator ⇒
- .fetch(options) ⇒
Promise
- .edit(options) ⇒
Promise
- .delete() ⇒
Promise.<void>
- .setName(name, reason) ⇒
Promise
- .setDescription(description, reason) ⇒
Promise
- .setPrivacyLevel(privacyLevel, reason) ⇒
Promise
- .setEntityType(entityType, reason) ⇒
Promise
- .setEntityMetadata(entityMetadata, reason) ⇒
Promise.<void>
- .setImage(image, reason) ⇒
Promise.<void>
- .setScheduledStartTime(scheduledStartTime, reason) ⇒
Promise
- .setScheduledEndTime(scheduledEndTime, reason) ⇒
Promise
- .setStatus(status, reason) ⇒
Promise.<any>
- .coverImageURL(options) ⇒
string
|null
- .inviteURL() ⇒
string
new GuildScheduledEvent([data], guildId, client)
Constructs a new GuildScheduledEvent object.
Returns: GuildScheduledEvent
- - The constructed GuildScheduledEvent object.
Param | Type | Description |
---|---|---|
[data] | Object | The data for the scheduled event. |
guildId | string | The ID of the guild that the event belongs to. |
client | Client | The client instance. |
guildScheduledEvent.guild ⇒
Retrieves the guild associated with this guildId.
Kind: instance property of GuildScheduledEvent
Returns: The guild object if found, otherwise null.
guildScheduledEvent.creator ⇒
Retrieves the creator of this object.
Kind: instance property of GuildScheduledEvent
Returns: The user object representing the creator, or null if the creator is not found.
guildScheduledEvent.fetch(options) ⇒ Promise
Fetches events for the guild using the provided options.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- A promise that resolves with the fetched events.
Param | Type | Description |
---|---|---|
options | object | The options for fetching events. |
guildScheduledEvent.edit(options) ⇒ Promise
Edits the guild’s events with the given options.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- A promise that resolves when the events have been successfully edited.
Param | Type | Description |
---|---|---|
options | Object | The options to edit the events with. |
guildScheduledEvent.delete() ⇒ Promise.<void>
Deletes the current event from the guild’s events collection.
Kind: instance method of GuildScheduledEvent
Returns: Promise.<void>
- A promise that resolves once the event is deleted.
guildScheduledEvent.setName(name, reason) ⇒ Promise
Sets the name and reason for an object.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the name and reason are successfully set.
Param | Type | Description |
---|---|---|
name | string | The new name to set. |
reason | string | The reason for setting the new name. |
guildScheduledEvent.setDescription(description, reason) ⇒ Promise
Sets the description of an object and updates it with the provided reason.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the description is successfully updated.
Param | Type | Description |
---|---|---|
description | string | The new description to set. |
reason | string | The reason for updating the description. |
guildScheduledEvent.setPrivacyLevel(privacyLevel, reason) ⇒ Promise
Sets the privacy level for the current user.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the privacy level is successfully set.
Param | Type | Description |
---|---|---|
privacyLevel | string | The privacy level to set. |
reason | string | The reason for setting the privacy level. |
guildScheduledEvent.setEntityType(entityType, reason) ⇒ Promise
Sets the entity type and reason for the current entity.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the entity type is successfully set.
Param | Type | Description |
---|---|---|
entityType | string | The new entity type to set. |
reason | string | The reason for the entity type change. |
guildScheduledEvent.setEntityMetadata(entityMetadata, reason) ⇒ Promise.<void>
Sets the metadata of an entity with the given entityMetadata and reason.
Kind: instance method of GuildScheduledEvent
Returns: Promise.<void>
- - A promise that resolves when the metadata is successfully set.
Param | Type | Description |
---|---|---|
entityMetadata | any | The metadata to set for the entity. |
reason | string | The reason for setting the metadata. |
guildScheduledEvent.setImage(image, reason) ⇒ Promise.<void>
Sets the image of an object and updates it with the given reason.
Kind: instance method of GuildScheduledEvent
Returns: Promise.<void>
- - A promise that resolves when the image is set and updated.
Param | Type | Description |
---|---|---|
image | any | The new image to set. |
reason | string | The reason for updating the image. |
guildScheduledEvent.setScheduledStartTime(scheduledStartTime, reason) ⇒ Promise
Sets the scheduled start time and reason for an event.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the edit is complete.
Param | Type | Description |
---|---|---|
scheduledStartTime | Date | The scheduled start time for the event. |
reason | string | The reason for the scheduled start time. |
guildScheduledEvent.setScheduledEndTime(scheduledEndTime, reason) ⇒ Promise
Sets the scheduled end time and reason for a task.
Kind: instance method of GuildScheduledEvent
Returns: Promise
- - A promise that resolves when the edit is complete.
Param | Type | Description |
---|---|---|
scheduledEndTime | Date | The new scheduled end time for the task. |
reason | string | The reason for the change in scheduled end time. |
guildScheduledEvent.setStatus(status, reason) ⇒ Promise.<any>
Sets the status and reason of an object and returns the updated object.
Kind: instance method of GuildScheduledEvent
Returns: Promise.<any>
- - A promise that resolves to the updated object.
Param | Type | Description |
---|---|---|
status | any | The new status value. |
reason | any | The new reason value. |
guildScheduledEvent.coverImageURL(options) ⇒ string
| null
Returns the URL of the cover image for the guild scheduled event.
Kind: instance method of GuildScheduledEvent
Returns: string
| null
- The URL of the cover image, or null if there is no image.
Param | Type | Description |
---|---|---|
options | Object | Optional parameters for generating the URL. |
[options.dynamic] | boolean | Whether the image should be dynamically generated. |
[options.size] | string | The desired size of the image. |
[options.format] | string | The desired format of the image. |
guildScheduledEvent.inviteURL() ⇒ string
Generates an invite URL for a user.
Kind: instance method of GuildScheduledEvent
Returns: string
- The invite URL.