I don't really know what these are called, but I'm going to use Discord.py as an example. I want to create a class for handling and recieving actions on a website using a style similar to Discord.py.
client = discord.Client()
@client.event
async def on_messages(message):
I want to know how to create the @xxx.event
as well as the async functions. What is this called and how do I implement it?
An example of this would be a bot for a social media platform like this:
@client.event
async def on_post_comment(comment):
...
@client.event
async def on_comment_reply(comment, reply):
...
@clinet.event
async def on_post_liked(user):
...