Allow starting a single bot by name
This commit is contained in:
parent
fa45316553
commit
8708aaa3e3
1 changed files with 3 additions and 3 deletions
|
|
@ -254,7 +254,7 @@ STR
|
||||||
if botname.nil?
|
if botname.nil?
|
||||||
bots = Ebooks::Bot.all
|
bots = Ebooks::Bot.all
|
||||||
else
|
else
|
||||||
bots = bots.select { |bot| bot.username == botname }
|
bots = Ebooks::Bot.all.select { |bot| bot.username == botname }
|
||||||
if bots.empty?
|
if bots.empty?
|
||||||
log "Couldn't find a defined bot for @#{botname}!"
|
log "Couldn't find a defined bot for @#{botname}!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -343,8 +343,8 @@ STR
|
||||||
when "auth" then auth
|
when "auth" then auth
|
||||||
when "console" then console
|
when "console" then console
|
||||||
when "c" then console
|
when "c" then console
|
||||||
when "start" then start
|
when "start" then start(args[1])
|
||||||
when "s" then start
|
when "s" then start(args[1])
|
||||||
when "help" then help(args[1])
|
when "help" then help(args[1])
|
||||||
else
|
else
|
||||||
log "No such command '#{args[0]}'"
|
log "No such command '#{args[0]}'"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue