aboutsummaryrefslogtreecommitdiff
path: root/build/discord.js
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-06-29 17:52:00 -0500
committerGitHub <noreply@github.com>2021-06-29 17:52:00 -0500
commitc0c534dafb54ebf9f95a5054f576ad99de29f232 (patch)
tree8a8a81f5bd6fbb372899f769be402f0bec326149 /build/discord.js
parent6c7d2de36be559f62560f00fc2297c7deec3a051 (diff)
downloadskyblock-api-c0c534dafb54ebf9f95a5054f576ad99de29f232.tar.gz
skyblock-api-c0c534dafb54ebf9f95a5054f576ad99de29f232.tar.bz2
skyblock-api-c0c534dafb54ebf9f95a5054f576ad99de29f232.zip
enable strictNullChecks and fix all related issues (#65)
Diffstat (limited to 'build/discord.js')
-rw-r--r--build/discord.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/build/discord.js b/build/discord.js
index a92521a..ba9f3eb 100644
--- a/build/discord.js
+++ b/build/discord.js
@@ -13,6 +13,10 @@ const httpsAgent = new https_1.Agent({
async function exchangeCode(redirectUri, code) {
const API_ENDPOINT = 'https://discord.com/api/v6';
const CLIENT_SECRET = process.env.discord_client_secret;
+ if (!CLIENT_SECRET) {
+ console.error('discord_client_secret isn\'t in env, couldn\'t login with discord');
+ return null;
+ }
const data = {
'client_id': DISCORD_CLIENT_ID,
'client_secret': CLIENT_SECRET,