Package tv.phantombot.event.discord
Class DiscordEvent
java.lang.Object
tv.phantombot.event.Event
tv.phantombot.event.discord.DiscordEvent
- Direct Known Subclasses:
DiscordChannelEvent
,DiscordReactionEvent
,DiscordRoleEvent
,DiscordUserVoiceChannelEvent
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Class constructor for this event.protected
DiscordEvent
(User user) Class constructor for this event.protected
DiscordEvent
(User user, Channel channel) Class constructor for this event.protected
DiscordEvent
(User user, Channel channel, Message message) Class constructor for this event.protected
DiscordEvent
(User user, VoiceChannel voicechannel) Class constructor for this event. -
Method Summary
Modifier and TypeMethodDescriptionMethod that returns the channel name.Method that returns the channel ID.Method that returns the channel's object for Discord4J.Method that returns the message objectMethod that returns the user's object for Discord4J.Method that returns the channel's object for Discord4J.Deprecated, for removal: This API element is subject to removal in a future version.Discriminators have been removed from DiscordMethod that returns the mention string for this user.Method that gets the raw message.Method that returns the sender of the event.Method that returns the user's ID.Method that returns the username of the event.
-
Constructor Details
-
DiscordEvent
protected DiscordEvent()Class constructor for this event. -
DiscordEvent
Class constructor for this event.- Parameters:
user
-
-
DiscordEvent
Class constructor for this event.- Parameters:
user
-channel
-
-
DiscordEvent
Class constructor for this event.- Parameters:
user
-channel
-message
-
-
DiscordEvent
Class constructor for this event.- Parameters:
user
-channel
-
-
-
Method Details
-
getSender
Method that returns the sender of the event.- Returns:
getUsername()
converted to lowercase
-
getUsername
Method that returns the username of the event.- Returns:
-
getMention
Method that returns the mention string for this user.- Returns:
-
getChannel
Method that returns the channel name.- Returns:
-
getMessage
Method that gets the raw message.- Returns:
-
getChannelId
Method that returns the channel ID.- Returns:
-
getDiscriminator
Deprecated, for removal: This API element is subject to removal in a future version.Discriminators have been removed from DiscordMethod that returns the user's discriminator.- Returns:
0
-
getSenderId
Method that returns the user's ID.- Returns:
-
getDiscordUser
Method that returns the user's object for Discord4J.- Returns:
-
getDiscordChannel
Method that returns the channel's object for Discord4J.- Returns:
-
getDiscordVoiceChannel
Method that returns the channel's object for Discord4J.- Returns:
-
getDiscordMessage
Method that returns the message object- Returns:
-