Skip to content

Chalwk/SAPPDiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAPPDiscordBot

Java License SAPPDiscordBot

Discord

A Java application that uses the JDA API to connect Halo SAPP server events to Discord, providing real-time alerts, structured embeds, and a GUI interface for monitoring your servers.


Preview

Preview 1 Preview 2
Preview 3 Preview 4

Overview

SAPPDiscordBot listens for server events generated by the discord.lua, processes them, and sends rich notifications to Discord. It supports multiple servers, offers a GUI for configuration, and is optimized for performance.

⚠️ Note: This application requires GUI access to the host machine. It will not run in headless environments such as servers without a graphical interface.


System Requirements

  • Must have Java 17 installed.
    • For Windows users, you can download Java 17 here
    • For Linux users, use non-headless JRE: sudo apt install openjdk-17-jre
  • 512MB RAM
  • 50MB storage
  • Windows or Linux with GUI access
  • Halo server running SAPP

Issues and Feature Requests

Found a bug or have a feature idea? Please check our issue templates:

Before creating a new issue, please:

  1. Check if the issue already exists in our issues list
  2. For bugs, include your Java version, operating system, and relevant log output
  3. For features, describe your use case and proposed solution

Download and Installation

1. Download the latest release from the repository

2. Download the discord.lua and place it in the server Lua folder

3. Register an application on the Discord Developer Portal.

Follow these steps:

  • Click New Application. Provide a name for your bot and click create.
  • Click the Bot tab on the left-hand side menu. Set the bot's username and profile picture.
  • Click Reset Token and then Yes, do it!.
    • Save this token, you will need it later.
    • Scroll down to Privileged Gateway Intents.
    • Enable Presence Intent, Server Members Intent and Message Content Intent.
  • Click the OAuth2 tab on the left-hand side menu.
    • Scroll down to the OAuth2 URL Generator section.
    • Under Scopes, select bot.
    • Under Bot Permissions, select Administrator
    • Copy the URL that gets generated and paste it into your browser.
  • Select the server you want to add the bot to and click Continue.
    • Complete the captcha and click Authorize.
    • The bot should now be on your Discord server. Ensure the bot has the correct permissions.

⚠️ Warning: Never share the Discord Bot Token with anyone!

4. Create a new folder in your Halo server's root directory called discord_events.

5. Launch SAPPDiscordBot.exe (or SAPPDiscordBot.jar on Linux)

  • Enter the Discord Bot Token you saved earlier.
  • Set your watch directory to the discord_events folder you created in step 4.
  • Click Save Configuration
  • Click the Output Configuration tab
  • Select Add Server and enter the exact name of your server defined in init.txt (sv_name command in init.txt). A new tab will appear with the server name - click it.
  • Set the General, Chat and Command Discord Channel IDs for this server, and repeat for each server you want to add.
  • Click Save Configuration
  • Click Start Bot

Supported Event Types

Category Events
Game Events event_start, event_end, event_map_reset
Player Events event_join, event_leave, event_spawn, event_team_switch
Chat and Commands event_chat, event_command
Score Events event_score
Death Events event_death
Admin Events event_login, event_snap

Technical Notes:

The SAPPDiscordBot.exe / SAPPDiscordBot.jar application will create a file called sapp_bot_config.json in the same directory as the application. This file contains the configuration for the bot, including the Discord Bot Token, watch directory, and server configurations.


License

SAPPDiscordBot is released under the MIT License.

For licensing inquiries, collaboration proposals, or to report usage concerns, contact me:

Email (preferred): chalwk.dev@gmail.com
Discord: (chalwk)


About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages