added hour check to avoid hours with no restrictions
This commit is contained in:
		
							parent
							
								
									e2795c8edc
								
							
						
					
					
						commit
						541030785b
					
				@ -62,9 +62,10 @@ async def discord_task():
 | 
				
			|||||||
                event_maps = res[0].split(" ")
 | 
					                event_maps = res[0].split(" ")
 | 
				
			||||||
                event_date = res[1].strip()
 | 
					                event_date = res[1].strip()
 | 
				
			||||||
                today_formatted = f"{datetime.now():%d-%m-%Y}".replace("-", "/")
 | 
					                today_formatted = f"{datetime.now():%d-%m-%Y}".replace("-", "/")
 | 
				
			||||||
 | 
					                today_hour = int(f"{datetime.now():%H}")
 | 
				
			||||||
                #print("today_formatted: ", today_formatted)
 | 
					                #print("today_formatted: ", today_formatted)
 | 
				
			||||||
                #print("event_date: ", event_date)
 | 
					                #print("event_date: ", event_date)
 | 
				
			||||||
                if today_formatted == event_date:
 | 
					                if today_formatted == event_date and today_hour > 10:
 | 
				
			||||||
                    sql_statement = f"""
 | 
					                    sql_statement = f"""
 | 
				
			||||||
                        update unloze_event.event 
 | 
					                        update unloze_event.event 
 | 
				
			||||||
                        set set_map_cooldown = true 
 | 
					                        set set_map_cooldown = true 
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user