Add error message if you tweet from nonexistent bot

This commit is contained in:
Jaiden Mispy 2016-08-21 22:44:26 +10:00
parent aed6787706
commit 50daa5ab03

View file

@ -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