This commit is contained in:
2025-01-18 00:33:24 +09:00
parent 793d571ad4
commit 634edf12d7

View File

@@ -92,12 +92,15 @@ class ControllerPlugin extends BaseControllerPlugin {
nrc_msg = `${dt} ${nrc_msg}`
}
if (nrc_msg.length <= 1950) {
await channel.send(nrc_msg, { allowedMentions: { parse: [] }});
} else {
while (nrc_msg.length > 0) {
let nrc_cmsg = nrc_msg.slice(0, 1950);
let nrc_lindex = nrc_cmsg.lastIndexOf(' ');
if (nrc_lindex !== -1) {
nrc_cmsg = nrc_cmsg.slice(0, nrc_lindex).trim();
nrc_cmsg = nrc_cmsg.slice(0, nrc_lindex);
nrc_msg = nrc_msg.slice(nrc_lindex).trim();
} else {
nrc_msg = nrc_msg.slice(1950).trim();
@@ -108,6 +111,7 @@ class ControllerPlugin extends BaseControllerPlugin {
}
}
}
}
module.exports = {
ControllerPlugin