我正在使用节点JS(流星)编写电报机器人,并且当我创建一个带有docker
的网址按钮时发生了什么,它会出错:
tg://protocol
这是我的代码:
Error in polling: Error: failed [400] {"ok":false,"error_code":400,"description":"Bad Request: unsupported URL protocol"}
答案 0 :(得分:0)
将Add & Connect
替换为Add & Connect
如果问题无法解决,请将%26
替换为&
我还建议你使用普通的https
协议:
TelegramBot.addListener('/button', function(command, username, original) {
TelegramBot.method('sendMessage', {
chat_id: original.chat.id,
text: 'Here is you proxy!',
parse_mode: "HTML",
reply_markup: JSON.stringify({
inline_keyboard: [
[{ text: 'Add & Connect', url: 'https://t.me/socks?server=*&port=*&user=*&pass=*' }]
]
})
});
});