Answers for "how to make your discord bot send a message after 20 minutes python"

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 "how to make your discord bot send a message after 20 minutes python"

Python Answers by Framework

Browse Popular Code Answers by Language