python 电报机器人:为什么数字是 link 到 phone 数字?
python telegram bot: why are digits a link to phone number?
使用Python-Telegram-Bot发送text/markdown,所有数字组都呈现为links phone 数字 喜欢
点击 12345 它会跳转到 phone 呼叫键盘。如何避免这种行为,将 12345 呈现为普通文本 (而不是 link)?
我浏览了文档,但找不到任何关于这个特定问题的参考。
这是测试代码:
import telegram
from telegram.ext import Updater, CommandHandler
TOKEN="token_here"
def start_function(update, context):
update.message.reply_text("Test 12345", parse_mode=telegram.ParseMode.MARKDOWN)
bot = telegram.Bot(token=TOKEN)
updater = Updater(token=TOKEN, use_context=True)
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler("start", start_function))
updater.start_polling()
欢迎任何指向文档或示例的指针。提前谢谢你。
MarkDown
将数字包裹在 ``
(反引号)中;
Test: `12345`
HTML
将数字包裹在 <code></code>
块中;
Test: <code>12345</code>
MarkDown 示例(第一个 witout ``
,第二个请求;):
&text=Test: `12345`&parse_mode=MarkDown
使用Python-Telegram-Bot发送text/markdown,所有数字组都呈现为links phone 数字 喜欢
点击 12345 它会跳转到 phone 呼叫键盘。如何避免这种行为,将 12345 呈现为普通文本 (而不是 link)?
我浏览了文档,但找不到任何关于这个特定问题的参考。
这是测试代码:
import telegram
from telegram.ext import Updater, CommandHandler
TOKEN="token_here"
def start_function(update, context):
update.message.reply_text("Test 12345", parse_mode=telegram.ParseMode.MARKDOWN)
bot = telegram.Bot(token=TOKEN)
updater = Updater(token=TOKEN, use_context=True)
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler("start", start_function))
updater.start_polling()
欢迎任何指向文档或示例的指针。提前谢谢你。
MarkDown
将数字包裹在 ``
(反引号)中;
Test: `12345`
HTML
将数字包裹在 <code></code>
块中;
Test: <code>12345</code>
MarkDown 示例(第一个 witout
``
,第二个请求;):
&text=Test: `12345`&parse_mode=MarkDown