telegram-rb icon indicating copy to clipboard operation
telegram-rb copied to clipboard

auth is NilClass

Open LainLayer opened this issue 7 years ago • 2 comments

telegram = Telegram::Client.new do |cfg, auth|
  cfg.daemon = '~/tg/bin/telegram-cli'
  cfg.key = '~/tg/tg-server.pub'
  cfg.logger = Logger.new(STDOUT)
  puts cfg.class, auth.class
  auth.phone_number = '+whatever'
  auth.confirmation_code = -> { gets.strip.to_i }
end

i get:

main.rb:9:in `block (2 levels) in <main>': undefined method `phone_number=' for nil:NilClass (NoMethodError)

LainLayer avatar Feb 10 '18 16:02 LainLayer

Same, what did i miss?

alexwiththescar avatar Feb 27 '18 12:02 alexwiththescar

Try using github master branch

brayancastrop avatar Oct 10 '19 06:10 brayancastrop