- Create a new server in your discord.
- Now go to discord settings -> Advanced -> Toggle ON the Developer Mode.
- Go to Discord Developer Portal.
- Create a new Application -> Give it a name.
- Go to
Bot
under Settings, copy and noteBot Token
and then scroll down toggle ON theMESSAGE CONTENT INTENT
. - Now go to OAuth2 , copy and note
Client ID
, scroll down inOAuth2 URL GENERATOR
click onbot
, then give your bot permissionsAdministrator
.
Note: You can specify the following permissions if you do not want to give your bot Administrator permissions:Send Messages
Manage Messages
Send Messages in Threads
Read Message History
Mention Everyone
Use External Emojis
Add Reactions
Use Slash Commmands
- Copy the url generated and paste in a new browser window, add your bot to the server you want.
- And once this is done, your bot is created and now installed in your desired server.
- Fork this repo, git clone it in your directory in local machine.
- Copy the contents of
.env.example
file and create a new.env
file and paste in it. Fill the tokens obtained in point [5] and [6]. - As for AI_API_KEY, visit https://mdb.ai/ , and signup and copy/note your mindsdb api key.
- Now open terminal in that directory, and run these commands in order:
cd nrag-ai_discord-chatbot
npm i
node commands.js
npm start
- Now your server is up and running, you should able to interact with your discord bot.
- Nodejs for server creation, and runtime.
- Discord.js for configuring discord bot workings and server. Visit https://discord.js.org/docs/packages/discord.js/14.15.3 and https://discordjs.guide/popular-topics/intents.html#privileged-intents for more information.