Use bot webhook instead user webhook
In BJS:
let webhookUrl = Libs.Webhooks.getUrlFor({
// this command will be runned on webhook
command: "/onWebhook"
})
Then you can pass user_id in request (web page):
$.ajax({
type: "POST",
url: webhookUrl,
data: { user_id: YOUR_USER_ID },
success: success,
dataType: dataType
});
on webhook command (BJS) - run command for user
Bot.run({ command: '/your_user_command', user_id: content.user_id })
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…