Answers for "discord.py how to send a message every 10 minutes"

0

discord.py send message every x minute

import discord
from discord.ext import tasks

# Change this to whatever seconds you want it to be
# Or delete this line and change the x value into a number on the @tasks.loop param.
x = 5

@tasks.loop(minutes=x)
async def send():

    """Sends something every x minutes"""

    response = "blah blah blah"

    channel.send(response)

@send.before_loop
async def before():
    await bot.wait_until_ready()

send.start()
Posted by: Guest on November-06-2020

Code answers related to "discord.py how to send a message every 10 minutes"

Python Answers by Framework

Browse Popular Code Answers by Language