diff --git a/commands/message/fun/chat.js b/commands/message/fun/chat.js index 26e2504..516d5c2 100644 --- a/commands/message/fun/chat.js +++ b/commands/message/fun/chat.js @@ -22,12 +22,16 @@ module.exports = { context.triggerTyping(); if(!args.text) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (text).`)]}) try{ - let res = await superagent.get(`${process.env.AI_SERVER}/chat`) - .query({ - prompt: args.text - }) + let res = await superagent.post(`${process.env.AI_SERVER}/chatgpt`) + .set({ + Authorization: process.env.AI_SERVER_KEY + }) + .send({ + prompt: "You are a friendly chat bot designed to help people.", + input: [args.text] + }) return editOrReply(context, {embeds:[createEmbed("default", context, { - description: codeblock("ansi", ["šŸ‘¤ " + format(args.text, "cyan") + "\nšŸ¤– " + res.body.text]), + description: codeblock("ansi", ["šŸ‘¤ " + format(args.text, "cyan") + "\nšŸ¤– " + res.body.output]), footer: { text: `This information may be inaccurate or biased • ${context.application.name}` }