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