Webhooks lib
Example bot
Get Webhook Url
// user's webhook
let webhookUrl = Libs.Webhooks.getUrlFor({
// this command will be runned on webhook
command: "/onWebhook",
// this text will be passed to command
content: "Did you see the cat?",
// execute for this (current) user
user_id: user.id,
// redirect to page with cat after calling webhook
// you need remove this for external service
redirect_to: "https://cataas.com/cat"
})
Bot.inspect(webhookUrl);Receive webhook for user
Receive global webhook for bot
Call options
Key
Value
Webhook response
1. Content response with bot answer
2. Content response without bot answer
Code response
Possible issues
Last updated