// Note: DO NOT DIRECTLY COPY THIS EXAMPLE -
// it uses fake @ symbols due to jsdoc limitations.
// Reacts with 👍 on the third message received
class MessageApprover {
private messageCount: number = 0;
@listener("messageCreate")
onMessage(message: Message) {
this.messageCount++;
if (this.messageCount == 3) message.react("👍");
}
}
Generated using TypeDoc
A powerful Typescript decorator function, enabling simple, modular listeners to be built into classes.