A bot that helps service the Crowbar Tools Discord server.
- Clone the repo
- Run
npm install
- Create a test server in Discord, if you don't already have one. This is where you'll eventually install your local bot to and can test commands in.
- Duplicate the example.env file and rename it to just ".env"
- Sign into the Discord Dev Portal
- Create a new Application, call it whatever you like (eg "TestCrowbarBot")
![Screenshot 2024-12-08 at 11 09 04 AM](https://private-user-images.githubusercontent.com/3515161/393630998-8dc2bc72-beec-4629-8378-330a12f03bb4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjIxODIsIm5iZiI6MTczODk2MTg4MiwicGF0aCI6Ii8zNTE1MTYxLzM5MzYzMDk5OC04ZGMyYmM3Mi1iZWVjLTQ2MjktODM3OC0zMzBhMTJmMDNiYjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjA1ODAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzAxYzRkYjQ2YzAwNjE3NDYzZTFmMGJkZjhiMDYzOTZjYmVlYTA3MjRmMDcwYWY5ZGYyZDAzYjFkNTQ0NTkxZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.GXx8OI3K-n_FcsmId33uGfXq_6vZv9MlcphDMzIl5bk)
- Add the app to your server
- In the settings area of the newly created app, go to the "Installation" tab.
- Uncheck "User Install" under Installation Contexts
- Under Default Install Settings, add the "bot" scope and add the "Administrator" permission
- Copy the Install Link and paste it in a browser
- This should open up Discord with a prompt to install your application in a server.
- Select your test server, click Continue, and then click Authorize (don't uncheck any permissions)
![Screenshot 2024-12-08 at 11 20 18 AM](https://private-user-images.githubusercontent.com/3515161/393631061-7e7e9921-d151-4915-8d3e-d9575e25c01e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjIxODIsIm5iZiI6MTczODk2MTg4MiwicGF0aCI6Ii8zNTE1MTYxLzM5MzYzMTA2MS03ZTdlOTkyMS1kMTUxLTQ5MTUtOGQzZS1kOTU3NWUyNWMwMWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjA1ODAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDU3NzI4NWZjMTdiNjY1ZDgyYmJiNGRhYjYwYjdiNDViMWVjNjI2NGJhYzZhNTI0NDQzNzAyOGQ0NDI1MDVjNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.gFfNd2_vKeDUKbjjsk0jS221hLMnAu42SkiRtd9W3Ck)
- Update discord .env vars
- Bot App Id
- In the settings area of the newly created app, go to the "General Information" tab
- Copy the Application ID and paste in your .env for
DISCORD_BOT_APP_ID
- Discord Token
- In the settings area of the newly created app, go to the "Bot" tab
- Under the "Token" section, click Reset Token and then copy the new value and paste in your .env for
DISCORD_TOKEN
- Discord Server (Guild) ID
- All other env vars can be left empty unless you need to test those specific features (eg github issue creation, sent to questions/issues commands, etc)
- Bot App Id
npm run dev
- You should now see the bot show as "online" in your test server and slash commands should now be available to run
![Screenshot 2024-12-08 at 11 56 09 AM](https://private-user-images.githubusercontent.com/3515161/393631151-d4b33c4f-8df4-4864-8d80-4839f46ae399.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjIxODIsIm5iZiI6MTczODk2MTg4MiwicGF0aCI6Ii8zNTE1MTYxLzM5MzYzMTE1MS1kNGIzM2M0Zi04ZGY0LTQ4NjQtOGQ4MC00ODM5ZjQ2YWUzOTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjA1ODAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Nzc2NjcxZjZjMjczZmM4ZGI3NDdhMDY1MjRhNzdkMjU1NjkyZDJlMDM2MDFhYmU3NTNmYWViNDRiOTBhMmMwZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.OqyNWYAaPTMGN9OvQ4w29VZCGFIDwpBVB2Q0qF0InzU)