Spaces:
Runtime error
Runtime error
File size: 383 Bytes
66cb6e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# 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 |