private reminders: wait until ready to register timer
This commit is contained in:
		
							parent
							
								
									a259ee8da2
								
							
						
					
					
						commit
						4c718e3a9a
					
				
					 1 changed files with 31 additions and 29 deletions
				
			
		| 
						 | 
					@ -68,7 +68,8 @@ function getLastRun(id) {
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
timer.add(
 | 
					hf.bot.once("ready", () => {
 | 
				
			||||||
 | 
					  timer.add(
 | 
				
			||||||
    "private_reminders",
 | 
					    "private_reminders",
 | 
				
			||||||
    async () => {
 | 
					    async () => {
 | 
				
			||||||
      for (const data of reminderData) {
 | 
					      for (const data of reminderData) {
 | 
				
			||||||
| 
						 | 
					@ -100,4 +101,5 @@ timer.add(
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    1000
 | 
					    1000
 | 
				
			||||||
);
 | 
					  );
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue