-
Notifications
You must be signed in to change notification settings - Fork 77
Getting Started
- Fork this repository and use the
git clone
command in your terminal to clone it to your machine -
cd
into the cloned repository and runnpm install
to install the dependencies - create a new
.env
file in the repository with the commandtouch .env
You will need to enter a few things in the .env
file. You can find an example file called .env.sample
of which you can copy the entire contents into your newly generated .env
file.
At a minimum you should replace the xxxxx
's for the below key and ID's and we'll explain how to retrieve those in the next sections.
DISCORD_API_KEY
DISCORD_CLIENT_ID
DISCORD_GUILD_ID
Leaving the other items as they are with their xxxxx
's will not cause issues.
If you already have Redis installed, you can skip this section.
- Go to https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/
- Follow the installation instructions for your OS to install Redis.
-
Click on
New Application
-
Give the bot a name and click
Create
. Try to make it unique since Discord may not allow a name if it has too many users with that same name.You'll now be taken to the bot's "General Information" page. When visiting the Developer Portal at a later time, you can reach the bot options through
Applications
and selecting your bot. -
In the bot's menu, select
Bot
-
Click on
Reset Token
and copy the output. You may need to enter your 2FA code at this point -
Paste the copied token after
DISCORD_API_KEY=
in your.env
file
- In the Discord Developer Portal with your bot selected, Navigate to menu item
OAuth2
- Copy the
Client ID
as shown - Paste the copied ID after
DISCORD_CLIENT_ID=
in your.env
file
- Open Discord
- Right-click your server to which you will later invite the bot
- Click
Copy Server ID
. Note that Developer mode has to be turned on for this in DiscordAdvanced
profile settings - Paste the copied ID after
DISCORD_GUILD_ID=
in your.env
file
- In the Discord Developer Portal with your bot selected, Navigate to menu item
Bot
- In the section
Privileged Gateway Intents
turn onServer Members Intent
andMessage Content Intent
and save these settings - Click on the
OAuth2
menu item and then onURL Generator
- In the
Scopes
section, selectbot
- In the
Bot Permissions
select at leastRead Messages/View Channels
Send Messages
Manage Messages
Embed Links
- Copy the generated URL for use in the next section
- Open the previously generated URL in your browser
- Select your personal server in the dropdown and click
Continue
for the bot to be added and to show up in your member list - In your terminal, navigate to the cloned repository and run
npm start
At this point your cloned version of Odin Bot should come online and its commands should work!