Last active
February 9, 2025 22:22
-
-
Save lorenzo132/6ee81f64fc618a275871e9ccef7c04e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Script Started" | |
# Ensure system packages are up to date | |
echo "Updating system packages" | |
sudo apt update && sudo apt upgrade -y | |
# Install required dependencies | |
echo "Installing required dependencies" | |
sudo apt install -y python3-pip git | |
# Clone and set up modmail repository | |
echo "Installing modmail" | |
git clone https://github.com/modmail-dev/modmail.git | |
cd modmail || exit | |
echo "Installing dependencies" | |
pip3 install -r requirements.txt | |
# Set up environment variables | |
echo "Creating .env file" | |
touch .env | |
echo "Enter TOKEN [Your Discord bot's token.]" | |
read -r token | |
echo "TOKEN=$token" >> .env | |
echo "Enter GUILD_ID [The ID for the server you are hosting this bot for.]" | |
read -r gid | |
echo "GUILD_ID=$gid" >> .env | |
echo "Enter Owner ID's [Comma-separated user IDs of people allowed to use owner-only commands (eval and update).]" | |
read -r own | |
echo "OWNERS=$own" >> .env | |
echo "Enter MONGO_URI [MongoDB connection URI for self-hosting your data.]" | |
read -r uri | |
echo "MONGO_URI=$uri" >> .env | |
echo "Enter LOG_URL [This can be the IP and port of your VPS, which you will set later.]" | |
read -r lu | |
echo "LOG_URL=$lu" >> .env | |
echo "Modmail setup complete! Now setting up logviewer." | |
cd .. | |
# Clone and set up logviewer repository | |
echo "Installing logviewer" | |
git clone https://github.com/modmail-dev/logviewer.git | |
cd logviewer || exit | |
echo "Installing dependencies" | |
pip3 install -r requirements.txt | |
echo "Creating .env file" | |
touch .env | |
echo "MONGO_URI=$uri" >> .env | |
echo "Setup completed successfully!" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment