Answers for "discord.py code to send a message to a hannel every 2 hour"

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 code to send a message to a hannel every 2 hour"

Python Answers by Framework

Browse Popular Code Answers by Language