public class UserTypingEvent extends GenericUserEvent
User
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 | Description |
---|---|
UserTypingEvent(JDA api,
long responseNumber,
User user,
MessageChannel channel,
java.time.OffsetDateTime timestamp) |
Modifier and Type | Method | Description |
---|---|---|
MessageChannel |
getChannel() |
The channel where the typing was started
|
Group |
getGroup() |
Group in which this users started typing,
or null if this was not in a Group. |
Guild |
getGuild() |
Guild in which this users started typing,
or null 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,
or null if this was not in a PrivateChannel. |
TextChannel |
getTextChannel() |
TextChannel in which this users started typing,
or null if this was not in a TextChannel. |
java.time.OffsetDateTime |
getTimestamp() |
The time when the user started typing
|
ChannelType |
getType() |
The
ChannelType |
boolean |
isFromType(ChannelType type) |
Whether the user started typing in a channel of the specified type.
|
getJDA, getResponseNumber
getUser
public UserTypingEvent(JDA api, long responseNumber, User user, MessageChannel channel, java.time.OffsetDateTime timestamp)
public java.time.OffsetDateTime getTimestamp()
public MessageChannel getChannel()
public boolean isFromType(ChannelType type)
type
- ChannelType
public ChannelType getType()
ChannelType
ChannelType
public PrivateChannel getPrivateChannel()
PrivateChannel
in which this users started typing,
or null
if this was not in a PrivateChannel.PrivateChannel
public TextChannel getTextChannel()
TextChannel
in which this users started typing,
or null
if this was not in a TextChannel.TextChannel
public Group getGroup()
Group
in which this users started typing,
or null
if this was not in a Group.Group
public Guild getGuild()
Guild
in which this users started typing,
or null
if this was not in a Guild.Guild