mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-11-21 14:34:36 +00:00
Fix incorrect user being fetched
This commit is contained in:
parent
d355cd9d8f
commit
82f956f47a
1 changed files with 4 additions and 4 deletions
|
@ -61,21 +61,21 @@ class UserDatabase:
|
|||
self.db.commit()
|
||||
c.close()
|
||||
|
||||
def get_user(self, serverid, usreid):
|
||||
def get_user(self, serverid, userid):
|
||||
'''
|
||||
Retrieves the time zone name of a single user
|
||||
'''
|
||||
c = self.db.cursor()
|
||||
c.execute("""
|
||||
SELECT zone FROM userdata
|
||||
WHERE guild_id = %s
|
||||
""", (serverid,))
|
||||
WHERE guild_id = %s and user_id = %s
|
||||
""", (serverid, userid))
|
||||
result = c.fetchone()
|
||||
c.close()
|
||||
if result is None: return None
|
||||
return result[0]
|
||||
|
||||
|
||||
|
||||
def get_list(self, serverid, userid=None):
|
||||
'''
|
||||
Retrieves a list of recent time zones based on
|
||||
|
|
Loading…
Reference in a new issue