This discord repo provides everything you need to create your own EmoBot discord bot
EmoBot is a tech demo that shows how Actions can be used from the SocialAGI project to allow a soul to take action, with the specific action here taken being react with various emojis to messages.
Live demo at socialagi.dev
Under the hood, EmoBot uses the SocialAGI library to create its digital soul through just a few commands.
First export your OpenAI api key:
export OPENAI_API_KEY=sk_...
Second, create a new discord application at https://discord.com/developers/applications. Make sure to create a fun name, username, and profile image.
You'll need a few environment variables to run the bot
export DISCORD_TOKEN_EMOBOT=...
You can find your discord application's API token here:
Next, you'll need to decide which channel you're going to deploy the bot to in your server
export DISCORD_DEPLOYMENT_CHANNEL_EMOBOT=...
You can find the channelID
by visiting your target discord server/channel inside the web browser
Now, you'll need to add the discord bot to your server using the discord URL generator with the appropriate permissions
At the bottom of this page you'll get a URL
Copy this url and then add your new application's bot to your target server
Now that your discord bot is in your server, you'll need to install the bot's dependencies
npm install
and run the bot
node bot.js
Now, your bot should be in your server running and you should be able to talk to EmoBot.
This repo is intended to be deployed to heroku easily.
You'll need to do the following steps:
heroku login
Then create a heroku git repo
heroku create <desired-git-name>
Now, deploy the bot to heroku
git push heroku main
Now that the bot is deployed, you'll have to configure Heroku. First, go to settings and add the appropriate env
Lastly, adjust the resources to run the bot. Your resources should look like this:
Make sure to kill your local discord bot server.
That's it! Now you should be able to talk to EmoBot running from your Heroku instance
Now, your bot should be in your server running and you should be able to talk to EmoBot.