3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Merge pull request #345 from almeidx/cases-user

fix: no response if user only has hidden cases in `!cases @user`
This commit is contained in:
Miikka 2022-08-14 00:22:42 +03:00 committed by GitHub
commit 128700929e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,12 @@ export const CasesUserCmd = modActionsCmd({
msg.channel.send(`No cases found for **${userName}**`); msg.channel.send(`No cases found for **${userName}**`);
} else { } else {
const casesToDisplay = args.hidden ? cases : normalCases; const casesToDisplay = args.hidden ? cases : normalCases;
if (!casesToDisplay.length) {
msg.channel.send(
`No normal cases found for **${userName}**. Use "-hidden" to show ${cases.length} hidden cases.`,
);
return;
}
if (args.expand) { if (args.expand) {
if (casesToDisplay.length > 8) { if (casesToDisplay.length > 8) {