Add fortune paths for Debian based systems

This commit is contained in:
moyamo 2015-11-23 16:06:50 +02:00
parent 03d4a98fc7
commit 1cec0a4e30
1 changed files with 3 additions and 0 deletions

3
bot.py
View File

@ -185,6 +185,9 @@ following user commands are available:
if os.path.exists("/usr/share/fortune/%s" % database):
fortune = os.popen('/usr/bin/fortune %s' % database).read()
self.send(prefix + fortune[:-1])
elif os.path.exists("/usr/share/games/fortunes/%s" % database):
fortune = os.popen('/usr/games/fortune %s' % database).read()
self.send(prefix + fortune[:-1])
else:
self.send("invalid database")