Button
The Button decorator is used to listen to button clicks.
You can send a button using the MessageBuilder
object. You can learn more about it here.
Button usage on whatsapp must be enabled. You can learn more about it here.
Buttons are not supported on Twitch.
Usage
import { Button, User, MessageBuilder } from "@michelo11/botjs";
export class ExampleButton {
@Button("example")
public exampleButton(user: User) {
user.send(new MessageBuilder("This is an example button."))
}
}