diff --git a/commands/femboy.js b/commands/femboy.js index 9f39386..c10ebc8 100644 --- a/commands/femboy.js +++ b/commands/femboy.js @@ -30,7 +30,7 @@ export async function execute(interaction, defer=false) { .then(response => { let i = Math.floor(Math.random() * response.length) let ip = Math.floor(Math.random() * response[i].attachments.length) - if (response.length === 0 || response[i].attachments.length === 0) { + if (!response.attachments || response.length === 0 || response[i].attachments.length === 0) { return null } return "https://coomer.su" + response[i].attachments[ip].path diff --git a/commands/porn.js b/commands/porn.js index 497f200..8156f52 100644 --- a/commands/porn.js +++ b/commands/porn.js @@ -46,7 +46,7 @@ export async function execute(interaction, defer=false) { .then(response => { let i = Math.floor(Math.random() * response.length) let ip = Math.floor(Math.random() * response[i].attachments.length) - if (response.length === 0 || response[i].attachments.length === 0) { + if (!response.attachments || response.length === 0 || response[i].attachments.length === 0) { return null } return "https://coomer.su" + response[i].attachments[ip].path