Add simple responses.

This commit is contained in:
Alexandr
2018-12-26 16:59:07 +03:00
parent a86b2c3b8e
commit d406ec14b4
2 changed files with 34 additions and 2 deletions

View File

@ -153,6 +153,11 @@ 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
result = self.execute(sql)
return(result)
def here(self, user_id, conf_id):
sql = """
SELECT DISTINCT(u.username) FROM relations r