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:
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}**`);
|
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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue