- async def rem(ctx, message, hour, minutes, day, month, bot):
- # Separar los argumentos del mensaje
- print("Program")
- # Crear objeto datetime con la fecha y hora especificadas
- zona_horaria = pytz.timezone('Europe/Madrid')
- fecha_inicial = datetime.now(zona_horaria)
- fecha_inicial = fecha_inicial.strftime('%H:%M:%S')
- fecha_final = datetime(2023, 3, 24, 18, 40)
- fecha_final = fecha_final.strftime('%H:%M:%S')
- await ctx.response.send_message("Fecha de início: " + str(fecha_inicial) + "\n" + "Fecha del evento: " + str(fecha_final))
- # Calcular el tiempo restante hasta la fecha y hora especificadas
- time_left = fecha_final - fecha_inicial
- print(time_left)
- text = message
- # Iniciar temporizador para enviar el mensaje en la fecha y hora especificadas
- asyncio.get_event_loop().create_task(send_announcement(text, fecha_final, bot))
[text] 1
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- 1
- Paste Code
- 24 Mar-2023
- 912 Bytes
You can Share it:
Latest Code Pastes