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

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

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

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

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

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

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

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

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

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

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

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

      public void setChatType(@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