Package net.dv8tion.jda.core.events.user
Class UserTypingEvent
- java.lang.Object
-
- net.dv8tion.jda.core.events.Event
-
- net.dv8tion.jda.core.events.user.GenericUserEvent
-
- net.dv8tion.jda.core.events.user.UserTypingEvent
-
public class UserTypingEvent extends GenericUserEvent
Indicates that aUser
started typing. (Similar to the typing indicator in the Discord client)Can be used to retrieve the User who started typing and when and in which MessageChannel they started typing.
-
-
Constructor Summary
Constructors Constructor Description UserTypingEvent(JDA api, long responseNumber, User user, MessageChannel channel, java.time.OffsetDateTime timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageChannel
getChannel()
The channel where the typing was startedGroup
getGroup()
Group
in which this users started typing, ornull
if this was not in a Group.Guild
getGuild()
Guild
in which this users started typing, ornull
if this was not in a Guild.Member
getMember()
Member
instance for the User, or null if this was not in a Guild.PrivateChannel
getPrivateChannel()
PrivateChannel
in which this users started typing, ornull
if this was not in a PrivateChannel.TextChannel
getTextChannel()
TextChannel
in which this users started typing, ornull
if this was not in a TextChannel.java.time.OffsetDateTime
getTimestamp()
The time when the user started typingChannelType
getType()
TheChannelType
boolean
isFromType(ChannelType type)
Whether the user started typing in a channel of the specified type.-
Methods inherited from class net.dv8tion.jda.core.events.user.GenericUserEvent
getUser
-
Methods inherited from class net.dv8tion.jda.core.events.Event
getJDA, getResponseNumber
-
-
-
-
Constructor Detail
-
UserTypingEvent
public UserTypingEvent(JDA api, long responseNumber, User user, MessageChannel channel, java.time.OffsetDateTime timestamp)
-
-
Method Detail
-
getTimestamp
public java.time.OffsetDateTime getTimestamp()
The time when the user started typing- Returns:
- The time when the typing started
-
getChannel
public MessageChannel getChannel()
The channel where the typing was started- Returns:
- The channel
-
isFromType
public boolean isFromType(ChannelType type)
Whether the user started typing in a channel of the specified type.- Parameters:
type
-ChannelType
- Returns:
- True, if the user started typing in a channel of the specified type
-
getType
public ChannelType getType()
TheChannelType
- Returns:
- The
ChannelType
-
getPrivateChannel
public PrivateChannel getPrivateChannel()
PrivateChannel
in which this users started typing, ornull
if this was not in a PrivateChannel.- Returns:
- Possibly-null
PrivateChannel
-
getTextChannel
public TextChannel getTextChannel()
TextChannel
in which this users started typing, ornull
if this was not in a TextChannel.- Returns:
- Possibly-null
TextChannel
-
getGroup
public Group getGroup()
Group
in which this users started typing, ornull
if this was not in a Group.- Returns:
- Possibly-null
Group
-
getGuild
public Guild getGuild()
Guild
in which this users started typing, ornull
if this was not in a Guild.- Returns:
- Possibly-null
Guild
-
-