mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-09 22:33:09 +02:00
\x07 fun
This commit is contained in:
parent
1bc2e737e3
commit
e2fb11de4f
@ -21,9 +21,10 @@
|
|||||||
* @license GNU-GPLv3
|
* @license GNU-GPLv3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
process.title = 'Discord Tickets';
|
||||||
const node_version = Number(process.versions.node.split('.')[0]);
|
const node_version = Number(process.versions.node.split('.')[0]);
|
||||||
if (node_version < 14)
|
if (node_version < 14)
|
||||||
return console.log(`Error: Discord Tickets does not work on Node v${node_version}. Please upgrade to v14 or above.`);
|
return console.log(`\x07Error: Discord Tickets does not work on Node v${node_version}. Please upgrade to v14 or above.`);
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const { path } = require('./utils/fs');
|
const { path } = require('./utils/fs');
|
||||||
@ -31,7 +32,7 @@ const { path } = require('./utils/fs');
|
|||||||
const checkFile = (file, example) => {
|
const checkFile = (file, example) => {
|
||||||
if (fs.existsSync(path(file))) return true;
|
if (fs.existsSync(path(file))) return true;
|
||||||
if (!fs.existsSync(path(example))) {
|
if (!fs.existsSync(path(example))) {
|
||||||
console.log(`Error: "${file}" not found, and unable to create it due to "${example}" being missing.`);
|
console.log(`\x07Error: "${file}" not found, and unable to create it due to "${example}" being missing.`);
|
||||||
return process.exit();
|
return process.exit();
|
||||||
}
|
}
|
||||||
console.log(`Copying "${example}" to "${file}"...`);
|
console.log(`Copying "${example}" to "${file}"...`);
|
||||||
@ -60,7 +61,7 @@ if (!checkFile('./.env', './example.env')) {
|
|||||||
fs.writeFileSync(file, data);
|
fs.writeFileSync(file, data);
|
||||||
|
|
||||||
console.log('Saved.');
|
console.log('Saved.');
|
||||||
console.log('Please set your bot\'s "DISCORD_TOKEN" in "./.env".');
|
console.log('\x07Please set your bot\'s "DISCORD_TOKEN" in "./.env".');
|
||||||
|
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user