Fix the command

This commit is contained in:
Robert Miles 2018-12-10 22:29:18 +00:00
parent 79255b645d
commit f837cdfe6d
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -78,7 +78,7 @@ class CosmicBot(teambot.Handler):
if count > 5:
count = 5 # don't spam the channel
self.say(channel, "{}: Latest {} {}. (See cosmic.voyage for more!)".format(nick, count, (count == 1 and "entry" or "entries")))
output = subprocess.check_output(["/usr/local/bin/latest",' '.join(count)]).decode("ascii").split("\n")
output = subprocess.check_output(["/usr/local/bin/latest",str(count)).decode("ascii").split("\n")
output = filter(None,output)
for line in output:
self.say(channel,"{}{})".format(nick,line))