I'm making a bot for discord. It's basically the same problem as this one: How can I run an async function using the schedule library?
except nothing worked in the link above. In my case I'm getting "myfunction was never awaited"
async def birthday():
channel = client.get_channel(xxxxxx)
fileName = open("birthdayFile.txt", "r")
today = time.strftime('%m%d')
for line in fileName:
if today in line:
line = line.split(' ')
line[-1] = line[-1].strip()
if line[-1] != line[1]:
bdayperson = line[1]+' '+line[2]
else:
bdayperson = line[1]
await channel.send(f"Happy Birthday to "+ bdayperson + "! " )
schedule.every().day.at("18:36").do(client.loop.call_soon_threadsafe, birthday)