mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-13 01:22:21 +03:00
Allow removing reactions
This commit is contained in:
parent
dd51aea4db
commit
48df341a21
|
@ -755,10 +755,11 @@ async def send_reaction(
|
||||||
entity: 'hints.DialogLike',
|
entity: 'hints.DialogLike',
|
||||||
message: 'hints.MessageIDLike',
|
message: 'hints.MessageIDLike',
|
||||||
reaction: typing.Optional[str] = None,
|
reaction: typing.Optional[str] = None,
|
||||||
big: bool = False
|
big: bool = False,
|
||||||
|
use_default: bool = False
|
||||||
):
|
):
|
||||||
message = utils.get_message_id(message) or 0
|
message = utils.get_message_id(message) or 0
|
||||||
if not reaction:
|
if not reaction and use_default:
|
||||||
get_default_request = _tl.fn.help.GetAppConfig()
|
get_default_request = _tl.fn.help.GetAppConfig()
|
||||||
app_config = await self(get_default_request)
|
app_config = await self(get_default_request)
|
||||||
reaction = (
|
reaction = (
|
||||||
|
|
|
@ -1251,7 +1251,7 @@ class Message(ChatGetter, SenderGetter):
|
||||||
return await self._client.unpin_message(
|
return await self._client.unpin_message(
|
||||||
await self.get_input_chat(), self.id)
|
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
|
Reacts on the given message. Shorthand for
|
||||||
`telethon.client.messages.MessageMethods.send_reaction`
|
`telethon.client.messages.MessageMethods.send_reaction`
|
||||||
|
@ -1261,7 +1261,9 @@ class Message(ChatGetter, SenderGetter):
|
||||||
return await self._client.send_reaction(
|
return await self._client.send_reaction(
|
||||||
await self.get_input_chat(),
|
await self.get_input_chat(),
|
||||||
self.id,
|
self.id,
|
||||||
reaction
|
reaction,
|
||||||
|
big,
|
||||||
|
use_default
|
||||||
)
|
)
|
||||||
|
|
||||||
# endregion Public Methods
|
# endregion Public Methods
|
||||||
|
|
Loading…
Reference in New Issue
Block a user