module Telegruby
Public Instance Methods
read_config(filename)
click to toggle source
Reads an API token from a JSON file. The result of this should be passed to Telegruby::Bot.new
# File lib/telegruby.rb, line 303 def read_config(filename) begin data = JSON.parse(File.read(filename)) if !data.key? "token" return false end return data rescue return false end end