Class InlineQuery

java.lang.Object
io.micronaut.chatbots.telegram.api.InlineQuery

public class InlineQuery extends Object
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
Since:
1.0.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • InlineQuery

      public InlineQuery()
  • Method Details

    • getId

      @NonNull public @NonNull String getId()
      Returns:
      Unique identifier for this query.
    • setId

      public void setId(@NonNull @NonNull String id)
      Parameters:
      id - Unique identifier for this query.
    • getFrom

      @NonNull public @NonNull User getFrom()
      Returns:
      Sender.
    • setFrom

      public void setFrom(@NonNull @NonNull User from)
      Parameters:
      from - Sender.
    • getLocation

      @Nullable public @Nullable Location getLocation()
      Returns:
      Sender location, only for bots that request user location.
    • setLocation

      public void setLocation(@Nullable @Nullable Location location)
      Parameters:
      location - Sender location, only for bots that request user location.
    • getQuery

      @NonNull public @NonNull String getQuery()
      Returns:
      Text of the query (up to 512 characters).
    • setQuery

      public void setQuery(@NonNull @NonNull String query)
      Parameters:
      query - Text of the query (up to 512 characters).
    • getOffset

      @NonNull public @NonNull String getOffset()
      Returns:
      Offset of the results to be returned, can be controlled by the bot.
    • setOffset

      public void setOffset(@NonNull @NonNull String offset)
      Parameters:
      offset - Offset of the results to be returned, can be controlled by the bot.
    • getChatType

      @Nullable public @Nullable String getChatType()
      Returns:
      Type of the chat from which the inline query was sent
    • setChatType

      public void setChatType(@Nullable @Nullable String chatType)
      Parameters:
      chatType - Type of the chat from which the inline query was sent
    • toString

      public String toString()
      Overrides:
      toString in class Object