Skip to content

OnDocument handler

Arius Bronte edited this page Feb 24, 2020 · 3 revisions

Basic usage

Triggers a document and responds with the word "document".

commands.OnDocument("document");

Triggers a document and and sends randomly from the array word.

commands.OnDocument("thank", "the best doc!");

Extended

You can set your own trigger processing logic.

commands.OnDocument(async (api, message, token) =>
{
    // your logic
});
Clone this wiki locally