Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
e056cf7
1
Parent(s):
43224e9
Update info.py
Browse files- Powers/plugins/info.py +2 -2
Powers/plugins/info.py
CHANGED
|
@@ -43,9 +43,9 @@ def change(
|
|
| 43 |
async def user_info(c: Gojo, user, already=False):
|
| 44 |
if not already:
|
| 45 |
try:
|
| 46 |
-
user = await Users.get_user_info(int(
|
| 47 |
except KeyError:
|
| 48 |
-
LOGGER.warning(f"Calling api to fetch info about user {
|
| 49 |
user = await c.get_users(user_ids=user) # Fetch user info in traditional way if not available in db
|
| 50 |
if not user.first_name:
|
| 51 |
return ["Deleted account", None]
|
|
|
|
| 43 |
async def user_info(c: Gojo, user, already=False):
|
| 44 |
if not already:
|
| 45 |
try:
|
| 46 |
+
user = await Users.get_user_info(int(user)) # Try to fetch user info form database if available give key error if user is not present
|
| 47 |
except KeyError:
|
| 48 |
+
LOGGER.warning(f"Calling api to fetch info about user {user}")
|
| 49 |
user = await c.get_users(user_ids=user) # Fetch user info in traditional way if not available in db
|
| 50 |
if not user.first_name:
|
| 51 |
return ["Deleted account", None]
|