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
Modifier and TypeFieldDescriptionstatic final int
Maximum length of a channel description (42) -
Method Summary
Modifier and TypeMethodDescriptionReturns theGuildChannel
that 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()
long
The id of this recommended channel.static GuildWelcomeScreen.Channel
of
(StandardGuildChannel channel, String description) Constructs a new welcome channel.static GuildWelcomeScreen.Channel
of
(StandardGuildChannel channel, String description, Emoji emoji) Constructs a new welcome channel.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
Methods 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:
getIdLong
in interfaceISnowflake
- Returns:
- The id of this recommended channel
-
getChannel
Returns theGuildChannel
that is linked to this recommended channel.
This will benull
if the linked channel was deleted, or if the welcome screen comes from aninvite guild
.- Returns:
- The
GuildChannel
that 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 returnnull
if no emoji was setThe emoji will always be from this guild, if not a unicode emoji
CustomEmoji.isAnimated()
will always returnfalse
if:- This welcome screen came from an
invite's guild
CacheFlag.EMOJI
is disabled
- Returns:
- The emoji that is used for this recommended channel or
null
- This welcome screen came from an
-