You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function messagePadder(str, length) {
var padding = (new Array(Math.max(length - str.length + 1, 0))).join(" TESTE ");
return str + padding;
};
function messageSplitter(message) {
var chunks = message.match(/[^]{1,4096}/g);
// This is kinda' crazy too. Basically, Telegram delivers smaller length
// messages first, thus it helps to keep them the same length
for (var i = 0; i < chunks.length; i++) {
if (chunks[i].length < 4096) {
var pad_needed = 4096 - chunks[i].length;
var padding = messagePadder(chunks[i], pad_needed);
chunks[i] += padding;
}
}
return chunks;
};
unsing:
var parts = messageSplitter(message);
parts.forEach((messagePart) =>
send(messagePart)
}
Telegram Api has a limit of 4096 to messages and is not sending big messages
The text was updated successfully, but these errors were encountered: