Compare commits

..

1 Commits

Author SHA1 Message Date
1b4a0f67da added slur.py 2018-07-21 13:11:54 -04:00

View File

@ -30,10 +30,10 @@ def slur(bot, trigger):
[RACE] - specifies a particular race to pick on. [RACE] - specifies a particular race to pick on.
""" """
if trigger.group(2): if trigger.group(3):
slur = bot.db.execute( slur = bot.db.execute(
"SELECT * FROM `slur` WHERE `race` = ? COLLATE NOCASE " \ "SELECT * FROM `slur` WHERE `race` = ? COLLATE NOCASE " \
+ "ORDER BY RANDOM() LIMIT 1", (trigger.group(2),)).fetchone() + "ORDER BY RANDOM() LIMIT 1", (trigger.group(3),)).fetchone()
else: else:
slur = bot.db.execute( slur = bot.db.execute(
"SELECT * FROM `slur` ORDER BY RANDOM() LIMIT 1").fetchone() "SELECT * FROM `slur` ORDER BY RANDOM() LIMIT 1").fetchone()