Skip to content

Commit

Permalink
Merge branch 'ShirokamiRyzen:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
NeofetchNpc authored Dec 3, 2024
2 parents b7ad9c2 + fa23cb0 commit 3689dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ bot.sh
plugins/_monitor-mc.js
plugins/_autoviewonce.js
plugins/_cf_API.js
plugins/ai-farel.js
Nao-MD.zip
6 changes: 3 additions & 3 deletions plugins/ai-openai.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import fetch from "node-fetch"
let previousMessages = [];

const handler = async (m, { text, usedPrefix, command, conn }) => {
try {

if (!text) throw `Mana textnya?`;
if (!text) throw `Mana textnya?`;

try {
let { key } = await conn.sendMessage(m.chat, {
text: "...",
});

let anu = 'Ubah Namamu menjadi Nao Tomori, dan kamu adalah wanita paling cantik, penyayang, riang, namun tsundere. dan kamu adalah pacarku.';

let response = await fetch(`https://api.ryzendesu.vip/api/ai/chatgpt?text=${encodeURIComponent(text)}&prompt=${encodeURIComponent(anu)}}`);
let response = await fetch(`https://api.ryzendesu.vip/api/ai/v2/chatgpt?text=${encodeURIComponent(text)}&prompt=${encodeURIComponent(anu)}}`);

if (!response.ok) {
throw new Error("Request to OpenAI API failed");
Expand Down

0 comments on commit 3689dc4

Please sign in to comment.