Skip to content

Commit a5cda2c

Browse files
committed
i honestly couldnt tell u
1 parent 050f3cf commit a5cda2c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

main.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,25 @@ async def upd():
206206
await userdb.update_one({'userid': i['userid']}, {'$unset': {'economy.data.inventory.bank_loan': 1}})
207207
if bank < 0:
208208
bank = 0
209+
print("Bank loan capped at 10m")
209210
await userdb.update_one({'userid': i['userid']}, {'$set': {'economy.data.inventory.Bank Loan': bank}})
210211
print(f"Added {bank} bank notes to {i['username']}")
211212
except KeyError:
212213
pass
213214

214-
215+
216+
async def cheater_beater():
217+
while True:
218+
doc = await userdb.find({}).to_list(length=None)
219+
for i in doc:
220+
try:
221+
if i['economy']['bank'] > 200000000000 or i['economy']['wallet'] > 200000000000:
222+
await userdb.update_one({'userid': i['userid']}, {'$set': {'economy.bank': 1000000}})
223+
await userdb.update_one({'userid': i['userid']}, {'$set': {'economy.wallet': 0}})
224+
print(f"{i['username']} is a stinkin' cheater, and has been reset as a result!")
225+
except:
226+
pass
227+
await asyncio.sleep(60*60)
215228

216229

217230
async def update_level(user:voltage.User):
@@ -549,7 +562,7 @@ async def ready():
549562
print("Back online! Starting up again!")
550563

551564
print(f"Connected to {len(client.servers)} servers and {len(client.users)} users!")
552-
await asyncio.gather(update_stats(users=len(client.users), servers=len(client.servers)), update(), status(), do())
565+
await asyncio.gather(update_stats(users=len(client.users), servers=len(client.servers)), update(), status(), do(), upd(), cheater_beater())
553566

554567
@client.command()
555568
@limiter(5, on_ratelimited=lambda ctx, delay, *_1, **_2: ctx.send(f"You're on cooldown! Please wait `{round(delay, 2)}s`!"))

0 commit comments

Comments
 (0)