mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-04-28 17:15:57 +00:00
Migrated to .env
This commit is contained in:
parent
fec3bc23ad
commit
e3a2fbcc78
1
.gitignore
vendored
1
.gitignore
vendored
@ -130,6 +130,7 @@ dist
|
||||
.pnp.*
|
||||
|
||||
# Specific
|
||||
*.env
|
||||
*.txt
|
||||
props/*
|
||||
package-lock.json
|
||||
|
@ -4,6 +4,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dotenvx/dotenvx": "^1.28.0",
|
||||
"axios": "^1.7.9",
|
||||
"child_process": "^1.0.2",
|
||||
"commander": "^12.1.0",
|
||||
|
@ -3,10 +3,11 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const Config = require('./props/config.json');
|
||||
const { isOnSpamWatch } = require('./plugins/lib-spamwatch/spamwatch.js');
|
||||
require('@dotenvx/dotenvx').config({ path: "config.env" });
|
||||
require('./plugins/ytdlp-wrapper.js');
|
||||
// require('./plugins/termlogger.js');
|
||||
|
||||
const bot = new Telegraf(Config.botToken);
|
||||
const bot = new Telegraf(process.env.botToken);
|
||||
const MAX_RETRIES = 5;
|
||||
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 api_key = Config.lastKey;
|
||||
|
||||
const dbFile = 'props/lastfm.json';
|
||||
const dbFile = 'src/props/lastfm.json';
|
||||
let users = {};
|
||||
|
||||
function loadUsers() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user