From 6dfa4e3bb32b26e5397bf7d1d0a34a83b7393e4d Mon Sep 17 00:00:00 2001 From: Stefano Assenzo Date: Wed, 25 Jan 2023 15:51:23 +0000 Subject: [PATCH] Fix little bug on Discord bot --- src/events/school_time/discord_bot.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/events/school_time/discord_bot.py b/src/events/school_time/discord_bot.py index 5f5f38b..e5524cf 100644 --- a/src/events/school_time/discord_bot.py +++ b/src/events/school_time/discord_bot.py @@ -35,12 +35,7 @@ async def orario(): if subject['Subject'] == "CALF1 LINGUA ITALIANA": print(f"Subject found: {subject['Subject']} at index: {i}") # Send a message on channel #general with the subject found and the index of the subject - channel = bot.get_channel(1063753802638954519).send("bot is online") - await ctx.send(f"Subject found: {subject['Subject']} at index: {i}") - + channel = bot.get_channel(1063753802638954519) + await channel.send(f"Hour school: {i}, Subject found: {subject['Subject']} at index: {i}") -@bot.command() -async def testpy(ctx): - bot.loop.create_task(orario(ctx)) - await ctx.send("testpy") bot.run(DISCORD_TOKEN) \ No newline at end of file