Skip to content

Commit

Permalink
Update herramientas-chatgpt.js
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoSobrino authored May 17, 2024
1 parent c603b97 commit 7d15717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/herramientas-chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const handler = async (m, {conn, text, usedPrefix, command}) => {
try {
conn.sendPresenceUpdate('composing', m.chat);
const syms1 = tradutor.texto3;
const Empireapi1 = await fetch(`https://api.cafirexos.com/api/chatgpt?text=${text}&name=${m.name}&prompt=${syms1}`);
const Empireapi1 = await fetch(`${global.MyApiRestBaseUrl}/api/chatgpt?text=${text}&name=${m.name}&prompt=${syms1}&apikey=${global.MyApiRestApikey}`);
const empireApijson1 = await Empireapi1.json();
if (empireApijson1.resultado == 'error' || empireApijson1.resultado == '' || !empireApijson1.resultado) return XD; // causar error undefined para lanzar msg de error
m.reply(`${empireApijson1.resultado}`.trim());
Expand Down

0 comments on commit 7d15717

Please sign in to comment.