Record Class ButtonPressEvent
java.lang.Object
java.lang.Record
org.teleight.teleightbots.event.keyboard.ButtonPressEvent
- All Implemented Interfaces:
Event
public record ButtonPressEvent(@NotNull TelegramBot bot, @NotNull Update update)
extends Record
implements Event
-
Constructor Summary
ConstructorsConstructorDescriptionButtonPressEvent(@NotNull TelegramBot bot, @NotNull Update update) Creates an instance of aButtonPressEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<Boolean> answer()@NotNull CompletableFuture<Boolean> @NotNull TelegramBotbot()Returns the value of thebotrecord component.@Nullable CallbackQuery@Nullable Chatchat()@Nullable StringchatId()final booleanIndicates whether some other object is "equal to" this one.@Nullable Userfrom()final inthashCode()Returns a hash code value for this object.@Nullable MaybeInaccessibleMessagemessage()final StringtoString()Returns a string representation of this record class.@NotNull Updateupdate()Returns the value of theupdaterecord component.
-
Constructor Details
-
ButtonPressEvent
Creates an instance of aButtonPressEventrecord class.- Parameters:
bot- the value for thebotrecord componentupdate- the value for theupdaterecord component
-
-
Method Details
-
callbackQuery
-
from
-
message
-
chat
-
chatId
-
answer
-
answer
-
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. -
update
Returns the value of theupdaterecord component.- Returns:
- the value of the
updaterecord component
-