Make send_async default parse_mode to MARKDOWN

This commit is contained in:
eviloutfromhell 2018-07-13 23:17:54 +07:00 committed by GitHub
parent f98561fc52
commit 0565968d98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,7 @@
import logging
import telegram
from telegram.ext.dispatcher import run_async
from internationalization import _, __
@ -87,6 +88,8 @@ def send_async(bot, *args, **kwargs):
"""Send a message asynchronously"""
if 'timeout' not in kwargs:
kwargs['timeout'] = TIMEOUT
if 'parse_mode' not in kwargs:
kwargs['parse_mode'] = telegram.ParseMode.MARKDOWN
try:
bot.sendMessage(*args, **kwargs)