Class PlainMessageSendEvent
java.lang.Object
me.remigio07.chatplugin.api.common.event.discord.PlainMessageSendEvent
- All Implemented Interfaces:
CancellableEvent,ChatPluginEvent
Represents the event called just before a plain
message is sent through the
DiscordBot.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPlainMessageSendEvent(long channelID, String plainMessage) Constructs a new plain message send event. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the ID of the channel the plain message has been sent through.Gets this event's plain message.booleanChecks if this event has been cancelled and will not be executed.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.remigio07.chatplugin.api.common.event.ChatPluginEvent
call
-
Constructor Details
-
PlainMessageSendEvent
Constructs a new plain message send event.- Parameters:
channelID- Event's channel's IDplainMessage- Plain message involved
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableEventChecks if this event has been cancelled and will not be executed.- Specified by:
isCancelledin interfaceCancellableEvent- Returns:
- Whether this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableEventSets the cancellation state of this event.It will be passed through other registered listeners even if it is cancelled, but it will not be executed.
- Specified by:
setCancelledin interfaceCancellableEvent- Parameters:
cancelled- Whether this event should be cancelled
-
getChannelID
public long getChannelID()Gets the ID of the channel the plain message has been sent through.- Returns:
- Event's channel's ID
-
getPlainMessage
Gets this event's plain message.- Returns:
- Plain message involved
-