Giter VIP home page Giter VIP logo

majo.exe's Introduction

You're currently on the rebuild branch. The code you find here may not work or contain a lot of bugs. Do not use it in production!



Header

Discord Discord.js CodeQL Checks GitHub License Version

โœจ Features

  • โš™๏ธ Fully customizable
  • ๐ŸŒ† Build-in Dashboard
  • ๐Ÿ“ Easy Config
  • ๐Ÿ’ฏ 150+ Commands
  • ๐Ÿ“š Easy Hosting

๐Ÿ”— Invite

Go to this link and add the bot (this requires MANAGE_GUILD permission) to your server.

๐Ÿ–ฅ๏ธ Hosting

We host this bot. Majo.exe will be online 24/7. Invite Majo here!
However, if you want to host Majo.exe yourself - take a look here

Replit Terohost
Run on Repl.it Run on Terohost

๐Ÿค– Self-Hosting (Bot)

  1. Clone this repository git clone https://github.com/IgorKowalczyk/majo.exe.git
  2. Run npm i to install all dependencies,
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Fill /config/config.js, /config/emojis_config.js with your values
  5. Create new file named .env Remember - the file is super secret, better to not share it.
  6. In .env file set this values:
    • TOKEN - Discord bot token [Tutorial]
    • ID - Your Discord Bot ID
    • SUPPORT_SERVER_ID - Your Support Server ID
    • AMEAPI - your Amethyste API token [Tutorial]
    • MYSQL_DATABASE - Your MYSQL database name
    • MYSQL_HOST - Your MYSQL Host Endpoint
    • MYSQL_PASSWORD - Your MYSQL user password
    • MYSQL_USER - Your MYSQL User name who can acces the database
    • ERRORS_WEBHOOK - Your errors webhook URL (Discord)
  7. Run npm run majo:bot

Note: See the example .env file below!


๐Ÿ’พ Self-Hosting (Dashboard)

Note: API Process is children of Dashboard!

  1. Clone this repository git clone https://github.com/IgorKowalczyk/majo.exe.git
  2. Run npm i to install all dependencies,
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Create new file named .env Remember - the file is super secret, better to not share it.
  5. In .env file set this values:
    • TOKEN - Discord bot token [Tutorial]
    • DOMAIN - Your website domain (eg https://example.com)
    • AMEAPI - Your Amethyste api token [Tutorial]
    • ID - Your Discord Bot ID
    • MYSQL_DATABASE - Your MYSQL database name
    • MYSQL_HOST - Your MYSQL Host Endpoint
    • MYSQL_PASSWORD - Your MYSQL user password
    • MYSQL_USER - Your MYSQL User name who can acces the database
    • CONTACT_WEBHOOK - Your Contact Webhook URL (Discord)
    • PORT - Your website port
    • RECAPTCHA_SITE_KEY - Google recaptcha v2 site key
    • RECAPTCHA_SECRET_KEY - Google recaptcha v2 secret key
    • SECRET - Discord bot secret [Tutorial]
  6. Fill dashboard config in /config/main_config.js
  7. Add these redirect URI's (https://discord.com/developers/applications/<YOUR-BOT-ID>/oauth2)
    •  https://your-domain.com
       https://your-domain.com/callback
       https://your-domain.com/dashboard
       https://your-domain.com/login
      
  8. Run npm run majo:dashboard in your terminal
  9. If everyting is ok go to your dashboard in browser (eg. to localhost:8000)

Note: See the example .env file below!

If you are hosting dashboard on Replit please run this command to install Node.js 16x:

  • npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH

๐Ÿงฑ Self-Hosting (API)

  1. Clone this repository git clone https://github.com/IgorKowalczyk/majo.exe.git
  2. Run npm i to install all dependencies,
  3. Grab a Discord Bot token and client secret on Discord's developer portal Tutorial
  4. Create new file named .env Remember - the file is super secret, better to not share it.
  5. In .env file set this values:
    • TOKEN - Discord bot token [Tutorial]
    • DOMAIN - Your website domain (eg https://example.com)
    • PORT - Your website port
  6. Run npm run majo:api in your terminal
  7. If everyting is ok go to your dashboard in browser (eg. to localhost:8001/api)

Additional info

Note: You can run API & Dashboard at the same time by running npm run majo:web

Note: You can run Dashboard, API & Dashboard at the same time by running npm run start

๐Ÿงฑ API Endpoints

๐Ÿ”— API Link: https://majoexe.xyz/api/

API Endpoint (/api) Values Response (json) Conditions Error Codes
/ None Endpoints list None None
/v1/info/bot None JSON Object None None
/v1/fun/cat_fact None JSON Object None None
/v1/fun/eightball None JSON Object None None
/v1/fun/fortunes None JSON Object None None

Note: Any other endpoint will return error code 0 and error message

๐Ÿ’พ .env File (Main Config)

.env config table

.env varriable Description Type Required (Bot) Required (Dashboard) Required (API)
TOKEN Discord bot token String โœ… โœ… โœ…
ID Your Discord Bot ID Number โœ… โœ… โŒ
SUPPORT_SERVER_ID Your support server ID Number โœ… โŒ โŒ
AMEAPI Your Amethyste api token String โœ… โœ… โŒ
MYSQL_DATABASE Your MYSQL database name String โœ… โœ… โŒ
MYSQL_HOST Your MYSQL Host String โœ… โœ… โŒ
MYSQL_USER Your MYSQL user String โœ… โœ… โŒ
MYSQL_PASSWORD Your MYSQL password String โœ… โœ… โŒ
MYSQL_PORT Your MYSQL Port (default is 3306) Number โŒ โŒ โŒ
DOMAIN Your website domain (eg https://example.com) URL โŒ โœ… โœ…
PORT Your webiste port eg. 8080 Number โŒ โœ… โœ…
SECRET The bot client secret String โŒ โœ… โŒ
ANALYTICS Google analytics tracking ID, used in Web-Dashboard String โŒ โŒ โŒ
RECAPTCHA_SITE_KEY Google recaptcha v2 site key String โŒ โœ… โŒ
RECAPTCHA_SECRET_KEY Google recaptcha v2 secret key String โŒ โœ… โŒ
CONTACT_WEBHOOK Your contact form webhook URL URL โŒ โœ… โŒ
STATUS_WEBHOOK Your status webhook URL URL โŒ โŒ โŒ
ERRORS_WEBHOOK Your errors webhook URL URL โœ… โœ… โœ…
NODE_ENV Environment variable (production/development) String โœ… โœ… โœ…

Example .env file

.env.example

# Environment Config

# Required for everything (Bot, Dashboard & API)
TOKEN=YOUR_TOKEN_GOES_HERE
ERRORS_WEBHOOK=YOUR_ERRORS_WEBHOOK_URL
MYSQL_DATABASE=YOUR_MYSQL_DATABASE_NAME
MYSQL_HOST=YOUR_MYSQL_HOST
MYSQL_PASSWORD=YOUR_MYSQL_USER_PASSWORD
MYSQL_USER=YOUR_MYSQL_DATABASE_USER

# Required for bot
ID=YOUR_BOT_ID
SUPPORT_SERVER_ID=YOUR_SUPPORT_SERVER_ID
AMEAPI=YOUR_AMETHYSTE_API_TOKEN

# Required for Dashboard
CONTACT_WEBHOOK=YOUR_CONTACT_FORM_WEBHOOK
ERRORS_WEBHOOK=YOUR_ERRORS_WEBHOOK_URL
RECAPTCHA_SITE_KEY=YOUR_RECAPTCHA_SITE_KEY
RECAPTCHA_SECRET_KEY=YOUR_RECAPTCHA_SECRET_KEY
SECRET=YOUR_BOT_CLIENT_SECRET

# Required for web workers (Dashboard or API)
PORT=YOUR_WEBSITE_PORT

# Not required (optional)
ANALYTICS=YOUR_GOOGLE_TRACKING_ID
STATUS_WEBHOOK=YOUR_STATUS_WEBHOOK_URL

# Note: !majo is the default , you can change it later.

๐Ÿ—œ๏ธ Requirements

  • MySQL 5.7 or higher
  • Node.js 16x or higher
  • (Any) Linux x64*
  • 256MB of RAM
  • 512MB/1GB of hard drive space

*Debian based distro recommended

๐Ÿ”“ Tokens tutorials

๐Ÿ”‘ Discord Credentials

๐Ÿ” 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

๐Ÿ”“ 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 - SECRET=CLIENT_SECRET

Written by: _index1337


๐Ÿ” Amethyste API

  1. Go to Amethyste Register Page to create an new account
  2. Fill in all the required infomation
  3. Check your email to active your account
  4. After login, you'll be redicted to home page, scroll down and click Generate

Token will appear on top of that button, you can regenerate it in any time

  1. Paste your token in .env file - AMEAPI=TOKEN

Written by: _index1337


๐Ÿ“ˆ Analytics ID

Soon!


๐Ÿ” Re-Captcha Key

  1. Go to Google reCAPTCHA About Page
  2. Choose v3 Admin Console.
  3. If you have never generated a reCAPTCHA key before, you will be redirected to the key generation page.

If you have generated a reCAPTCHA key before, you will be redirected to the reCAPTCHA dashboard. Here will display the statistics of your past key. And to generate a key, tap the + button on the top right.

  1. Fill in the information in the form:
  • Label: Enter the label to identify the site.
  • reCAPTCHA type: Choose the type of reCAPTCHA for this site key
  • reCAPTCHA v3 : allows you to verify if an interaction is legitimate without any user interaction [Not recommended!]
  • reCAPTCHA v2 [Recommended!] :
    • Iโ€™m not a robot" Checkbox [Recommended!]
    • Invisible reCAPTCHA badge
    • reCAPTCHA Android
  • Domains: Enter your domain where the keys will be used.
  • Owners: By default, it will receive the email address you log in with. If you want to register for more accounts, enter the email addresses you want to specify
  • Terms of Service: Check the box to accept the reCAPTCHA Terms of Service
  • Send alerts to owners: Check the box to get alerts if Google detects issues with your site
  1. When complete, click the SUBMIT button.

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
Terohost TeroHost is a Discord Bot hosting provider that helps take care of all your needs regarding your Discord Bot to ensure your bot perfect uptime, ping and speed.

โ‰๏ธ Issues

If you have any issues with the page please create new issue here

๐Ÿ“ฅ 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.

๐Ÿ“‹ License

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

The cake is a lie ๐Ÿฐ

Github profile views

majo.exe's People

Contributors

igorkowalczyk avatar dependabot[bot] avatar r-kjha avatar whxyu1337 avatar dairyweb3638077 avatar ddiabla avatar phpxcoder avatar wafelowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.