Package net.dv8tion.jda.api.entities
Interface GuildWelcomeScreen.Channel
- All Superinterfaces:
ISnowflake,SerializableData
- Enclosing interface:
- GuildWelcomeScreen
POJO for the recommended channels information provided by a welcome screen.
Recommended channels are shown in the welcome screen after joining a server.
Recommended channels are shown in the welcome screen after joining a server.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum length of a channel description (42) -
Method Summary
Modifier and TypeMethodDescriptionReturns theGuildChannelthat is linked to this recommended channel.The description of this recommended channel shown in the welcome screen.getEmoji()The emoji that is used for this recommended channel.getGuild()longThe id of this recommended channel.static GuildWelcomeScreen.Channelof(StandardGuildChannel channel, String description) Constructs a new welcome channel.static GuildWelcomeScreen.Channelof(StandardGuildChannel channel, String description, Emoji emoji) Constructs a new welcome channel.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreatedMethods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData
toData
-
Field Details
-
MAX_DESCRIPTION_LENGTH
static final int MAX_DESCRIPTION_LENGTHMaximum length of a channel description (42)- See Also:
-
-
Method Details
-
of
@Nonnull static GuildWelcomeScreen.Channel of(@Nonnull StandardGuildChannel channel, @Nonnull String description) Constructs a new welcome channel.- Parameters:
channel- The Discord channel to be presented to the userdescription- The description of the channel, must not be longer than 42- Returns:
- The new welcome channel
- Throws:
IllegalArgumentException-- If the channel is null
- If the description is null, blank, or longer than 42
-
of
@Nonnull static GuildWelcomeScreen.Channel of(@Nonnull StandardGuildChannel channel, @Nonnull String description, @Nullable Emoji emoji) Constructs a new welcome channel.- Parameters:
channel- The Discord channel to be presented the userdescription- The description of the channel, must not be longer than 42emoji- The emoji to show beside the channel- Returns:
- The new welcome channel
- Throws:
IllegalArgumentException-- If the channel is null
- If the description is null, blank, or longer than 42
-
getGuild
- Returns:
- The Guild, or
null
-
getIdLong
long getIdLong()The id of this recommended channel.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- The id of this recommended channel
-
getChannel
Returns theGuildChannelthat is linked to this recommended channel.
This will benullif the linked channel was deleted, or if the welcome screen comes from aninvite guild.- Returns:
- The
GuildChannelthat is linked to this recommended channel ornull
-
getDescription
The description of this recommended channel shown in the welcome screen.- Returns:
- The description of this recommended channel
-
getEmoji
The emoji that is used for this recommended channel.
This will returnnullif no emoji was setThe emoji will always be from this guild, if not a unicode emoji
CustomEmoji.isAnimated()will always returnfalseif:- This welcome screen came from an
invite's guild CacheFlag.EMOJIis disabled
- Returns:
- The emoji that is used for this recommended channel or
null
- This welcome screen came from an
-