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:
commit
128700929e
1 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,12 @@ export const CasesUserCmd = modActionsCmd({
|
|||
msg.channel.send(`No cases found for **${userName}**`);
|
||||
} else {
|
||||
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 (casesToDisplay.length > 8) {
|
||||
|
|
Loading…
Add table
Reference in a new issue