How Discordia's event-driven interface works
masterDiscordia provides an object-oriented, event-driven interface. You interact with the Client object by attaching callbacks to specific events using the client:on(eventName, callback) pattern.
Common patterns include:
ready: Triggered when the bot has successfully logged in and is ready to interact with the API.messageCreate: Triggered when a new message is sent in a channel the bot can see. The callback receives amessageobject which provides access tomessage.contentandmessage.channel.