Ā© 2026 Hedgehog Software, LLC
if
else
!isNaN(parseInt(tags.slice(-1)[0]))
true
const tags = await args.repeat('string'); let amount; br.search("gb", tags, { limit: 3, random: true }) .then((posts) => { for (let post of posts) { var output = new MessageEmbed() .setImage(post.fileUrl) .setTimestamp() .setFooter(`prefix > ${args.commandContext.prefix}`, member.displayAvatarURL({ dynamic: true })) } if (!isNaN(parseInt(tags.slice(-1)[0]))) { amount = parseInt(tags.pop()); console.log(`amount check passed`) if (amount > 3) { return message.channel.send(`${emoji.SilverHydrate} You can't load too many images!`); } else { for (var i = 0; i < amount; i++) { return message.channel.send({ embeds: [output] }); } } } else { if (posts.length === 0) { return message.channel.send(`${emoji.SilverLoading} No images found!`) } else { amount = 1; return message.channel.send({ embeds: [output] }); } } } )