node.js - 无法使用 balebot npm 发送短信
问题描述
我已经下载了 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 }
解决方案
这是关于使用机器人向客户端发送消息的限制。您应该使用一种方法延迟发送它们。了解更多:https ://developers.bale.ai/
推荐阅读
- assembly - 为什么gas无法识别arm64上的vqmovn?
- firebase - Firebase Cloud Function HTTP 请求授权
- cognos - 如何创建脚本以使用 html 从 cognos 报告工作室中的查询中绘制多个 lat/lng
- flutter - Flutter - 可以在 MyApp 中放置状态吗?
- javascript - 根据 javascript 函数的结果设置帖子的输入值
- spring - @Value 未设置在一个特定的类中
- matlab - 如何在 Matlab 中将 uifigure 设为当前的
- python - 什么是正则表达式,它将返回具有特殊字符的单个单词名称 | (管道)
- r - 从 R 中另一个字符向量中的字符向量中检测任何模式
- latex - How can I wrap lines from an input text file to my margins in latex?