mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-09 19:31:27 +03:00
Error if Node is not v12 or higher, fix eslint error etc
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @name DiscordTickets
|
||||
* @author eartharoid <contact@eartharoid.me>
|
||||
* @license GNU-GPLv3
|
||||
*
|
||||
*
|
||||
* DiscordTickets Copyright (C) 2020 Isaac "eartharoid" Saunders
|
||||
* This program comes with ABSOLUTELY NO WARRANTY.
|
||||
* This is free software, and you are welcome to redistribute it
|
||||
@@ -11,12 +11,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const version = Number(process.version.split('.')[0].replace('v', ''));
|
||||
if (!version === 12 || !version > 12) return console.log('Please upgrade to Node v12 or higher');
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
let dev = fs.existsSync('user/dev.env') && fs.existsSync('user/dev.config.js');
|
||||
|
||||
require('dotenv').config({path: path.join('user/', dev ? 'dev.env' : '.env')});
|
||||
require('dotenv').config({ path: path.join('user/', dev ? 'dev.env' : '.env') });
|
||||
|
||||
module.exports.config = dev ? 'dev.config.js' : 'config.js';
|
||||
const config = require(path.join('../user/', module.exports.config));
|
||||
|
Reference in New Issue
Block a user