updated start scripts
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
token
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
log
|
||||
1
dist/index.js
vendored
1
dist/index.js
vendored
@@ -34,6 +34,7 @@ const api_1 = require("./api");
|
||||
const discord_1 = require("./discord");
|
||||
const queue_1 = require("./queue");
|
||||
const CLIENT = new discord_js_1.Client({ intents: [discord_js_1.Intents.FLAGS.GUILDS] });
|
||||
console.log(new Date().toISOString() + '\n\n');
|
||||
if (!fs.existsSync('./token')) {
|
||||
fs.writeFileSync('./token', '');
|
||||
console.error('Missing Discord Token, please enter the bot token into the token file');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
#change to ccurrent directory
|
||||
cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"
|
||||
|
||||
@@ -32,7 +32,7 @@ do
|
||||
echo $num > log/number
|
||||
|
||||
#run
|
||||
npm start >> log/$num.out 2> log/$num.err
|
||||
npm start 2> log/$num.err | tee log/$num.out
|
||||
|
||||
#give chance to close program
|
||||
sleep 5
|
||||
|
||||
@@ -6,6 +6,8 @@ import { registerCommands } from './discord';
|
||||
import { createQueue, joinQueue, queueInfo } from './queue';
|
||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||
|
||||
console.log(new Date().toISOString()+'\n\n');
|
||||
|
||||
if (!fs.existsSync('./token')) {
|
||||
fs.writeFileSync('./token', '');
|
||||
console.error('Missing Discord Token, please enter the bot token into the token file');
|
||||
|
||||
Reference in New Issue
Block a user