3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 17:45:03 +00:00

fix: fix crash in !rest_performance if there are no rest call stats

This commit is contained in:
Dragory 2021-11-02 23:42:21 +02:00
parent a5984cfd2a
commit 0da77a1a0e

View file

@ -22,6 +22,6 @@ export const RestPerformanceCmd = botControlCmd({
const cleanSource = callStats.source.replace(leadingPathRegex, "");
return `**${callStats.count} calls**\n${callStats.method.toUpperCase()} ${callStats.path}\n${cleanSource}`;
});
createChunkedMessage(msg.channel as TextChannel, formatted.join("\n"));
createChunkedMessage(msg.channel as TextChannel, `Top rest calls:\n\n${formatted.join("\n")}`);
},
});