Skip to content

GuildScheduledEvent

GuildScheduledEvent ⇐ Base

Represents a scheduled event in a guild.

Kind: global class
Extends: Base

new GuildScheduledEvent([data], guildId, client)

Constructs a new GuildScheduledEvent object.

Returns: GuildScheduledEvent - - The constructed GuildScheduledEvent object.

ParamTypeDescription
[data]ObjectThe data for the scheduled event.
guildIdstringThe ID of the guild that the event belongs to.
clientClientThe 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.

ParamTypeDescription
optionsobjectThe 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.

ParamTypeDescription
optionsObjectThe 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.

ParamTypeDescription
namestringThe new name to set.
reasonstringThe 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.

ParamTypeDescription
descriptionstringThe new description to set.
reasonstringThe 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.

ParamTypeDescription
privacyLevelstringThe privacy level to set.
reasonstringThe 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.

ParamTypeDescription
entityTypestringThe new entity type to set.
reasonstringThe 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.

ParamTypeDescription
entityMetadataanyThe metadata to set for the entity.
reasonstringThe 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.

ParamTypeDescription
imageanyThe new image to set.
reasonstringThe 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.

ParamTypeDescription
scheduledStartTimeDateThe scheduled start time for the event.
reasonstringThe 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.

ParamTypeDescription
scheduledEndTimeDateThe new scheduled end time for the task.
reasonstringThe 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.

ParamTypeDescription
statusanyThe new status value.
reasonanyThe 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.

ParamTypeDescription
optionsObjectOptional parameters for generating the URL.
[options.dynamic]booleanWhether the image should be dynamically generated.
[options.size]stringThe desired size of the image.
[options.format]stringThe 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.