From a3d5dd3ce05a83c054b1c820dca565c5b0064c71 Mon Sep 17 00:00:00 2001 From: Stephen <48072084+StephenDaDev@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:59:37 -0500 Subject: [PATCH 1/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 99852e3..5fd38cb 100644 --- a/README.md +++ b/README.md @@ -64,3 +64,5 @@ Support Modmail with your contributions! Whether it be improvements to the docum * Read about [installing Modmail](installation/). * Become familiar with [Modmail commands and functionalities](getting-started.md). + +{% hint style="info" %} In this guide when we refer to **bot commands**, we will assume the prefix to be ``?`` and will display them like in this example. ``?help``. Optional arguments will be in [brackets], for example ``?close [time] [reason] [silently].`` Required arguments will be put in , for example ``?permissions add ` {% endhint %} From 6bae760e0e35ec45cc89f9c579faceda8774088f Mon Sep 17 00:00:00 2001 From: Stephen <48072084+StephenDaDev@users.noreply.github.com> Date: Mon, 6 Feb 2023 18:51:26 -0500 Subject: [PATCH 2/5] fix poor formatting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fd38cb..07cc6e3 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ Support Modmail with your contributions! Whether it be improvements to the docum * Read about [installing Modmail](installation/). * Become familiar with [Modmail commands and functionalities](getting-started.md). -{% hint style="info" %} In this guide when we refer to **bot commands**, we will assume the prefix to be ``?`` and will display them like in this example. ``?help``. Optional arguments will be in [brackets], for example ``?close [time] [reason] [silently].`` Required arguments will be put in , for example ``?permissions add ` {% endhint %} +{% hint style="info" %} In this guide when we refer to bot commands, we will assume the prefix to be `?` and will display them like in this example. `?help`. Optional arguments will be in [brackets], for example `?close [time] [reason] [silently].` Required arguments will be put in , for example `?permissions add ` {% endhint %} From f12eddf0f747fc082be453e5209b3df0d0b875a3 Mon Sep 17 00:00:00 2001 From: Stephen <48072084+StephenDaDev@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:15:30 -0400 Subject: [PATCH 3/5] Add Windows Guide for Bot w/o update or Logviewer --- installation/local-hosting-vps/windows.md | 74 ++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/installation/local-hosting-vps/windows.md b/installation/local-hosting-vps/windows.md index 7f92b40..b9d2b03 100644 --- a/installation/local-hosting-vps/windows.md +++ b/installation/local-hosting-vps/windows.md @@ -4,8 +4,78 @@ description: Deploy Modmail on a Windows machine. # Windows -TODO - ## Prerequisites +* Somewhat recent hardware / software. +* Stable internet connection from hosting server. +* The hosting server remains online 24/7. +* You have completed the initial steps: [invited your bot](../#create-a-discord-bot) and [created a MongoDB database](../#create-a-mongodb-database). +* Windows 10 or 11 (any varient) + +## Filling Enviornment Variables +Once you have finished the prerequsite steps, gather your: +* Token +* Logviewer URL (or what you plan on using if you haven't set it up yet.) +* Primary Server ID +* Inbox Server ID (if applicable) +* Bot Owner's ID (usually just your ID) +* Completed MongoURI + +Once you have done so, open the file `.env.example` included in your download in your preferred raw text editor of choice (Usually Notepad or Notepad++, however others exist. *Do not use Word, WordPad, or similar*) + +Begin to fill in the information required: +``TOKEN=`` your bot’s token. +``LOG_URL=`` the URL of your log viewer Heroku app (ie. https://yourlogviewerappname.herokuapp.com). +``GUILD_ID=`` the ID of the server your bot operates in. +``OWNERS=`` your user ID (ie. OWNERS=9821302031291298, or if multiple owners, OWNERS=9821302031291298,9781239213813229,924822913921391). +``MONGO_URI=`` your Mongo connection URI from the MongoDB setup. +Together, they should resemble something similar to the original ``.env.example`` file. +Save the file as ``.env`` when done. + +It should look something like this: +{% code title=".env" %} +```py +TOKEN=yourbottokengoeshere +LOG_URL=https://example.logs.vodka/ +GUILD_ID=1079074933008781362 +OWNERS=188363246695219201,231595246213922828 +MONGO_URI=mongodb+srv://username:password@cluster0-abcde.mongodb.net/ +``` +{% endcode %} + +## Installing Python + +Download Python and set up Python from official Python download page: https://www.python.org/downloads/. The pre-installed Python on your local machine is usually out of date, you need the latest version of Python (3.09) for Modmail. + +> The version of Python required may change overtime. Use the version that is recommended in this guide, and then reach out to us in the Support Server if that gives you problems. We will attempt to keep these guides as up to date as possible, however, this is the one place where a potiental version mismatch could occur. + +When completing the installation, be sure to choose “Add to PATH” (or similar). + +## Open the Console + +Open Command Prompt, or "cmd". You can do this in one of two ways. + +1. Press the Windows Key, then type "cmd" and press enter. +2. Hold down the Windows Key + R, a Run Dialog will appear, type in "cmd" and press enter. + +## Navigate to where you stored Modmail + +Find the path of where you located your modmail in File Explorer, right click the folder name `modmail` or `modmail-master` and click "Copy Path". + +Then go back to your Command Prompt, and type ``cd `` then right click and press paste. This will paste in the path of the folder you just found in File Explorer. Press enter to change to that directory. + +## Install the requirements + +Run this command: +```py -3.9 -m pip install pipenv && py -3.9 -m pipenv install``` + +This will install the pipenv package, and then use it to install the most up-to-date list of dependencies from our dependency list. + +## Start your Modmail + +To start the Modmail bot itself, run this command: +```py -3.9 -m pipenv run python bot.py``` + +Your Modmail should now be working properly. If you are still having issues, let us know in our [support server](https://discord.gg/zmdYe3ZVHG). + ## Updating From ed3c560d925548f4897892e783c4093046f4846e Mon Sep 17 00:00:00 2001 From: Stephen <48072084+StephenDaDev@users.noreply.github.com> Date: Sun, 12 Mar 2023 13:22:45 -0400 Subject: [PATCH 4/5] updated req. seb --- installation/local-hosting-vps/windows.md | 31 ++++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/installation/local-hosting-vps/windows.md b/installation/local-hosting-vps/windows.md index b9d2b03..37a4321 100644 --- a/installation/local-hosting-vps/windows.md +++ b/installation/local-hosting-vps/windows.md @@ -14,22 +14,35 @@ description: Deploy Modmail on a Windows machine. ## Filling Enviornment Variables Once you have finished the prerequsite steps, gather your: -* Token +* BotToken * Logviewer URL (or what you plan on using if you haven't set it up yet.) -* Primary Server ID -* Inbox Server ID (if applicable) +* Primary Guild (Server) ID +* Inbox Guild (Server) ID (if applicable) * Bot Owner's ID (usually just your ID) * Completed MongoURI Once you have done so, open the file `.env.example` included in your download in your preferred raw text editor of choice (Usually Notepad or Notepad++, however others exist. *Do not use Word, WordPad, or similar*) + Begin to fill in the information required: ``TOKEN=`` your bot’s token. -``LOG_URL=`` the URL of your log viewer Heroku app (ie. https://yourlogviewerappname.herokuapp.com). + + +``LOG_URL=`` the URL of your log viewer. + + ``GUILD_ID=`` the ID of the server your bot operates in. + + ``OWNERS=`` your user ID (ie. OWNERS=9821302031291298, or if multiple owners, OWNERS=9821302031291298,9781239213813229,924822913921391). + + ``MONGO_URI=`` your Mongo connection URI from the MongoDB setup. + + Together, they should resemble something similar to the original ``.env.example`` file. + + Save the file as ``.env`` when done. It should look something like this: @@ -45,33 +58,33 @@ MONGO_URI=mongodb+srv://username:password@cluster0-abcde.mongodb.net/ ## Installing Python -Download Python and set up Python from official Python download page: https://www.python.org/downloads/. The pre-installed Python on your local machine is usually out of date, you need the latest version of Python (3.09) for Modmail. +Download Python and set up Python from official Python download page: https://www.python.org/downloads/. The pre-installed Python on your local machine is usually out of date, you need the version of Python 3.09 for Modmail. > The version of Python required may change overtime. Use the version that is recommended in this guide, and then reach out to us in the Support Server if that gives you problems. We will attempt to keep these guides as up to date as possible, however, this is the one place where a potiental version mismatch could occur. When completing the installation, be sure to choose “Add to PATH” (or similar). -## Open the Console +## Running Modmail Open Command Prompt, or "cmd". You can do this in one of two ways. 1. Press the Windows Key, then type "cmd" and press enter. 2. Hold down the Windows Key + R, a Run Dialog will appear, type in "cmd" and press enter. -## Navigate to where you stored Modmail +### Navigate to where you stored Modmail Find the path of where you located your modmail in File Explorer, right click the folder name `modmail` or `modmail-master` and click "Copy Path". Then go back to your Command Prompt, and type ``cd `` then right click and press paste. This will paste in the path of the folder you just found in File Explorer. Press enter to change to that directory. -## Install the requirements +### Install the requirements Run this command: ```py -3.9 -m pip install pipenv && py -3.9 -m pipenv install``` This will install the pipenv package, and then use it to install the most up-to-date list of dependencies from our dependency list. -## Start your Modmail +### Start your Modmail To start the Modmail bot itself, run this command: ```py -3.9 -m pipenv run python bot.py``` From 74e9a49fd48a84defce63eaf68156b9b3224453f Mon Sep 17 00:00:00 2001 From: Stephen <48072084+StephenDaDev@users.noreply.github.com> Date: Thu, 16 Mar 2023 11:25:13 -0400 Subject: [PATCH 5/5] Remove add to PATH per disc. --- installation/local-hosting-vps/windows.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/installation/local-hosting-vps/windows.md b/installation/local-hosting-vps/windows.md index 37a4321..98d4c5f 100644 --- a/installation/local-hosting-vps/windows.md +++ b/installation/local-hosting-vps/windows.md @@ -62,8 +62,6 @@ Download Python and set up Python from official Python download page: https://ww > The version of Python required may change overtime. Use the version that is recommended in this guide, and then reach out to us in the Support Server if that gives you problems. We will attempt to keep these guides as up to date as possible, however, this is the one place where a potiental version mismatch could occur. -When completing the installation, be sure to choose “Add to PATH” (or similar). - ## Running Modmail Open Command Prompt, or "cmd". You can do this in one of two ways.