Commit f06f3952 authored by zeroone2numeral2's avatar zeroone2numeral2
Browse files

Don't show webpage previews

parent 7ec449b1
......@@ -22,19 +22,19 @@ short_help_markup = InlineKeyboardMarkup([
def help_message(bot, update):
logger.info("/help or /start command")
update.message.reply_markdown(s.help_short,
reply_markup=extended_help_markup)
reply_markup=extended_help_markup, disable_web_page_preview=True)
@run_async
def on_extended_help_button(bot, update):
logger.info("extend help")
update.callback_query.message.edit_text(s.help_extended,
reply_markup=short_help_markup, parse_mode=ParseMode.MARKDOWN)
reply_markup=short_help_markup, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
@run_async
def on_short_help_button(bot, update):
logger.info("reduce help")
update.callback_query.message.edit_text(s.help_short,
reply_markup=extended_help_markup, parse_mode=ParseMode.MARKDOWN)
reply_markup=extended_help_markup, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
class module:
name = "help"
......
......@@ -51,7 +51,7 @@ def on_sed(bot, update, groups):
if len(new_string) > MAX_MESSAGE_LENGTH:
logger.info("result too long: substringing...")
new_string = new_string[:MAX_MESSAGE_LENGTH-16] # -16: "*Did you mean:*\n"
update.message.reply_to_message.reply_html(get_response(mode, new_string))
update.message.reply_to_message.reply_html(get_response(mode, new_string), disable_web_page_preview=True)
if mode.endswith("/"): # try to delete the command
try:
update.message.delete()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment