@@ -29,28 +29,34 @@ def answer_inline_query(
2929 inline_query_id : str ,
3030 results : List [InlineQueryResult ],
3131 cache_time : int = 300 ,
32- is_personal : bool = None ,
32+ is_gallery : bool = False ,
33+ is_personal : bool = False ,
3334 next_offset : str = "" ,
3435 switch_pm_text : str = "" ,
3536 switch_pm_parameter : str = ""
3637 ):
3738 """Send answers to an inline query.
38- No more than 50 results per query are allowed.
39+
40+ A maximum of 50 results per query is allowed.
3941
4042 Parameters:
4143 inline_query_id (``str``):
4244 Unique identifier for the answered query.
4345
44- results (List of :obj:`InlineQueryResult <pyrogram.InlineQueryResult> `):
46+ results (List of :obj:`InlineQueryResult`):
4547 A list of results for the inline query.
4648
4749 cache_time (``int``, *optional*):
4850 The maximum amount of time in seconds that the result of the inline query may be cached on the server.
4951 Defaults to 300.
5052
53+ is_gallery (``bool``, *optional*):
54+ Pass True, if results should be displayed in gallery mode instead of list mode.
55+ Defaults to False.
56+
5157 is_personal (``bool``, *optional*):
5258 Pass True, if results may be cached on the server side only for the user that sent the query.
53- By default, results may be returned to any user who sends the same query.
59+ By default (False) , results may be returned to any user who sends the same query.
5460
5561 next_offset (``str``, *optional*):
5662 Pass the offset that a client should send in the next query with the same text to receive more results.
@@ -83,7 +89,7 @@ def answer_inline_query(
8389 query_id = int (inline_query_id ),
8490 results = [r .write () for r in results ],
8591 cache_time = cache_time ,
86- gallery = None ,
92+ gallery = is_gallery or None ,
8793 private = is_personal or None ,
8894 next_offset = next_offset or None ,
8995 switch_pm = types .InlineBotSwitchPM (
0 commit comments