Spaces:
No application file
No application file
| # PATH: bot/telegram/replies.py | |
| from hydrogram.types import Message | |
| async def safe_reply(m: Message, text: str, **kwargs): | |
| try: | |
| return await m.reply_text(text, **kwargs) | |
| except Exception: | |
| return None | |
| async def safe_edit(msg: Message, text: str, **kwargs): | |
| try: | |
| return await msg.edit_text(text, **kwargs) | |
| except Exception: | |
| return None |