Comando JSON

case 'gerarnick':
try {//By: 𖧄 𝐋𝐔𝐂𝐀𝐒 πŒπŽπƒ πƒπŽπŒπˆππ€ 𖧄
if (!q) return reply(`*Exemplo:* ${prefix}${command} Zero Two`)
const response = await fetch(`${zerosite}/api/fazernick?nome=${encodeURIComponent(q)}&apikey=${API_KEY_ZEROTWO}`)
if (!response.ok) throw new Error('Erro ao acessar a API.')
const nicks = await response.json()
if (!Array.isArray(nicks) || nicks.length === 0) {
return reply('πŸ˜” _Nenhum nickname gerado._')
}
let formattedNicks = '✨ *Nicknames Gerados:* ✨\n\n'
nicks.forEach((nick, index) => {
formattedNicks += `🌟 ${index + 1}. *${nick}*\n`
})
formattedNicks += '\nπŸ‘‰ _Escolha o seu favorito!_'
reply(formattedNicks)
} catch (e) {
console.log(e)
return reply("🚨 Erro ao gerar nicknames.")
}
break
> Loading... > Processing... > Completed... > Error... > Done...