This commit is contained in:
binlab
2024-06-03 19:02:52 +00:00
parent 8d46673092
commit bc3f890825

18
main.py
View File

@@ -7,6 +7,7 @@ import time
intents = discord.Intents.all() intents = discord.Intents.all()
allowed_mentions = discord.AllowedMentions(everyone = True)
# intents.members = True # intents.members = True
bot = commands.Bot(intents=intents) bot = commands.Bot(intents=intents)
@@ -32,6 +33,7 @@ async def on_ready():
await send_log(f"hora de inicio: {time.ctime(time.time())}") await send_log(f"hora de inicio: {time.ctime(time.time())}")
mensaje_jueves.start() mensaje_jueves.start()
# horario_enviar.start() # horario_enviar.start()
mandar_ebau.start()
@@ -151,6 +153,18 @@ async def mensaje_jueves():
except Exception as e: except Exception as e:
await send_log(f"rip. Error: ```{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) @tasks.loop(hours = 1)
async def horario_enviar(): 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: 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) 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: except Exception as e:
await send_log(f"rip. Error: ```{e}```") await send_log(f"rip. Error: ```{e}```")