mirror of
https://github.com/house-of-vanity/conf_bot.git
synced 2025-07-06 14:24:08 +00:00
Improve simple responses.
This commit is contained in:
@ -153,8 +153,9 @@ class DataBase:
|
||||
result = self.execute(sql)
|
||||
return(result)
|
||||
|
||||
def get_random_word(self, count=1):
|
||||
sql = "SELECT word FROM word ORDER BY random() LIMIT %s" % count
|
||||
def get_random_word(self, count=1, like="%"):
|
||||
sql = "SELECT word FROM word WHERE word LIKE '%s' ORDER BY random() LIMIT %s" % (like, count)
|
||||
print(sql)
|
||||
result = self.execute(sql)
|
||||
return(result)
|
||||
|
||||
|
Reference in New Issue
Block a user