Skip to content

Commit

Permalink
Add Discord client ID to environment variables and remove it from config
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed Mar 29, 2024
1 parent 324482b commit 5e91cdc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ To get a local copy of the project up and running, follow these steps:
# Discord Bot
DISCORD_CLIENT_TOKEN=
DISCORD_CLIENT_SECRET=
DISCORD_CLIENT_ID=
# Database
MONGO_URL=
Expand Down Expand Up @@ -120,6 +121,7 @@ Before running the project, you need to set up the following environment variabl
| GITHUB_AUTO_DEPLOY_SECRET | Secret for GitHub auto-deployment webhook verification | No | RandomString |
| DISCORD_CLIENT_TOKEN | Token for Discord bot integration | Yes | DiscordToken |
| DISCORD_CLIENT_SECRET | Secret for Discord bot integration | Yes | DiscordSecret |
| DISCORD_CLIENT_ID | Client ID for Discord bot integration | Yes | DiscordClientID |
| MONGO_URL | URL for MongoDB database connection | Yes | mongodb://localhost:27017/mydatabase |
| S3_BUCKET_NAME | Name of the AWS S3 bucket for Cloudflare R2 | Yes | BucketName |
| S3_ACCESS_KEY_ID | AWS access key ID for Cloudflare R2 | Yes | AccessKeyID |
Expand Down
1 change: 1 addition & 0 deletions server/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GITHUB_AUTO_DEPLOY_SECRET=

DISCORD_CLIENT_TOKEN=
DISCORD_CLIENT_SECRET=
DISCORD_CLIENT_ID=

# Database

Expand Down
1 change: 0 additions & 1 deletion server/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
discordClientId: '1207874300070199356'
discordScopes:
- 'identify'
botPresenceStatus: 'online'
Expand Down
2 changes: 1 addition & 1 deletion server/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module.exports = class Server {

createDiscordAuth() {
const Strategy = new DiscordStrategy({
clientID: config.discordClientId,
clientID: process.env.DISCORD_CLIENT_ID,
clientSecret: process.env.DISCORD_CLIENT_SECRET,
callbackURL: '/auth/callback',
scope: config.discordScopes
Expand Down

0 comments on commit 5e91cdc

Please sign in to comment.