WelcomeScreen
WelcomeScreen ⇐ Base
Represents a welcome screen for a guild.
Kind: global class
Extends: Base
- WelcomeScreen ⇐
Base
- new WelcomeScreen([data], guildId, client)
- .guild ⇒
- .edit(options) ⇒
Promise
- .setEnabled(enabled, reason) ⇒
Promise
- .setWelcomeChannels(channels, reason) ⇒
Promise
- .setDescription(description, reason) ⇒
Promise
new WelcomeScreen([data], guildId, client)
Constructs a new instance of the WelcomeScreen class.
Param | Type | Description |
---|---|---|
[data] | Object | The data for the welcome screen. |
guildId | string | The ID of the guild. |
client | Client | The client instance. |
welcomeScreen.guild ⇒
Retrieves the guild associated with this guildId.
Kind: instance property of WelcomeScreen
Returns: The guild object if found, otherwise null.
welcomeScreen.edit(options) ⇒ Promise
Edits the welcome screen of the guild with the provided options.
Kind: instance method of WelcomeScreen
Returns: Promise
- A promise that resolves when the welcome screen is successfully edited.
Param | Type | Description |
---|---|---|
options | Object | The options to update the welcome screen with. |
welcomeScreen.setEnabled(enabled, reason) ⇒ Promise
Sets the enabled status of an item and provides a reason for the change.
Kind: instance method of WelcomeScreen
Returns: Promise
- - A promise that resolves when the edit is complete.
Param | Type | Description |
---|---|---|
enabled | boolean | The new enabled status of the item. |
reason | string | The reason for the change in enabled status. |
welcomeScreen.setWelcomeChannels(channels, reason) ⇒ Promise
Sets the welcome channels for a specific entity.
Kind: instance method of WelcomeScreen
Returns: Promise
- - A promise that resolves when the welcome channels are set.
Param | Type | Description |
---|---|---|
channels | Array | The channels to set as welcome channels. |
reason | string | The reason for setting the welcome channels. |
welcomeScreen.setDescription(description, reason) ⇒ Promise
Sets the description of an object and updates it with the provided reason.
Kind: instance method of WelcomeScreen
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. |