When can't be show in embed, directly send the json file

This commit is contained in:
Loïc Bersier 2019-05-11 18:32:07 +02:00
parent c46bca7538
commit c08c1bfe40

View file

@ -57,7 +57,9 @@ class taglistCommand extends Command {
.setDescription(`Trigger:Response\n\n${json}`)
.setFooter(`You have ${count} tags on this server`);
message.channel.send(tagEmbed);
message.channel.send(tagEmbed).catch(() => {
return message.channel.send('There is too much tag to be shown in an embed, sending file', {files: [`./tag/${message.guild.id}.json`]})
});
});
}