public class TextChannelUpdateEvent extends ChannelEvent
TextChannel
is updated in a guild.
The TextChannel
may have been turned into a NewsChannel
.
The old text channel may not be present if channels are not stored.
This event is dispatched by Discord.
Constructor and Description |
---|
TextChannelUpdateEvent(GatewayDiscordClient gateway,
ShardInfo shardInfo,
GuildMessageChannel current,
TextChannel old) |
Modifier and Type | Method and Description |
---|---|
GuildMessageChannel |
getCurrent()
Gets the current, new version of the
TextChannel that was updated in this event. |
Optional<NewsChannel> |
getNewsChannel()
Gets the current, new version of the
TextChannel that was updated in this event as an optional
value of a NewsChannel . |
Optional<TextChannel> |
getOld()
Gets the old version of the
TextChannel that was updated in this event, if present. |
Optional<TextChannel> |
getTextChannel()
Gets the current, new version of the
TextChannel that was updated in this event as an optional
value of a TextChannel . |
String |
toString() |
getClient, getShardInfo
public TextChannelUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, GuildMessageChannel current, @Nullable TextChannel old)
public GuildMessageChannel getCurrent()
TextChannel
that was updated in this event.
The TextChannel
may have been turned into a NewsChannel
.TextChannel
.public Optional<NewsChannel> getNewsChannel()
TextChannel
that was updated in this event as an optional
value of a NewsChannel
.NewsChannel
. Empty if the channel continued to be a TextChannel
.public Optional<TextChannel> getTextChannel()
TextChannel
that was updated in this event as an optional
value of a TextChannel
.TextChannel
. Empty if the channel was changed to a NewsChannel
.public Optional<TextChannel> getOld()
TextChannel
that was updated in this event, if present.
This may not be available if TextChannels
are not stored.TextChannel
, if present.