remove the task decoration
This commit is contained in:
parent
c77c91dbe1
commit
123f1a0c65
1 changed files with 1 additions and 2 deletions
|
@ -66,7 +66,7 @@ async def time(ctx):
|
||||||
@bot.command(name='start')
|
@bot.command(name='start')
|
||||||
async def start_task(ctx):
|
async def start_task(ctx):
|
||||||
# Schedule a task to run every 5 seconds
|
# Schedule a task to run every 5 seconds
|
||||||
scheduler.add_job(func=my_task, id='my_task_id')
|
await scheduler.add_job(func=my_task, id='my_task_id')
|
||||||
#scheduler.add_job(func=tick, id='tick_id', args=(ctx))
|
#scheduler.add_job(func=tick, id='tick_id', args=(ctx))
|
||||||
#channel = bot.get_channel(channel_id)
|
#channel = bot.get_channel(channel_id)
|
||||||
#if channel:
|
#if channel:
|
||||||
|
@ -78,7 +78,6 @@ async def show_task(ctx):
|
||||||
global counter
|
global counter
|
||||||
await ctx.channel.send(str(counter))
|
await ctx.channel.send(str(counter))
|
||||||
|
|
||||||
@tasks.loop(seconds=10)
|
|
||||||
async def my_task():
|
async def my_task():
|
||||||
global counter
|
global counter
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
Loading…
Reference in a new issue