Skip to content

Commit

Permalink
not a ton
Browse files Browse the repository at this point in the history
  • Loading branch information
2vw committed Mar 7, 2024
1 parent 090a3b9 commit c2ebb14
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,24 @@ async def give_xp(user: voltage.User, xp:int):

# USE THIS IF YOU NEED TO ADD NEW KEYS TO THE DATABASE
async def do():
curs = userdb.find()
async for user in curs:
try:
ud = client.get_user(user['userid'])

await userdb.update_one(
{'userid':user['userid']},
{
'$set':{
"username": f"{ud.name}#{ud.discriminator}"
while True:
curs = userdb.find()
async for user in curs:
try:
ud = client.get_user(user['userid'])

await userdb.update_one(
{'userid':user['userid']},
{
'$set':{
"username": f"{ud.name}#{ud.discriminator}"
}
}
}
)
except:
pass
print(f"Updated {(await userdb.count_documents({}))} users!")
)
except:
pass
print(f"Updated {(await userdb.count_documents({}))} users!")
await asyncio.sleep(60*60)

async def get():
""" GET Stats """
Expand Down

0 comments on commit c2ebb14

Please sign in to comment.