This bot allows you to communicate with your character.ai bots inside a discord chat, making use of node_characterai. Check the Branches section found below for more bot functionality than the base version!
- Easily chatting with a custom character.ai bot.
- Easy setup!
- Support via discord server.
I will be adding some more fixes and changes in the near future!
Other versions of the bot featuring modified or new content / features!
- AI Image generation (AI image generation, AI chat restarting and Slash command handler)
- Slash command handler (AI chat restarting and Slash command handler
Before the installation we need to get some tokens and IDs for the bot to function.
Head over to the Discord developer portal and select an application or create one. Go to the Bot tab and select create bot. After doing this discord will show you the token to your bot.
⚠ This token gives access to your bot. DO NOT give it to others or post it online.
This ID will be used to connect to your character AI chat bot.
Go to the Character.AI website, create or open a bot chat and copy the id found at the end of the URL. (https://character.ai/chat?char= chatID)
This access token is how you use your account via the code. (You can also use a guest account, but this will include limitations)
- Go to https://character.ai/ in your browser.
- Open the developer tools. (F12, Ctrl+Shift+I, or Cmd+J)
- Go to the
Network
tab. - Set the type to
All
. (Positioned below the Filter bar) - Refresh the page and go to a AI character chat.
- Find and select a request with
Resurrect
as it name. - Copy the value behind token Authorization (
Token <copy this code>
)
If you need a setup tutorial, feel free to watch the installation on my youtube video (NOTE: This video has the outdated auth method)
Below are the steps explained to set up all required stuff for the bot to run.
First we install all packages by running the command below in the command line.
npm i -y
Below is everything that needs to be set in the botConfig.json
file. This uses the data we collected at "Getting the required data".
{
"token": "botToken",
"characterID": "character.ai ChatID",
"authToken": "character.ai char_token",
"chatID": "discordChannelID"
}
To deploy this project run:
npm start
or
node index
If you used this code before the new authentication method, please run npm i node_characterai
in your console after updating the code. This command while update the node_characterai module.
For support join the Ginger Productions discord server.