From 50daa5ab0356e1784374f545dd99bc7e4fea80d7 Mon Sep 17 00:00:00 2001 From: Jaiden Mispy Date: Sun, 21 Aug 2016 22:44:26 +1000 Subject: [PATCH] Add error message if you tweet from nonexistent bot --- bin/ebooks | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/ebooks b/bin/ebooks index 22df53e..9f2fc70 100755 --- a/bin/ebooks +++ b/bin/ebooks @@ -264,6 +264,10 @@ STR model = Ebooks::Model.load(modelpath) statement = model.make_statement bot = Ebooks::Bot.get(botname) + if bot.nil? + log "No such bot configured in bots.rb: #{botname}" + exit 1 + end bot.configure bot.tweet(statement) end