Rename entity parameter with something clearer

This commit is contained in:
Lonami Exo
2022-03-02 09:00:39 +01:00
parent 392808b950
commit c3cefef37c
8 changed files with 142 additions and 136 deletions

View File

@@ -13,12 +13,12 @@ async def inline_query(
bot: 'hints.EntityLike',
query: str,
*,
entity: 'hints.EntityLike' = None,
dialog: 'hints.EntityLike' = None,
offset: str = None,
geo_point: '_tl.GeoPoint' = None) -> _custom.InlineResults:
bot = await self.get_input_entity(bot)
if entity:
peer = await self.get_input_entity(entity)
if dialog:
peer = await self.get_input_entity(dialog)
else:
peer = _tl.InputPeerEmpty()
@@ -30,4 +30,4 @@ async def inline_query(
geo_point=geo_point
))
return _custom.InlineResults(self, result, entity=peer if entity else None)
return _custom.InlineResults(self, result, entity=peer if dialog else None)