mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-17 01:55:27 +10:00
added handler to send string as an attachment if it's too long
This commit is contained in:
@@ -51,7 +51,10 @@ cmds.set('import', {
|
||||
if (error instanceof AggregateError) {
|
||||
// errors.message can be a list of successfully added members, or say that none were successful.
|
||||
let errorsText = `${error.message}.\nThese errors occurred:\n${error.errors.join('\n')}`;
|
||||
await message.reply(errorsText);
|
||||
|
||||
await message.reply(errorsText).catch(async () => {
|
||||
await messageHelper.sendMessageAsAttachment(errorsText, message);
|
||||
});
|
||||
}
|
||||
// If just one error was returned.
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user