1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
royalnet/utils/telegramstuff.py

10 lines
446 B
Python
Raw Normal View History

2019-02-26 15:24:28 +00:00
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)