Record Class UserMessageReceivedEvent
java.lang.Object
java.lang.Record
org.teleight.teleightbots.event.user.UserMessageReceivedEvent
- All Implemented Interfaces:
Event,MessageEvent
public record UserMessageReceivedEvent(@NotNull TelegramBot bot, @NotNull Update update)
extends Record
implements MessageEvent
-
Constructor Summary
ConstructorsConstructorDescriptionUserMessageReceivedEvent(@NotNull TelegramBot bot, @NotNull Update update) Creates an instance of aUserMessageReceivedEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull TelegramBotbot()Returns the value of thebotrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()final StringtoString()Returns a string representation of this record class.@NotNull Updateupdate()Returns the value of theupdaterecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.event.trait.MessageEvent
reply
-
Constructor Details
-
UserMessageReceivedEvent
Creates an instance of aUserMessageReceivedEventrecord class.- Parameters:
bot- the value for thebotrecord componentupdate- the value for theupdaterecord component
-
-
Method Details
-
update
Returns the value of theupdaterecord component.- Specified by:
updatein interfaceMessageEvent- Returns:
- the value of the
updaterecord component
-
message
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
bot
Returns the value of thebotrecord component.
-