lib/telegram/bot.rb in telegram-bot-0.10.2 vs lib/telegram/bot.rb in telegram-bot-0.11.0

- old
+ new

@@ -4,29 +4,10 @@ extend Bot::ConfigMethods module Bot class Error < StandardError; end class NotFound < Error; end - - # Error class for events when chat is not available anymore for bot. - # While Telegram has same error codes for different messages and there is no - # official docs for this error codes it uses `description` to - # check response. - class StaleChat < Error - DESCRIPTIONS = [ - 'Bot was blocked', - 'bot was kicked', - "can't write to", - 'group chat is deactivated', - ].freeze - - class << self - def match_response?(response) - description = response['description'].to_s - DESCRIPTIONS.any? { |x| description[x] } - end - end - end + class Forbidden < Error; end autoload :Async, 'telegram/bot/async' autoload :Botan, 'telegram/bot/botan' autoload :Client, 'telegram/bot/client' autoload :ClientStub, 'telegram/bot/client_stub'