I am making a bot that has an announcement at a different time on each weekday. I want to go about the process of making this by having 5 discord task loops that send the announcement on their respective days. They will activate on their respective Unix timestamps and then will reactivate on the the timestamp is refreshed for the next week. How do I make a an @client.event that activates on a Unix timestamp?
import discord
from discord.ext import commands, tasks
import random
import datetime
client = commands.Bot(command_prefix='.')
orig = datetime.datetime.fromtimestamp(1425917335)
new = orig + datetime.timedelta(days=90)
target_channel_id = 123456789
list_warning = ["T minus... 5 minutes... until detonation.", "Teacher is waiting. Get your ass back in 5 minutes.", "300 seconds unt-, 299 seconds unt-, 298 seconds unt-...",
"Chow down boys, lunch ends in 5 minutes.", "Looks like you've got some schoolin' to do."]
list_time = [1, 10]
#loops the 5 minute warning for lunch to end
@tasks.loop(seconds=)
async def called_once_a_day():
message_channel = client.get_channel(target_channel_id)
print(f"Got channel {message_channel}")
await message_channel.send(random.choice(list_warning))
org = orig + datetime.timedelta(days=7)
@called_once_a_day.before_loop
async def before():
await client.wait_until_ready()
print("Finished waiting")
called_once_a_day.start()
client.run("")