Skip to content

TBG1000/MatchBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MatchBot

A Minecraft to Discord bot, interacting with PGM Match events to display match information live.

This project's structure is a modified version of Bolty, developed by applenick. Similarly, the project is also directly inspired by the #match-status channel located at the Overcast Community Discord server.

Description

MatchBot will listen to MatchStartEvent and MatchFinishEvent to populate a Discord embed with information about a started or finished match.

MatchBot is built with Javacord, an awesome Java library for Discord bots.

This bot runs on a single Minecraft server, and is not designed with proxies, networks, or multiple servers in mind.

Building

  1. First, clone or download the project's source code.
  2. Optionally, make your desired changes.
  3. Run the code formatter, following Google's code style.
mvn com.coveo:fmt-maven-plugin:format
  1. Compile the project.
mvn package

You'll find the bot's .jar file inside the target folder of the project's root directory.

Installing

MatchBot depends on PGM directly to work. Make sure your server has it installed.

  1. Drop the plugin's .jar in your server's plugins folder.
  2. Restart the server to automatically generate the bot's required files (config.yml, plugin.yml).
  3. Fill in the blanks of the configuration file (config.yml). To do this, you'll need the following:
    • A token for your Discord bot which you can get at the Discord Developer Portal
    • The ID of the server in which the bot will be functioning.
    • The ID of the channel in which match embeds will be sent.
  4. Restart the server once again for the changes to take place. Once your bot goes online, match embeds will be sent to the designated channel as soon as matches start or end.

You may look at a sample of the configuration file below. You can also find out how to get server, role or channel IDs here.

Sample images

Match start sample Match finish sample

Config

# Discord Stuff
enabled: true # Enable discord bot?
token: "" # Discord bot token
server: "" # ID of discord server

# ID of channel where match embeds will be sent
match-channel: ""