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 121628e6b1
commit f3dae65747
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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")}`);
},
});