Skip to content

Latest commit

 

History

History
118 lines (85 loc) · 6.53 KB

README.md

File metadata and controls

118 lines (85 loc) · 6.53 KB

Header - Bot

Discord Discord.js CodeQL Checks GitHub License

🤖 Self-Hosting

  1. Clone this repository git clone https://github.com/IgorKowalczyk/majo.exe.git
  2. Go to /packages/database/ directory and follow Database Setup tutorial
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Create new file or edit existing .env file in root directory of the project
  5. In .env file set this values:
    • TOKEN - Discord bot token [Tutorial]
    • SECRET - Random string (min. length = 32 chars)
    • CLIENT_SECRET - Discord bot secret [Tutorial]
    • Database URLs [Tutorial]
      • DATABASE_URL - Main database URL
      • DATABASE_URL_UNPOOLED - Direct database URL (optional)
      • REDIS_URL - Redis database URL
  6. Run pnpm i to install all dependencies
  7. Go to /packages/config/ directory and change values in /configs/bot.js to your values
  8. Go back to main directory and run pnpm run dev --filter="@majoexe/bot" or pnpm run deploy --filter="@majoexe/bot" to start bot
  9. That's it! You can now invite your bot to your server and use it!

Note

If you want to host Majo.exe 24/7, you can use TrestHost or Terohost hosting services. They are cheap and reliable.

🔒 Example .env file

TOKEN=DISCORD_BOT_TOKEN
SECRET=SECRET_STRING
CLIENT_SECRET=DISCORD_BOT_SECRET

# ... Database credentials

Warning

This file should be in root directory of the project. This file is super secret, better to not share it!


⚙️ System Requirements

Ensure your setup meets these prerequisites before setting up Majo.exe:

  • PostgreSQL 14x or higher
  • Node.js 18x or higher
  • (Any) Linux x64¹
  • ~512MB of RAM (minimum)
  • ~3GB of hard drive space (minimum)

Note

1: Debian based distros are recommended, Dashboard can also run on Windows and MacOS but it's not recommended.

🔓 Tokens tutorials

🔏 Discord Token

  1. Go to Discord Developer Portal
  2. At the top right of the screen, click "New application" and assign it a name. Next in the left part of the screen on the navigation bar, find "Bot" then click it and find button named "Add Bot"
  3. After confirming the bot creation, click the "Copy token" button
  4. Paste your token in .env file - TOKEN=BOT_TOKEN

Tutorial written by: _index1337

🔓 Discord Bot Secret

  1. Go to Discord Developer Portal
  2. In the left part of the screen on the bar, find "OAuth2" then click it
  3. Find section named "Client Secret", under the bot secret click "Copy" button
  4. Paste client secret to .env - CLIENT_SECRET=CLIENT_SECRET

Tutorial written by: _index1337

📝 Contributors

💝 Sponsors

These wonderful people and services have helped develop Majo.exe, without them this project would not exist. Thanks goes to these wonderful people!

Sponsor Description
TrestHost Logo TrestHost TrestHost is a good and powerful hosting provider providing servers from the USA and Germany. Try us out today!

⁉️ Issues

If you have any issues with the bot please create new issue here. When creating new issue please provide as much information as possible. If you can, please provide logs from console.

📥 Pull Requests

When submitting a pull request:

  • Clone the repo.
  • Create a branch off of master and give it a meaningful name (e.g. my-awesome-new-feature).
  • Open a pull request on GitHub and describe the feature or fix.

We will review your pull request as soon as possible. We might suggest some changes or improvements.

📋 License

This project is licensed under the MIT. See the LICENSE file for details