1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-03 17:55:52 +03:00

Telegram.bot raises error when there is no default config

Этот коммит содержится в:
Max Melentiev
2017-05-11 13:57:29 +06:00
родитель cd3d3739a4
Коммит 0320507abe
2 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@@ -34,7 +34,11 @@ module Telegram
# Default bot.
def bot
@bot ||= bots[:default]
@bot ||= bots.fetch(:default) do
raise 'Default bot is not configured.' \
' Add :default to bots_config' \
' or use telegram.bot/telegram.bots.default section in secrets.yml.'
end
end
# Hash of botan clients made from #bots.