View: Handle empty or invalid card IDs. Fixes #24
This commit is contained in:
@@ -54,7 +54,10 @@ module.exports = {
|
||||
{ model: User}
|
||||
]
|
||||
});
|
||||
|
||||
if (card === null) {
|
||||
interaction.editReply({ content: "Card not found" });
|
||||
return;
|
||||
}
|
||||
let cardImage = await Rendering.renderCard(card);
|
||||
//get base filename
|
||||
let filename = cardImage.split("/").pop();
|
||||
|
||||
Reference in New Issue
Block a user