Skip to content

TBG1000/MatchBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 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 JDA, an awesome Java library for Discord bots.

This bot runs best on a single Minecraft server, but can accommodate multiple servers (not proxies).

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 spotless:apply
  4. 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).
  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.
    • server-name and map-image-not-found fields are optional.
  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

# MatchBot configuration file
# Discord settings
enabled: true # Enable Discord bot?
token: "" # Discord bot token
server: "" # ID of Discord server
match-channel: "" # ID of channel where match embeds will be sent

# Minecraft settings
server-name: "" # Name of the server (useful for networks)

# Image URL to display in the embed's thumbnail if a map image is not found
# Example: https://raw.githubusercontent.com/TBG1000/MapImages/main/map_image_not_found.png
map-image-not-found: ""

About

A Minecraft to Discord bot for PGM servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages