The bot is used to provide players with a good experience
Run npm install
Run cp .env.dev .env
- Head over to Discord’s developer page and click on Create an application.
- Fill the
NAME
field and choose an avatar if you want, then click on Save changes. You should see a feedback message telling “All your edits have been carefully recorded.” - On the left panel, click on Bot, then click on ADD BOT.
- A popup should appear, click on Yes. Depending on the name of your app, you can see an error message telling you “Too many users have this username, please try another.” In that case, choose another name for your app.
- After that, you should see a success message telling you “A wild bot has appeared!”.
- Below TOKEN, click on COPY and paste it in
.env
file as a param toBOT_TOKEN
. Voilà! You are now the happy owner of a Discord bot token.
We need to add a bot to the server but to do that we need atleast one server. If you haven't yet created a server, please create one:
- After creating the server, go to the developer portal
- Select your bot
- Click on OAuth2 in the left panel, under scopes select
Bot
then under bot permissions selectAdministrator
then click on Copy. - Open a new tab and paste in the URL the one you’ve just copied. Select your server and click on Authorize.
- Add a bot to a server
- Go in the Discord app and check for your bot in the list of users.
Add your welcome message to the file utils/welcomeMsg.js
place the message between the quotes.
Add the role MetaGame Player
to your server.
Run npm run start
to start the bot