Jarvis Discord Bot
What is Jarvis Discord Bot?
Using Jarvis Discord Bot you can interact with Jarvis through Discord app on various devices and share him with your friends. In the early versions of Jarvis, you could only interact with Jarvis through a simple web page. This limited your interaction with Jarvis to computers and browsers, and you had to be on the same local network.
How to setup
Creating a Discord App and Bot Account
- Register a Discord account if you don't have one yet.
- Login to the Discord website https://discord.com/.
- Go to the Discord Developer Portal https://discord.com/developers/applications/.
- Click the
New Applicationbutton in the top right corner. - Give your application a name, and select
Create. - From the left-hand menu, select the
Botoption, then configure your bot's name and icon. - Turn the
Public Botswitch toOn. - Turn the
PRESENCE INTENTswitch toOn. - Turn the
MESSAGE CONTENT INTENTswitch toOn. - Copy the
Tokenstring, you will need it later.
Adding the Bot to a Server
- From the left-hand menu, select
OAuth2. - Copy the
CLIENT IDstring, you will need it later. - Click on
URL Generator, UnderScopes, check thebotbox. - Configure the
Bot Permissionsas required, ensuring that at leastSend MessagesandUse Slash Commandsare checked. - Copy and paste the auto-generated URL into your web browser.
- Select the server you want to add the bot to.
- Verify yourself with
I am not a robot. - Click
Authorizeto complete the process of adding the bot to the server.
Running the bot
- cd to the root directory of the bot(which contains this README.md file).
- Before the first running, you need to configure some parameters:
- copy the
.env.templatefile to.env.local. - Copy and paste the previously obtained
TokenandCLIENT IDinto the.env.localfile. - run
npm install.
- copy the
- run
npm run start:bot.
Running the bot in docker
# build docker image
docker build -t jarvis-discord-bot .
docker run -d --name jarvis-discord-bot \
-e CLIENT_ID='Your Client ID' \
-e BOT_TOKEN='Your Bot Token' \
-e WEBSOCKET_PORT=10000 \
jarvis-discord-bot:latest