【问题标题】:can not send text message with balebot npm无法使用 balebot npm 发送短信
【发布时间】:2018-10-23 04:50:24
【问题描述】:

我已经下载了 balebot npm 并使用此代码向使用它的客户发送 200 条短信(或者可以用于一组客户)。 有什么想法吗?

const SDK = require("balebot");
const BaleBot = SDK.BaleBot;
const FileMessage = SDK.FileMessage;
const TextMessage = SDK.TextMessage;

let bot = new BaleBot('My token');

var file = new TextMessage("its a text message")

for (var i = 0; i < 200; i++) {
    bot.send(file, new SDK.User(201707397, "-9120776543768627721")).then((res) => {
        console.log(res)
    }).catch((err) => {
        console.log(err)
    });
}

但我对这个错误感到困惑。

BotErrorResponse {
  _id: '1001',
  _body: { code: 403, tag: 'HIT_LIMIT', data: {}, retryIn: null },
  code: 403,
  tag: 'HIT_LIMIT',
  data: {},
  retryIn: null }

【问题讨论】:

    标签: node.js websocket bots bale-messenger


    【解决方案1】:

    这是关于使用机器人向客户端发送消息的限制。您应该使用一种方法延迟发送它们。 了解更多:https://developers.bale.ai/

    【讨论】:

    • Bale应用的精彩介绍!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-02
    • 1970-01-01
    • 2022-06-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多