C0DE4ME / sdfsdfsdf

Chat with a character.ai bot via discord with this discord.js bot!

Home Page:https://discord.gg/8KxqWAKCPe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Character.ai discord bot

This bot allows you to communicate with your character.ai bots inside a discord chat, making use of node_characterai.

Features

  • 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!

Getting the required data

Before the installation we need to get some tokens and IDs for the bot to function.

Discord bot token.

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.

Character.ai chatID.

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://beta.character.ai/chat?char= chatID)

Character.ai access token.

This access token is how you use your account via the code. (You can also use a guest account, but this will include limitations)

  1. Open the Character.AI website in your browser.
  2. Open the developer tools. (F12, Ctrl+Shift+I, or Cmd+J)
  3. Go to the Application tab.
  4. Go to the Storage section and click on Local Storage
  5. Select https://beta.character.ai
  6. In the key list search for char_token and copy the code in the value field. (value: "code")

Help, I need a tutorial

If you need a setup tutorial, feel free to watch the installation on my youtube video (NOTE: This video has the outdated auth method)

Installation

Below are the steps explained to set up all required stuff for the bot to run.

1. Packages

First we install all packages by running the command below in the command line.

  npm i -y

2. botConfig.json

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"
}

Deployment

To deploy this project run:

  npm start

or

  node index

Screenshots

App Screenshot

Support

For support join the Ginger Productions discord server.

About

Chat with a character.ai bot via discord with this discord.js bot!

https://discord.gg/8KxqWAKCPe


Languages

Language:JavaScript 100.0%