Migrated to .env
This commit is contained in:
parent
fec3bc23ad
commit
e3a2fbcc78
4 changed files with 5 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -130,6 +130,7 @@ dist
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
# Specific
|
# Specific
|
||||||
|
*.env
|
||||||
*.txt
|
*.txt
|
||||||
props/*
|
props/*
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@dotenvx/dotenvx": "^1.28.0",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"child_process": "^1.0.2",
|
"child_process": "^1.0.2",
|
||||||
"commander": "^12.1.0",
|
"commander": "^12.1.0",
|
||||||
|
|
|
@ -3,10 +3,11 @@ const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const Config = require('./props/config.json');
|
const Config = require('./props/config.json');
|
||||||
const { isOnSpamWatch } = require('./plugins/lib-spamwatch/spamwatch.js');
|
const { isOnSpamWatch } = require('./plugins/lib-spamwatch/spamwatch.js');
|
||||||
|
require('@dotenvx/dotenvx').config({ path: "config.env" });
|
||||||
require('./plugins/ytdlp-wrapper.js');
|
require('./plugins/ytdlp-wrapper.js');
|
||||||
// require('./plugins/termlogger.js');
|
// require('./plugins/termlogger.js');
|
||||||
|
|
||||||
const bot = new Telegraf(Config.botToken);
|
const bot = new Telegraf(process.env.botToken);
|
||||||
const MAX_RETRIES = 5;
|
const MAX_RETRIES = 5;
|
||||||
let restartCount = 0;
|
let restartCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(is
|
||||||
const scrobbler_url = 'http://ws.audioscrobbler.com/2.0/';
|
const scrobbler_url = 'http://ws.audioscrobbler.com/2.0/';
|
||||||
const api_key = Config.lastKey;
|
const api_key = Config.lastKey;
|
||||||
|
|
||||||
const dbFile = 'props/lastfm.json';
|
const dbFile = 'src/props/lastfm.json';
|
||||||
let users = {};
|
let users = {};
|
||||||
|
|
||||||
function loadUsers() {
|
function loadUsers() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue