updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly

This commit is contained in:
Aster Fialla
2026-02-18 09:19:44 -05:00
parent 152bc8873d
commit 400e40a405
3 changed files with 17 additions and 8 deletions

View File

@@ -59,7 +59,9 @@ cmds.set('import', {
let errorsText = `${error.message}.\nThese errors occurred:\n${error.errors.join('\n')}`;
await message.reply(errorsText).catch(async () => {
await messageHelper.sendMessageAsAttachment(errorsText, message);
const returnedBuffer = await messageHelper.returnBufferFromText(errorsText);
await message.reply({content: returnedBuffer.text, files: [{ name: 'text.pdf', data: returnedBuffer.file }]
})
});
}
// If just one error was returned.