Record Class TelegramClient
java.lang.Object
java.lang.Record
net.flectone.pulse.module.integration.telegram.model.TelegramClient
-
Constructor Summary
ConstructorsConstructorDescriptionTelegramClient(@NonNull String token, @NonNull FPlayer sender, @NonNull org.telegram.telegrambots.client.okhttp.OkHttpTelegramClient client, @NonNull org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplication application, long id) Creates an instance of aTelegramClientrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplicationReturns the value of theapplicationrecord component.@NonNull org.telegram.telegrambots.client.okhttp.OkHttpTelegramClientclient()Returns the value of theclientrecord component.final booleanIndicates whether some other object is "equal to" this one.voidexecuteMethod(@NonNull org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> method) final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.voidregisterListener(@NonNull TelegramEventListener telegramEventListener) @NonNull FPlayersender()Returns the value of thesenderrecord component.@NonNull Stringtoken()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TelegramClient
public TelegramClient(@NonNull String token, @NonNull FPlayer sender, @NonNull org.telegram.telegrambots.client.okhttp.OkHttpTelegramClient client, @NonNull org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplication application, long id) Creates an instance of aTelegramClientrecord class.- Parameters:
token- the value for thetokenrecord componentsender- the value for thesenderrecord componentclient- the value for theclientrecord componentapplication- the value for theapplicationrecord componentid- the value for theidrecord component
-
-
Method Details
-
registerListener
public void registerListener(@NonNull TelegramEventListener telegramEventListener) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
executeMethod
public void executeMethod(@NonNull org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> method) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
client
public @NonNull org.telegram.telegrambots.client.okhttp.OkHttpTelegramClient client()Returns the value of theclientrecord component.- Returns:
- the value of the
clientrecord component
-
application
public @NonNull org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplication application()Returns the value of theapplicationrecord component.- Returns:
- the value of the
applicationrecord component
-
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-