Class TextChannelUpdateEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.channel.ChannelEvent
discord4j.core.event.domain.channel.TextChannelUpdateEvent
Dispatched when a
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.
- See Also:
-
Constructor Summary
ConstructorDescriptionTextChannelUpdateEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, GuildMessageChannel current, TextChannel old) -
Method Summary
Modifier and TypeMethodDescriptionGets the current, new version of theTextChannel
that was updated in this event.Gets the current, new version of theTextChannel
that was updated in this event as an optional value of aNewsChannel
.getOld()
Gets the old version of theTextChannel
that was updated in this event, if present.Gets the current, new version of theTextChannel
that was updated in this event as an optional value of aTextChannel
.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
TextChannelUpdateEvent
public TextChannelUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, GuildMessageChannel current, @Nullable TextChannel old)
-
-
Method Details
-
getCurrent
Gets the current, new version of theTextChannel
that was updated in this event. TheTextChannel
may have been turned into aNewsChannel
.- Returns:
- The current version of the updated
TextChannel
.
-
getNewsChannel
Gets the current, new version of theTextChannel
that was updated in this event as an optional value of aNewsChannel
.- Returns:
- An optional value of a
NewsChannel
. Empty if the channel continued to be aTextChannel
.
-
getTextChannel
Gets the current, new version of theTextChannel
that was updated in this event as an optional value of aTextChannel
.- Returns:
- An optional value of a
TextChannel
. Empty if the channel was changed to aNewsChannel
.
-
getOld
Gets the old version of theTextChannel
that was updated in this event, if present. This may not be available ifTextChannels
are not stored.- Returns:
- The old version of the updated
TextChannel
, if present.
-
toString
-