Interface MessageChannel

All Superinterfaces:
Channel, Formattable, IMentionable, ISnowflake
All Known Subinterfaces:
GroupChannel, GuildMessageChannel, GuildMessageChannelUnion, MessageChannelUnion, NewsChannel, PrivateChannel, StageChannel, StandardGuildMessageChannel, TextChannel, ThreadChannel, VoiceChannel

public interface MessageChannel extends Channel, Formattable
Represents a Discord channel that can have Messages and files sent to it.

Formattable
This interface extends Formattable and can be used with a Formatter such as used by String.format(String, Object...) or PrintStream.printf(String, Object...).

This will use Channel.getName() rather than Object.toString()!
Supported Features:

  • Alternative
    - Prepends the name with # (Example: %#s - results in #Channel.getName())
  • Width/Left-Justification
    - Ensures the size of a format (Example: %20s - uses at minimum 20 chars; %-10s - uses left-justified padding)
  • Precision
    - Cuts the content to the specified size (Example: %.20s)

More information on formatting syntax can be found in the format syntax documentation!
GuildMessageChannel is a special case which uses IMentionable.getAsMention() by default and uses the #Channel.getName() format as alternative

See Also: