import telebot from telebot import apihelper apihelper.proxy = {'https': 'socks5:/45.55.9.218:1080'} bot = telebot.TeleBot('TOKEN') @bot.message_handler(content_types=["text"]) def repeat_all_messages(message): bot.send_message(message.chat.id, message.text) if __name__ == '__main__': bot.polling(none_stop=True)
Traceback (most recent call last):
File “/home/seregka/.local/lib/python3.6/site-packages/socks.py”, line 832, in connect
super(socksocket, self).connect(proxy_addr)
socket.timeout: timed out
Failed to establish a new connection: Connection reset by peer',))