Cambio de hora

This commit is contained in:
binlab
2024-04-05 15:32:53 +00:00
parent a08bb8f87b
commit ab71076ce7

View File

@@ -29,7 +29,7 @@ async def on_ready():
channel = bot.get_channel(1153429735527948399) channel = bot.get_channel(1153429735527948399)
msg = await channel.fetch_message(1153429808429158460) msg = await channel.fetch_message(1153429808429158460)
print(f"características actuales: {msg.content}") print(f"características actuales: {msg.content}")
await send_log(f"hora de inicio: {time.ctime(time.time() + 3600)}") await send_log(f"hora de inicio: {time.ctime(time.time())}")
mensaje_jueves.start() mensaje_jueves.start()
horario_enviar.start() horario_enviar.start()
@@ -119,13 +119,13 @@ async def delete(ctx, attr: str, user: discord.Option(choices=[os.environ['N1'],
@tasks.loop(hours = 1) @tasks.loop(hours = 1)
async def mensaje_jueves(): async def mensaje_jueves():
try: try:
if time.localtime().tm_hour + 1 != 24: return if time.localtime().tm_hour != 24: return
channel = bot.get_channel(782191552247234632) channel = bot.get_channel(782191552247234632)
c2 = bot.get_channel(1153800096761262152) c2 = bot.get_channel(1153800096761262152)
# await c2.send(time.localtime().tm_hour + 1) # await c2.send(time.localtime().tm_hour + 1)
# await c2.send(time.localtime().tm_wday + 1) debug por si pasa algo # await c2.send(time.localtime().tm_wday + 1) debug por si pasa algo
if time.localtime().tm_wday + 1 == 3: if time.localtime().tm_wday == 3:
await channel.send("<@688355617681047574> FELIZ JUEVES!!!!") await channel.send("<@688355617681047574> FELIZ JUEVES!!!!")
await channel.send(random.choices(["https://media.tenor.com/riA830QHvC8AAAAC/feliz-jueves-asuka.gif","https://media.tenor.com/L2-mDROrwgwAAAAd/racism.gif"], k=1, weights=[9,1])[0]) await channel.send(random.choices(["https://media.tenor.com/riA830QHvC8AAAAC/feliz-jueves-asuka.gif","https://media.tenor.com/L2-mDROrwgwAAAAd/racism.gif"], k=1, weights=[9,1])[0])
except Exception as e: except Exception as e: