无法使用balebot npm发送短信

时间:2018-05-13 09:56:40

标签: node.js websocket bots bale-messenger

我已经下载了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 }

1 个答案:

答案 0 :(得分:2)

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

相关问题