Class InlineQuery


  • public class InlineQuery
    extends java.lang.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:
    InlineQuery
    • Constructor Detail

      • InlineQuery

        public InlineQuery()
    • Method Detail

      • getId

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

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

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

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

        @Nullable
        public 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

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

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

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

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

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object