From f3dae65747d424887621dabe3c8d98580c207fe3 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 2 Nov 2021 23:42:21 +0200 Subject: [PATCH] fix: fix crash in !rest_performance if there are no rest call stats --- backend/src/plugins/BotControl/commands/RestPerformanceCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/BotControl/commands/RestPerformanceCmd.ts b/backend/src/plugins/BotControl/commands/RestPerformanceCmd.ts index a1d8576d..84b1f40e 100644 --- a/backend/src/plugins/BotControl/commands/RestPerformanceCmd.ts +++ b/backend/src/plugins/BotControl/commands/RestPerformanceCmd.ts @@ -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")}`); }, });