From c08c1bfe409bb47f903ff5f0ae09ba39ddcf88dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 11 May 2019 18:32:07 +0200 Subject: [PATCH] When can't be show in embed, directly send the json file --- commands/utility/taglist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/utility/taglist.js b/commands/utility/taglist.js index 8e8fb5f5..b9cba987 100644 --- a/commands/utility/taglist.js +++ b/commands/utility/taglist.js @@ -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`]}) + }); }); }