generated from Baipyrus/DiscordJS-Template
'none found' fallback response
This commit is contained in:
parent
7f39be34ad
commit
370361f9d3
@ -207,6 +207,15 @@ async function infoResponse(interaction) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Abort if no responses registered
|
||||||
|
if (responses.length === 0) {
|
||||||
|
await interaction.reply({
|
||||||
|
content: 'No responses have been registered yet!',
|
||||||
|
ephemeral: true
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Join list of responses
|
// Join list of responses
|
||||||
const joined = responses.map((response) => response.response).join('\n- ');
|
const joined = responses.map((response) => response.response).join('\n- ');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user