Skip to content

Commit

Permalink
Update Herramientas - Bard.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Alba070503 authored Dec 27, 2023
1 parent 7cf3a9e commit 41af3be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/Herramientas - Bard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ import fetch from 'node-fetch'

var handler = async (m, { text, usedPrefix, command }) => {

if (!text) return conn.reply(m.chat, `🎌 *Ingrese una petición*\n\nEjemplo, !bard Conoces A Bill Gates?`, m, fake, )
if (!text) throw `INGRESE UN TEXTO!`

try {

conn.sendPresenceUpdate('composing', m.chat)
await m.reply(wait)
var apii = await fetch(`https://aemt.me/bard?text=${text}`)
var res = await apii.json()
await m.reply(res.result)

} catch (error) {
console.error(error)
return conn.reply(m.chat, `*🚩 Ocurrió un fallo*`, m, fake, )
throw 'OCURRIÓ UN ERROR'
}

}
handler.command = ['bard']
handler.help = ['bard']
handler.tags = ['ai']
handler.tags = ['herramientas']

handler.premium = false

Expand Down

0 comments on commit 41af3be

Please sign in to comment.