Skip to content

Instantly share code, notes, and snippets.

@anondev-sudo
Last active December 17, 2023 09:33
Show Gist options
  • Save anondev-sudo/24978429b85b44348bcff5c0885afe82 to your computer and use it in GitHub Desktop.
Save anondev-sudo/24978429b85b44348bcff5c0885afe82 to your computer and use it in GitHub Desktop.
Modmail hosting on replit [Tutorial]

You can host modmail bot for your server on replit.com 24/7 for free without credit card! Just follow this guide. Modmail bot wiki: https://github.com/kyb3r/modmail/wiki

  • Create account on https://repl.it/signup
  • Create a bot from Discord dev portal and invite it to your Discord server- guide
  • Create MongoDB Atlas database - guide

Deploying the Log Viewer

We will need MongoDB connection string.

  • Fork logviewer repl here

  • Go to Secrets tab and add there:

    • MONGO_URI - Your Mongo connection URI
  • Click on Run button and wait!

  • Copy your logviewer's url, you will need it later.

Deploying the Modmail bot

  • Fork modmail repl here

  • Go to Secrets tab and add there:

    • TOKEN - your bot's token
    • GUILD_ID - ID of your Server
    • OWNERS - your own Discord ID, if there are multiple owners, separate them by a comma like this: 180314310298304512, 355790471219511297, 325012556940836864.
    • CONNECTION_URI - your Mongo connection URI from the previous section
    • LOG_URL - URL of your logviewer repl (https://logviewer.<your_username>.repl.co)
    • disable_autoupdates - on (This will prevent the bot from making auto updates, if you skip this, then your bot will be broken. If there is a new update, please fork my repl again and fill the same Secrets and then delete your old repl and rename new repl to the same name as it was before. You can ping me on Pinglik Support server if I haven't updated my repl.)
  • Click on Run button and wait

  • Copy your modmail bot's webserver url

  • 🎉 Your modmail bot should be online now, try to run ?setup command on your Discord server.

Keeping Modmail bot + logviewer alive

If you will skip this step your modmail will go offline after 30 minutes of inactivity (when you leave replit project's page). So we will need logviewer's url and modmail webserver's url

  • You can use my website monitoring app. It will ping your replit projects to keep them online for free.

Pinglik Uptimer (recommended ⭐, it has custom ping interval and Discord notifications + much more): Click here

Simple Pinglik (simple web pinger): Click here

More info about Pinglik: https://pinglik.eu

That's all.

If you need help you can join Pinglik Support Server and ask for help in #💛|coding-help channel and we will help you 😉

If you would like to support me:
Buy Me a Coffee at ko-fi.com

Guide how to host this bot on Railway: here

Credits:

  • Jaedon - Updated and fixed my modmail bot replit hosting guide, you can ask him for support regarding this guide directly on Discord (his username is: jaeman6465)

Tip

If you don't mind paying for cheap hosting on powerful servers with good uptime, please open modmail support thread on Pinglik Support server for more info. Prices start from 3€ per 3 months (1€ monthly). I can clone modmail files from GitHub, do package installs and configure the startup command for you for free (you then just need to fill .env file, start the server and you can enjoy your modmail bot being online 24/7 with low ping - Discord API latency). You can host your logviewer on your own domain/subdomain (or I can provide you a free subdomain if you don't have your own domain) too. I offer hosting for your own NodeJS/Python Discord bots too.

@anondev-sudo
Copy link
Author

If you like this guide, please ⭐ star this gist.
If you want to support me, you can buy me a coffee:
ko-fi

@Fantom-XR
Copy link

@JaedonLau please join our support server. https://pinglik.eu/support

@anondev-sudo
Copy link
Author

@AviaJae has fixed the repl fork, it should work again. I have updated my repl forks to Jaedon's ones. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment