Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telethon.tl.functions import messages
- def no_forwards(self, *args, **kwargs):
- kwargs['noforwards'] = True
- self.original_init(*args, **kwargs)
- for req in ['SendMultiMediaRequest', 'SendMediaRequest', 'SendMessageRequest', 'ForwardMessagesRequest']:
- cls = getattr(messages, req)
- cls.original_init = cls.__init__
- cls.__init__ = no_forwards
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement