Skip to content

clxrityy/ai-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-discord-bot template

🔗 Invite


configuration

/*
    Your default AI settings
*/
    openai: {
        model: /** 
            https://platform.openai.com/docs/models
        */ ,
        systemRoleContent: /**
            https://platform.openai.com/docs/guides/text-generation/chat-completions-api
        */,
        temperature: /**
            https://platform.openai.com/docs/guides/text-generation/how-should-i-set-the-temperature-parameter
        */,
        presence_penalty: /** 
            https://platform.openai.com/docs/guides/text-generation/parameter-details
        */,
    }
# DISCORD
BOT_TOKEN=

# OPENAI
OPENAI_API_KEY=
OPENAI_ORGANIZATION_ID=

# MONOGDB
MONGO_URI=

commands


deployment

environment set up

sudo apt update
  • install node & npm
sudo apt install nodejs
sudo apt install npm
  • set to the latest node version
sudo n 21.6.2
  • check for the latest node version
node --version
  • if you're stealing an earlier version, run
hash -r

bot set up

  • make a directory for the bot
mkdir bot
cd bot
  • clone the repo into the bot folder
git clone https://github.com/clxrityy/ai-discord-bot.git .
  • input your environment variables
cat > .env >> # your variables

deploy

  • install pm2
sudo npm i pm2 -g
  • build and then deploy from /dist
npm run build
pm2 start ./dist/index.js --name bot-name

Releases

No releases published

Packages

No packages published