Last active
November 29, 2018 07:27
-
-
Save Wolwer1nE/2bb0b967fa0aea39d043650d4416b7f9 to your computer and use it in GitHub Desktop.
Setup telegram-bot-ruby with proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/atipugin/telegram-bot-ruby | |
# Uninstall all other telegram bot gems before installing telegram-bot-ruby | |
# All of them use same namespace | |
require 'telegram/bot' | |
token = '' #your token here | |
Telegram::Bot::Client.run(token) do |bot| | |
# we don't have API to setup Faraday connection, so we will override it | |
bot.api.send(:conn).proxy = 'https://90.176.152.12:41586' #get some free proxy here https://www.sslproxies.org/ | |
#test connection | |
p bot.api.get_me | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment