Skip to content

Hosting on Replit

Jerrie edited this page Sep 30, 2022 · 2 revisions

Intro

This is a guide on how to Deploy your Modmail bot to Replit.

It is assumed that you already know how to create and have a Discord bot account and all the required keys (TOKEN, CONNECTION_URI, etc).

Otherwise, please read the Modmail installation's wiki first.

1. Account

You need an account on Replit. If you still don't have one, click here to create a new account.

2. Fork and Sync

Fork my Modmail Repl (recommended) as it's already pre-configured with git local repository, virtual environment settings for pipenv, etc.

Open this link, and click the Fork button.

After forking it, optionally if you want to update or sync the files to latest version, run the following command in Shell:

git fetch --all

and

git pull origin master

3. Environment variables

Set the environment config variables in the Secret tab (TOKEN, CONNECTION_URI, LOG_URL, GUILD_ID, OWNERS, etc). If you do not know how to obtain those, please read the installation wiki first.

See picture of how to go to project Secrets, on mobile: secrets_mobile on desktop: secrets_desktop

Important: Add the DISABLE_AUTOUPDATES environment variable and set it to True in the Secrets. This is due to Modmail's autoupdate feature is not supported on Replit.

4. Install dependencies

Run the following command in the Shell command line to install dependencies:

python3.9 -m pipenv install

Do not use Console to run that command because by default Repl would try to run the project if it detects any changes in the files (I have no idea how to disable it). That would interrupt the installation process.

Wait until it's finished...

Now all dependencies are installed and you are done setting up your Modmail on Replit.

5. Run the bot

Run the bot (hit the Run button/symbol).

Logviewer

On Replit, you can just use a plugin for logviewer. Read the logviewer plugin wiki for more info on how to set it up.

Clone this wiki locally