Discord bot update message. (Discord.py)

Windows 10 VSCode Discord.py Python 3

Hey guys, I want my bot to send a message to a specific channel every time it logs on, here is the code:

@client.event
async def on_ready():
    channel = client.get_channel(788532498724290641)
    await channel.send('I have been updated and am now online again.')

There are no errors however no message gets sent when the program is run.

The whole program can be found here but beware it’s uncommented and janky: https://github.com/DavisStanko/Discord-Bot

Answer

It’s because you have multiple on_ready events. You can only have 1 type of each event, otherwise the last interpreted event will be the only one recognized. Merge the two on_ready events into 1 function.