1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-04 08:44:21 +00:00
royalnet/utils/telegramstuff.py

9 lines
446 B
Python

import telegram
import strings
def reply_msg(bot: telegram.Bot, chat_id: int, string: str, ignore_escaping=False, disable_web_page_preview=True, **kwargs) -> telegram.Message:
string = strings.safely_format_string(string, ignore_escaping=ignore_escaping, words=kwargs)
return bot.send_message(chat_id, string,
parse_mode="HTML",
disable_web_page_preview=disable_web_page_preview)