Allow removing reactions

This commit is contained in:
Marcel Alexandru Nitan 2022-06-27 12:26:19 +03:00
parent dd51aea4db
commit 48df341a21
2 changed files with 7 additions and 4 deletions

View File

@ -755,10 +755,11 @@ async def send_reaction(
entity: 'hints.DialogLike',
message: 'hints.MessageIDLike',
reaction: typing.Optional[str] = None,
big: bool = False
big: bool = False,
use_default: bool = False
):
message = utils.get_message_id(message) or 0
if not reaction:
if not reaction and use_default:
get_default_request = _tl.fn.help.GetAppConfig()
app_config = await self(get_default_request)
reaction = (

View File

@ -1251,7 +1251,7 @@ class Message(ChatGetter, SenderGetter):
return await self._client.unpin_message(
await self.get_input_chat(), self.id)
async def react(self, reaction=None):
async def react(self, reaction=None, big=False, use_default=False):
"""
Reacts on the given message. Shorthand for
`telethon.client.messages.MessageMethods.send_reaction`
@ -1261,7 +1261,9 @@ class Message(ChatGetter, SenderGetter):
return await self._client.send_reaction(
await self.get_input_chat(),
self.id,
reaction
reaction,
big,
use_default
)
# endregion Public Methods