Add fortune paths for Debian based systems
This commit is contained in:
parent
03d4a98fc7
commit
1cec0a4e30
3
bot.py
3
bot.py
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue