@@ -305,7 +305,7 @@ async def trigger_update(self, interaction : Interaction):
305
305
config , enabled = await self .db .getExtensionConfig (interaction .guild , Extensions .CHEAPGAMES )
306
306
assert enabled , f'The extension is not enabled'
307
307
308
- configuration = await self .handle_server_updates ((interaction .guild .id , Extensions .CHEAPGAMES .value , enabled , config ))
308
+ configuration = await self .handle_server_updates ((interaction .guild .id , Extensions .CHEAPGAMES .value , enabled , config ), True )
309
309
310
310
async with self .db :
311
311
await self .db .editExtensionConfig (interaction .guild , Extensions .CHEAPGAMES , configuration [3 ])
@@ -346,10 +346,10 @@ async def update_giveaways_and_deals(self):
346
346
print (e )
347
347
raise e
348
348
349
- async def handle_server_updates (self , configuration : tuple [int , str , bool , dict [str , dict [str , dict ]]]) -> dict :
349
+ async def handle_server_updates (self , configuration : tuple [int , str , bool , dict [str , dict [str , dict ]]], skip_time_check : bool = False ) -> dict :
350
350
_ , _ , _ , config = configuration
351
351
for update_name , update_config in config ['updates' ].items ():
352
- if time .localtime ().tm_hour != int (update_config ["on" ]): # IMPORTANT: I need to check if localtime is in UTC.
352
+ if time .localtime ().tm_hour != int (update_config ["on" ]) and not skip_time_check : # IMPORTANT: I need to check if localtime is in UTC.
353
353
continue
354
354
355
355
if Api (update_config ["api" ]) == Api .GIVEAWAYS :
0 commit comments