diff --git a/main.py b/main.py index 916dd66..8364505 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ import time intents = discord.Intents.all() +allowed_mentions = discord.AllowedMentions(everyone = True) # intents.members = True bot = commands.Bot(intents=intents) @@ -32,6 +33,7 @@ async def on_ready(): await send_log(f"hora de inicio: {time.ctime(time.time())}") mensaje_jueves.start() # horario_enviar.start() + mandar_ebau.start() @@ -151,6 +153,18 @@ async def mensaje_jueves(): except Exception as e: await send_log(f"rip. Error: ```{e}```") +@tasks.loop(hours = 1) +async def mandar_ebau(): + try: + if time.localtime().tm_hour != 6: return + channel = bot.get_channel(782191552247234632) + c2 = bot.get_channel(1153800096761262152) + # await c2.send(time.localtime().tm_hour + 1) + # await c2.send(time.localtime().tm_wday + 1) debug por si pasa algo + + await channel.send("@everyone buena suerte en la EVAU. https://www.youtube.com/watch?v=o-dv7xNxAEk", allowed_mentions = allowed_mentions) + except Exception as e: + await send_log(f"rip. Error: ```{e}```") @tasks.loop(hours = 1) async def horario_enviar(): @@ -218,7 +232,9 @@ async def rima(ctx, message): elif any(i in message.content for i in ("33", "treinta y tres")) and message.author != bot.user: await ctx.reply("https://tenor.com/view/fernando-alonso-live-fernando-reaction-alonso-fernando-live-reaction-gif-1814768510923235803", delete_after=5) - + + elif message.content.lower() == "!evau" and message.author.id == 518377522485002241: + await mandar_ebau() except Exception as e: await send_log(f"rip. Error: ```{e}```")