This is an SDK for building OpenChat canister bots in Motoko with some example bots.
mops install openchat-bot-sdk
To setup MOPS package manage, follow the instructions from the MOPS Site
https://github.com/open-chat-labs/open-chat-bots/tree/main/motoko/examples
First read the get started guide.
There is a very basic bot example hello_bot exposing a single /hello command which replies with "hello ".
There is another example ping_bot expsosing several commands and webhook endpoints to illustrate various bot capabilities.
Use the deploy script to install or upgrade an example bot.
./deploy.sh hello_bot
./deploy.sh ping_bot
Special thanks to @gekctek, who built an interim Mokoto SDK before this one was ready. We have used large chunks of his SDK, especially the JSON serializing/deserializing, in this SDK.
You can find his repo here: https://github.com/edjcase/motoko_oc_bot_sdk