@@ -206,12 +206,25 @@ async def upd():
206
206
await userdb .update_one ({'userid' : i ['userid' ]}, {'$unset' : {'economy.data.inventory.bank_loan' : 1 }})
207
207
if bank < 0 :
208
208
bank = 0
209
+ print ("Bank loan capped at 10m" )
209
210
await userdb .update_one ({'userid' : i ['userid' ]}, {'$set' : {'economy.data.inventory.Bank Loan' : bank }})
210
211
print (f"Added { bank } bank notes to { i ['username' ]} " )
211
212
except KeyError :
212
213
pass
213
214
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 )
215
228
216
229
217
230
async def update_level (user :voltage .User ):
@@ -549,7 +562,7 @@ async def ready():
549
562
print ("Back online! Starting up again!" )
550
563
551
564
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 () )
553
566
554
567
@client .command ()
555
568
@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