fix 1
This commit is contained in:
parent
ca719a52e5
commit
006b2f2d77
|
@ -36,7 +36,7 @@ module.exports = function createWSMessageCollector(output) { // output func must
|
|||
if (message instanceof ArrayBuffer) message = Buffer.from(message).toString('base64');
|
||||
var line = `${Date.now()} ${message}\n`;
|
||||
size += line.length;
|
||||
fs.appendFile(filepath, line, ()=>{});
|
||||
fs.appendFileSync(filepath, line);
|
||||
if (size > 8000000) {save(); size = 0;}
|
||||
};
|
||||
}
|
|
@ -9,7 +9,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
|
|||
let msgBuffer = [];
|
||||
function _dSend(options) {
|
||||
|
||||
if (options.content.length > 2000) {
|
||||
if (options.content?.length > 2000) {
|
||||
options.attachments ||= [];
|
||||
options.attachments.push(new Discord.MessageAttachment(Buffer.from(options.content), "message.txt"));
|
||||
delete options.content;
|
||||
|
|
Loading…
Reference in New Issue