test
This commit is contained in:
16
main.py
16
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():
|
||||
@@ -219,6 +233,8 @@ 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}```")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user