diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-28 15:28:49 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-28 15:28:49 -0400 |
| commit | d052c0ea12e6a14337789fc73908f42cd0fdcf76 (patch) | |
| tree | 91c70f0ce435a746dd37427fc01b56b323715d04 | |
| parent | 0d216be080226b34c66d133f6191fd3cdca6eb8d (diff) | |
| download | AleeBot-APF-d052c0ea12e6a14337789fc73908f42cd0fdcf76.tar.gz AleeBot-APF-d052c0ea12e6a14337789fc73908f42cd0fdcf76.tar.bz2 AleeBot-APF-d052c0ea12e6a14337789fc73908f42cd0fdcf76.zip | |
Replaced abtoken.json with .env
| -rw-r--r-- | .gitignore | 3 | ||||
| -rwxr-xr-x | aleebot.js | 4 | ||||
| -rwxr-xr-x | bun.lockb | bin | 10318 -> 10659 bytes | |||
| -rw-r--r-- | package.json | 3 |
4 files changed, 7 insertions, 3 deletions
@@ -1,2 +1,3 @@ node_modules -abtoken.json
\ No newline at end of file +abtoken.json +.env
\ No newline at end of file @@ -11,7 +11,7 @@ * *************************************/ const { Client, GatewayIntentBits } = require('discord.js'); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] }); -const config = require('./abtoken.json'); +require('dotenv').config(); var prefix = "ab:"; @@ -181,7 +181,7 @@ client.on('messageCreate', message => { }); - client.login (config.token).catch(function() { + client.login (process.env.TOKEN).catch(function() { console.log("[ERROR] Login failed."); }); diff --git a/package.json b/package.json index 1b1c185..3b2a9d1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { "dependencies": { "discord.js": "^14.18.0" + }, + "devDependencies": { + "dotenv": "^16.4.7" } }
\ No newline at end of file |
