fix: fix crash in !rest_performance if there are no rest call stats
This commit is contained in:
parent
121628e6b1
commit
f3dae65747
1 changed files with 1 additions and 1 deletions
|
@ -22,6 +22,6 @@ export const RestPerformanceCmd = botControlCmd({
|
||||||
const cleanSource = callStats.source.replace(leadingPathRegex, "");
|
const cleanSource = callStats.source.replace(leadingPathRegex, "");
|
||||||
return `**${callStats.count} calls**\n${callStats.method.toUpperCase()} ${callStats.path}\n${cleanSource}`;
|
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")}`);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue