File tree Expand file tree Collapse file tree
pyrogram/methods/messages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,22 +66,24 @@ async def send_reaction(
6666 # Retract a reaction
6767 await app.send_reaction(chat_id, message_id=message_id)
6868 """
69- if isinstance (emoji , list ):
70- emoji = [
69+ if not emoji :
70+ reaction = None
71+ elif isinstance (emoji , list ):
72+ reaction = [
7173 raw .types .ReactionCustomEmoji (document_id = i )
7274 if isinstance (i , int )
7375 else raw .types .ReactionEmoji (emoticon = i )
7476 for i in emoji
7577 ]
7678 else :
77- emoji = [raw .types .ReactionEmoji (emoticon = emoji )] if emoji else [ ]
79+ reaction = [raw .types .ReactionEmoji (emoticon = emoji )]
7880
7981 if message_id is not None :
8082 await self .invoke (
8183 raw .functions .messages .SendReaction (
8284 peer = await self .resolve_peer (chat_id ),
8385 msg_id = message_id ,
84- reaction = emoji ,
86+ reaction = reaction ,
8587 big = big
8688 )
8789 )
You can’t perform that action at this time.
0 commit comments