Interface GuildWelcomeScreen.Channel

All Superinterfaces:
ISnowflake, SerializableData
Enclosing interface:
GuildWelcomeScreen

public static interface GuildWelcomeScreen.Channel extends ISnowflake, SerializableData
POJO for the recommended channels information provided by a welcome screen.
Recommended channels are shown in the welcome screen after joining a server.
See Also:
  • Field Details

    • MAX_DESCRIPTION_LENGTH

      static final int MAX_DESCRIPTION_LENGTH
      Maximum length of a channel description (42)
      See Also:
  • Method Details

    • of

      Constructs a new welcome channel.
      Parameters:
      channel - The Discord channel to be presented to the user
      description - 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

      Constructs a new welcome channel.
      Parameters:
      channel - The Discord channel to be presented the user
      description - The description of the channel, must not be longer than 42
      emoji - 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

      @Nullable Guild getGuild()
      The Guild, or null if this welcome channel came from an Invite
      Returns:
      The Guild, or null
    • getIdLong

      long getIdLong()
      The id of this recommended channel.
      Specified by:
      getIdLong in interface ISnowflake
      Returns:
      The id of this recommended channel
    • getChannel

      @Nullable GuildChannel getChannel()
      Returns the GuildChannel that is linked to this recommended channel.
      This will be null if the linked channel was deleted, or if the welcome screen comes from an invite guild.
      Returns:
      The GuildChannel that is linked to this recommended channel or null
    • getDescription

      @Nonnull String getDescription()
      The description of this recommended channel shown in the welcome screen.
      Returns:
      The description of this recommended channel
    • getEmoji

      @Nullable EmojiUnion getEmoji()
      The emoji that is used for this recommended channel.
      This will return null if no emoji was set

      The emoji will always be from this guild, if not a unicode emoji
      CustomEmoji.isAnimated() will always return false if:

      Returns:
      The emoji that is used for this recommended channel or null