-
Notifications
You must be signed in to change notification settings - Fork 6
Setup
NOTE: MAKE SURE YOU HAVE PYTHON 3.6 INSTALLED (See FAQ)
Here are 3 ways you can do this:
- Make sure you have GitHub Desktop installed
- In the toolbar, click
File
->Clone repository...
- Alternatively use the keyboard shortcut Ctrl+Shift+O
- Click on the URL tab, and paste in
https://github.com/Descended/MaplestoryDiscBot
- Set the Local path as the folder where you want the bot source code to be stored
- Click Clone
- Make sure you have Sourcetree installed
- In the toolbar, click
File
->Clone/New...
- Alternatively use the keyboard shortcut Ctrl+N
- In the Source Path/URL field, paste in
https://github.com/Descended/MaplestoryDiscBot
- In the Destination Path field, select the folder where you want the bot source code to be stored
- Click Clone
- Make sure you have
Git
installed- You can use the following command:
choco install git
if you are using Chocolatey to manage your software - Otherwise, install using the instructions from the Git Website
- You can use the following command:
- Navigate to the folder you want to use
- E.g.
cd server_tools/my_bot
- E.g.
- Clone the repository
- HTTPS:
git clone https://github.com/Descended/MaplestoryDiscBot.git
- SSH:
git clone git@github.com:Descended/MaplestoryDiscBot.git
- GitHub CLI:
gh repo clone Descended/MaplestoryDiscBot
- HTTPS:
Alternatively, you may choose to download the stable releases:
Go to the release page to find all the source code archives
- In the root of the repository, create a virtual environment using
Python -m venv venv
- Substitute "Python" with whichever command you have assigned to Python 3.6
- Refer to the FAQ if you encounter an error
- Activate the virtual environment using
call venv\scripts\activate.bat
in Command Prompt- The command is
venv/scripts/activate
in Power Shell - Note: PowerShell can take both backslash and forward slashes, but CMD only accepts backslashes
- Note: You can deactivate the venv by using the command deactivate
- The command is
- Use the command
venv/scripts/pip install -r requirements.txt
to install the required modules- Use
venv\scripts\pip install wheel
, if the above commands throw errors
- Use
... Err
Good luck.
- Visit the Discord Developer Portal
- Login (if applicable)
- Click on the New Application button, at the top right of the page
- Enter your desired application name
- Make sure the new application that you've just created is currently selected (which should automatically be the case)
- Select Bot in the left side-panel
- Click on the Add Bot button (under the Build-A-Bot section), at the top right of the page
- Under Token, click on the Copy button to have it added to your clipboard
- Note: Scroll down to
SERVER MEMBER INTENTS
and enable it for the bot to access role adding feature! (See FAQ)
- Note: Scroll down to
PLEASE CONFIGURE THE BOT PRIOR TO FIRST USE
You will need to fill in the required fields in the config file before running the bot for the first time!
Configuration file path: src/settings/Config.py
- The config file has all the required fields marked out as REQUIRED
- The config file has all its fields explained with comments
NOTE: This bot assumes that it is run on the same machine as the private server & its database
- This behaviour can be altered through the config file as well
The Web API is used to establish a connection between the Discord bot and the MapleStory server, for a feature-rich Discord presence
At the moment, it only supports HeavenMS-based sources (see Technical-Details)
- Head to the Spring Initializr to have a Spring Boot project structure automagically generated for you
- Change the Java version to the one you're using, and make sure "Spring Web" is in the dependencies list
- If your project is not a maven project visit this tutorial by Jetbrains
- Grab the pom.xml from the generated zip file.
- Add its contents into the pom.xml of your MapleStory source code
- Maven should automagically import/resolve the dependencies
- If this is not the case, open the Maven tab and click on "Re-import all Maven Projects"
... You're on your own for this (unless someone wishes to contribute documentation)
- After resolving dependencies, create a new folder in the source code for the API-related files
- Create a new apiApplication class with the following code:
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ApiApplication {
public static void init() {
SpringApplication.run(ApiApplication.class);
}
}
- Download the proprietary API functions from this page (or make your own)
- Go to the part of your source code that launches your MapleStory server and add the following line:
apiApplication.init();
A TEAM SPIRIT Project • SpiritMS • SpiritSuite • Spirit In-Game Command Guide