diff --git a/README.md b/README.md index 042a01e..ba635a9 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,19 @@ Download and install [Node.js](https://nodejs.org/en/) +Your Discord bot's token can be found in your [Discord dev portal](https://discord.com/developers/applications) + +1. Create or choose your application +2. Go to the `Bot` section + - click `Add Bot` if you haven't already +3. Copy your token + ## Automatic Installation/Updating 1. Download and extract this repository 2. Open the `scripts` folder 3. Open the folder that corresponds with your operating system 4. Run the `install` file -5. Create a file called `token` in the same directory as your `package.json` file and enter your bot client's token - - the `install` script will be updatedd soon to include this step ## Manual Installation/Updating diff --git a/scripts/mac-linux/install b/scripts/mac-linux/install index 2de2c4d..37996f3 100755 --- a/scripts/mac-linux/install +++ b/scripts/mac-linux/install @@ -5,4 +5,14 @@ cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" cd ../.. #run -npm install \ No newline at end of file +npm install + +#discord token +[ ! -f "token" ] && touch "token" + +if [ ! -s "token" ] +then + printf "Enter your discord bot token: " + read token + printf $token > "token" +fi \ No newline at end of file diff --git a/scripts/windows/install.bat b/scripts/windows/install.bat index 7591f4d..e86a144 100644 --- a/scripts/windows/install.bat +++ b/scripts/windows/install.bat @@ -4,4 +4,13 @@ cd %~f0\..\..\..\ @REM run -npm install \ No newline at end of file +npm install + +@REM discord token +if not exist "token" copy NUL "token" + +for /f %%i in ("token") do set size=%%~zi +if %size% equ 0 ( + set /p token="Enter your discord bot token: " + echo | set /p=%id% > "token" +)