execute query_database on start
This commit is contained in:
parent
a145c15b20
commit
2ec0eaf556
1 changed files with 4 additions and 2 deletions
|
@ -44,9 +44,11 @@ rec_path = "/recordings"
|
|||
# Bot functions
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
scheduler.start()
|
||||
|
||||
# Schedule a database update
|
||||
scheduler.add_job(func=query_database, trigger='interval', seconds=30, id='query_database')
|
||||
scheduler.start()
|
||||
scheduler.get_job('query_database').modify(next_run_time=datetime.now())
|
||||
logger_discord.info(scheduler.print_jobs())
|
||||
|
||||
@bot.command(name='hello', help='Say hello to the bot')
|
||||
|
|
Loading…
Add table
Reference in a new issue