diff --git a/.env b/.env new file mode 100644 index 0000000..e0f013b --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +TOKEN= +WEBHOOK= +TOMORROWIO_TOKEN= \ No newline at end of file diff --git a/env_demo.env b/env_demo.env new file mode 100644 index 0000000..f852867 --- /dev/null +++ b/env_demo.env @@ -0,0 +1,3 @@ +TOKEN=YOUR_BOT_TOKEN_HERE +WEBHOOK=YOUR_WEBHOOK_HERE +TOMORROWIO_TOKEN=WEATHER_API_TOKEN \ No newline at end of file diff --git a/readme.md b/readme.md index 0ab487b..a271e80 100644 --- a/readme.md +++ b/readme.md @@ -14,7 +14,23 @@ $ cd ./Discord-Bot-Python - Permission Generator: [HERE](https://discordapi.com/permissions.html) - Invite Your Bot: -## Create config.json & .env + +## Create .env enviroment + +- NOTE: If you going to use .env environment you will need to make the necessary changes to the bots code inorder for it to work +- Create [.env](.env) file in the root director. +- Here is an explanation of what the values should look like: [env_demo](env_demo) + +[env_demo](env_demo) +```env +TOKEN=YOUR_BOT_TOKEN_HERE +WEBHOOK=YOUR_WEBHOOK_HERE +TOMORROWIO_TOKEN=WEATHER_API_TOKEN +``` + +https://dev.to/jakewitcher/using-env-files-for-environment-variables-in-python-applications-55a1 + +## Create config.json - Create [config.json](config.json) file in the root directory. - Here is an explanation of what the values should look like: [demo.config.json](demo.config.json) @@ -48,7 +64,7 @@ $ cd ./Discord-Bot-Python - RUN in Command-Promt [Windows key + r , input ``cmd`` and press enter] -```shell +```choc $ pip install -r requirements.txt ``` @@ -59,18 +75,15 @@ $ pip install -r requirements.txt ```shell $ python bot.py ``` - - If you have multiple versions of python installed (2.x and 3.x) then you will need to use the following command: ```shell $ python3 bot.py ``` - - or eventually ```shell $ python3.x bot.py ``` - - Replace `x` with the version of Python you have installed.