From 42940d62dcd6b973645ed964206ae3099b436871 Mon Sep 17 00:00:00 2001 From: binlab Date: Fri, 10 Nov 2023 20:01:37 +0000 Subject: [PATCH] mensaje_jueves prueba 1 --- main.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 2b9a091..3601b33 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,9 @@ import discord from discord.ext import commands +from discord.ext import tasks import os import random import time -import datetime intents = discord.Intents.all() # intents.members = True @@ -105,14 +105,10 @@ async def delete(ctx, attr: str, user: discord.Option(choices=[os.environ['N1'], -@bot.event +@tasks.loop(seconds = 5.0) async def mensaje_jueves(): - while True: - current_date = datetime.datetime.now() - if current_date.weekday() == 4: - if current_date.hour == 19 and current_date.minute == 50 and current_date.second == 00: - channel = bot.get_channel(1051497546708697120) - await channel.send("prueba") + channel = bot.get_channel(1051497546708697120) + await channel.send("prueba")