diff --git a/README.md b/README.md
index 13a4cc3..2b09935 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,8 @@ Download and install [Node.js](https://nodejs.org/en/)
Screen allows the bot to run in the background without a terminal present
-Installing
+Tutorial for usage, check if it's installed already before installing
+Installing
Mac
@@ -54,7 +55,8 @@ Download and install [Node.js](https://nodejs.org/en/)Tmux allows the bot to run in the background without a terminal present
-Installing
+Tutorial for usage, check if it's installed already before installing
+Installing
Mac
diff --git a/package.json b/package.json index 06d3052..92b4c82 100644 --- a/package.json +++ b/package.json @@ -1,43 +1,44 @@ { - "name": "1800queue", - "version": "1.0.0", - "description": "", - "main": "dist/index.js", - "scripts": { - "build": "tsc", - "start": "node .", - "watch": "npm-watch", - "dev": "npm-watch" - }, - "watch": { - "build": { - "patterns": [ - "src" - ], - "extensions": "ts", - "legacyWatch": true + "name": "1800queue", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "scripts": { + "build": "tsc", + "start": "node .", + "watch": "npm-watch", + "dev": "npm-watch", + "getname": "echo $npm_package_name" }, - "start": { - "patterns": [ - "dist" - ], - "extensions": "js", - "legacyWatch": true, - "runOnChangeOnly": true + "watch": { + "build": { + "patterns": [ + "src" + ], + "extensions": "ts", + "legacyWatch": true + }, + "start": { + "patterns": [ + "dist" + ], + "extensions": "js", + "legacyWatch": true, + "runOnChangeOnly": true + } + }, + "author": "", + "license": "MIT", + "devDependencies": { + "@types/node": "^17.0.13", + "npm-watch": "^0.11.0", + "ts-node": "^10.4.0", + "typescript": "^4.5.5" + }, + "dependencies": { + "@discordjs/rest": "^0.3.0", + "cheerio": "^1.0.0-rc.10", + "discord-api-types": "^0.26.1", + "discord.js": "^13.6.0" } - }, - "author": "", - "license": "MIT", - "devDependencies": { - "@types/node": "^17.0.13", - "npm-watch": "^0.11.0", - "ts-node": "^10.4.0", - "typescript": "^4.5.5" - }, - "dependencies": { - "@discordjs/rest": "^0.3.0", - "cheerio": "^1.0.0-rc.10", - "discord-api-types": "^0.26.1", - "discord.js": "^13.6.0" - } } diff --git a/scripts/mac-linux/start_screen b/scripts/mac-linux/start_screen new file mode 100755 index 0000000..38926a6 --- /dev/null +++ b/scripts/mac-linux/start_screen @@ -0,0 +1,12 @@ +#!/bin/bash + +#change to ccurrent directory +cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" + +#start +if [[ $(screen -ls | grep $(npm run getname -s)) ]]; then + echo "Session already exists" +else + screen -S $(npm run getname -s) -d -m ./start + echo "Created session" +fi \ No newline at end of file diff --git a/scripts/mac-linux/start_tmux b/scripts/mac-linux/start_tmux new file mode 100755 index 0000000..e9ad7ef --- /dev/null +++ b/scripts/mac-linux/start_tmux @@ -0,0 +1,12 @@ +#!/bin/bash + +#change to ccurrent directory +cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" + +#start +if [[ $(tmux ls | grep $(npm run getname -s)) ]]; then + echo "Session already exists" +else + tmux new-session -d -s $(npm run getname -s) ./start + echo "Created session" +fi \ No newline at end of file