I'm working on a discord bot, and I need something to loop every 10 seconds. I've tried following some tutorials, but it doesn't seem to be working. Here's my code:
import discord
from discord.ext import tasks, commands
import asyncio
import passwords
client = commands.Bot(command_prefix = '.');
@tasks.loop(seconds=10)
async def name_of_function():
print("looped")
client.run(passwords.token)
The token and such are working fine, I just have them in another file. When I run this, nothing happens. It never prints looped, and I've been letting it run for up to 10 minutes. What am I doing wrong, and why won't this loop?