运行电报机器人

时间:2019-03-26 07:24:18

标签: python telegram-bot python-telegram-bot

我正在尝试运行电报机器人

import telebot
from telebot import apihelper

apihelper.proxy = {"http": "http://{}".format(proxy)}
bot = telebot.TeleBot(config.token)

@bot.message_handler(content_types=["text"])
def repeating_message(message):
    bot.send_message(message.chat.id, message.text)


if __name__ == "__main__":
    bot.polling(none_stop=True)

但它返回

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url

我该如何避免呢?我尝试使用GitHub上的所有情况,但这不起作用。

0 个答案:

没有答案
相关问题