CorwinDev / Discord-Bot

Discord Bot with over 400 commands and made for large servers
MIT License
725 stars 631 forks source link

Chat bot not working? Here is the solution! #197

Closed nightmarefoxy397 closed 1 year ago

nightmarefoxy397 commented 1 year ago

It seems that OpenAI is having some problems with API keys as they are very limited.

CorwinDev offers an alternative which is their own AI (https://coreware.nl/) and here I will show you how to use it!

image

Go to /Discord-bot/src/events/message/messageCreate.js and remove from line 231 - 257

Also delete line 259, 284, 285. And that's it! You are now running the Chat Bot using CorwinDev AI.

Also delete lines 234 and 260 because we will no longer be using the .env to obtain the OpenAI key.

After making the above changes the code should look like this:

image

If you want you can go to Discord-Bot/.env and delete the OpenAI section because we will no longer be using it, however this is optional.

image

(Remove console.log(json); but in your case it is not necessary, I just did it for convenience)

CorwinDev commented 1 year ago

You just don't set the OPENAI .env variable and you don't have to do this stuff

nightmarefoxy397 commented 1 year ago

Updated the post. :D