Skip to content

JianyueLab-Official/MCSM-Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color logo - no background.png

MCSM - Discord - Bot

Page Views Count

TO DO LIST:

  • Instance List
  • User Control
  • Node Control & Details
  • User search
  • etc.

Usage & Development

Requirements:

  • Python
  • Discord Bot API
  • MCSM Panel

Run the project

// install requirements for running bot
pip3 install -r requirements.txt
// if install failed please use this command to manually install the requirements
pip3 install python-dotenv discord.py requests

python __init__.py
  • Copy .env.sample to .env and fill all the blanks.

Important

This bot DOES NOT PROVIDE ANY ROLE LIMITATION which EVERYONE in your server will have PERMISSION to send command. Please limit bot in your server's server settins -> apps -> intergrations -> your bot name, select roles and channel that allow for sending commands.

Environment Settings

DISCORD_BOT_TOKEN

Your discord bot token

MCSMANAGER_ADDRESS

Your MCSManager Panel Address, need contain https, or https

Eg) https://example.com

MCSMANAGER_API_KEY

Your MCSManager apikey. How to get your MCSM apikey

EPHEMERAL_MESSAGE

Hide bot message for the user who send the message or not

Default False, use true or 1 to adjust this option.

OUT_PUT_SIZE

The output size for instance, Unit KB

Default 1000

How to create a discord bot and get api?

  1. Go to Discord Developer Panel, login your discord account. discord developer panel
  2. Press button at right-top to create a new bot.
  3. Go to installation page, and change the installation link to None. Installation
  4. After create bot, go to bot page and reset the token, copy and save that key to your env file. oauth
  5. Scroll down on the same page, you need disable public bot and grant permission for Presence Intent, Server Members Intent, Message Content Intent. privileges
  6. Go to oauth page, select bot and Administrator, then scroll down it will generate you a link. Copy and paste link to the browser. oauth oauth

Contributors

contributors