- Have git and node.js installed on your computer
- Fork this repo then clone a copy using
git clone https://github.com/carterclark/DiscordBot.git - Open a terminal and cd to the root directory of the project which containes the index.js file
- Run
npm installto download dependancies - Make a
.envfile in the root directory and enter the secrets for:BOT_AUTH_TOKEN, can be found in the discord develeper portal. After selecting the app go to Bot.CLIENT_ID, can be found in the discord develeper portal. After selecting the app go to OAuth2.SERVER_ID, can be found underwidgetin the server settings on discord
- If running the bot for the first time or changing bot commands, enter the termainal and cd to the root directory then run
yarn commands. - Run the command
yarn startfrom the root directory
- Open discord developer portal
- Create new application and bot
- under bot, check
PRESENCE INTENTandSERVER MEMBERS INTENT - Go to
OAuth2and underRedirectsenterhttps://localhost:8080/auth/discord/redirect - Go to
URL Generatorand checkbotandapplications.commands - Under
Bot Permissionsfor simplicity just checkAdministrator - Copy URL, paste it in a new tab, press enter
- Complete forms and add to server
- role_me in authorization: carter ICS 140, ICS-141, ICS342, ICS 460, ics-141, data211, ics-140, ics 365
- take_roles, info, and class_list in secret-secret
- git add .
- git commit -m"[COMMIT MESSAGE]"
- git push
- yarn start
- yarn commands
- ts-prune