Fix little bug on Discord bot

This commit is contained in:
Stefano Assenzo 2023-01-25 15:51:23 +00:00 committed by GitHub
parent 061d0bee7e
commit 6dfa4e3bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -35,12 +35,7 @@ async def orario():
if subject['Subject'] == "CALF1 LINGUA ITALIANA": if subject['Subject'] == "CALF1 LINGUA ITALIANA":
print(f"Subject found: {subject['Subject']} at index: {i}") 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 # 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") channel = bot.get_channel(1063753802638954519)
await ctx.send(f"Subject found: {subject['Subject']} at index: {i}") 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) bot.run(DISCORD_TOKEN)