Coder Social home page Coder Social logo

pushkarop / majobot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from igorkowalczyk/majo.exe

0.0 0.0 0.0 37.41 MB

❤️Majo.exe have almost everything - Fun, Memes, Images, Giveaway Moderation, Anime, NSFW and eveb more!. Majo.exe serve over 150 commands!

Home Page: https://majoexe.ml

License: MIT License

JavaScript 83.24% CSS 5.77% EJS 10.63% Shell 0.33% HTML 0.04%

majobot's Introduction

Majo.exe Logo

Majo.exe

Majo.exe have almost everything - Fun, Memes, Images, Giveaway Moderation, Anime, NSFW and eveb more!. Majo.exe serve over 150 commands!



Discord Discord.js CodeQL Checks GitHub License Version

Invite

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

Features

  • ⚙️ Fully customizable
  • 🌆 Build-in Dashboard
  • 📝 Easy Config
  • 💯 150+ Commands
  • 📚 Easy Hosting

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

Heroku Replit Terohost
Deploy to heroku Run on Repl.it Run on Terohost

Self-Hosting (Bot)

  1. Clone this repository git clone https://github.com/IgorKowalczyk/majobot.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
    • PREFIX - Discord bot main prefix
    • ID - Your Discord Bot 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
    • STATUS_WEBHOOK - Your status webhook URL (Discord)
    • ERRORS_WEBHOOK - Your errors webhook URL (Discord)
  7. Run npm run bot

Note: See the example .env file below!


Dashboard hosting

  1. In .env file set this values:
    • TOKEN - Discord bot token
    • PREFIX - Discord bot main prefix
    • DOMAIN - Your website domain (eg https://example.com)
    • AMEAPI - Your Amethyste api token
    • 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_KEY - Google recaptcha v2 key
    • SECRET - Discord bot secret
  2. Fill dashboard config in /config/main_config.js
  3. 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
      
  4. Run npm run dashboard in your terminal
  5. If everyting is ok go to your dashboard in browser (eg. to localhost:8000)

Additional info

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

If you are hosting the site locally it is best to generate certificates for it. If you have them:

  1. Change certs: false & localhost: false values in /config/main_config.js to true
  2. Place the server.cert & server.key certs in /config/certs/ directory

.env File (Main Config)

.env config table

.env varriable Description Required (Bot) Required (Dashboard)
TOKEN The bot token (Remember! The TOKEN is super secret)
PREFIX The default bot prefix (eg. !majo)
ID Your Discord Bot ID
AMEAPI Your Amethyste api token
MYSQL_DATABASE Your MYSQL database name
MYSQL_HOST Your MYSQL Host
MYSQL_USER Your MYSQL user
MYSQL_PASSWORD Your MYSQL password
DOMAIN Your website domain (eg https://example.com)
PORT Your webiste port eg. 8008
- Note: Heroku don't need port. Heroku assings port automatically!
DASHBOARD The Web-Dashboard config value. (Boolean)
SECRET The bot client secret
ANALYTICS Google analytics tracking ID, used in Web-Dashboard
RECAPTCHA_KEY Google recaptcha v2 key
CONTACT_WEBHOOK Your contact form webhook URL
STATUS_WEBHOOK Your status webhook URL
ERRORS_WEBHOOK Your errors webhook URL
NODE_ENV Environment variable (production/development)

Example .env file

[?] Click to see example .env file!

.env.example

# Environment Config

# Required
TOKEN=YOUR_TOKEN_GOES_HERE
PREFIX=!majo
ID=YOUR_BOT_ID
AMEAPI=YOUR_AMETHYSTE_API_TOKEN
MYSQL_DATABASE=YOUR_MYSQL_DATABASE_NAME
MYSQL_HOST=YOUR_MYSQL_HOST
MYSQL_PASSWORD=YOUR_MYSQL_USER_PASSWORD
MYSQL_USER=YOUR_MYSQL_DATABASE_USER
CONTACT_WEBHOOK=YOUR_CONTACT_FORM_WEBHOOK
STATUS_WEBHOOK=YOUR_STATUS_WEBHOOK_URL
ERRORS_WEBHOOK=YOUR_ERRORS_WEBHOOK_URL
RECAPTCHA_KEY=YOUR_RECAPTCHA_KEY
NODE_ENV=production/development

# Not required
DASHBOARD=[true/false]
DOMAIN=YOUR_WEBSITE_DOMAIN
PORT=YOUR_WEBSITE_PORT
SECRET=YOUR_BOT_CLIENT_SECRET
ANALYTICS=YOUR_GOOGLE_TRACKING_ID
# Note: !majo is the default prefix, you can change it later.

Requirements

  • MySQL: <= 5.7
  • Node.js: <16x
  • Disk space: >= 1GB

Tokens tutorials

Discord Credentials

Click here to see Discord API Credentials tutorial! Soon!

Amethyste API

Click here to see Amethyste API Credentials tutorial! Soon!

Analytics ID

Click here to see Analytics ID tutorial! Soon!

Re-Captcha Key

Click here to see Re-Captcha Key tutorial! Soon!

Contributors

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

majobot's People

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.