Skip to content

Vliegenier04/bridge_v2

Repository files navigation

Miscellaneous Guild Bridge

A bot used to Bridge between Discord and Hypixel guild chats.

Warning This application will log into Minecraft using Mineflayer, a Minecraft bot client. This may be against the rules of some servers and could result in punishment. All contributors to this repository are not liable for damages, and no warranty is provided under the MIT License.

Note This application will no longer receive updates that contain new features or QOL improvements. Updates, where necessary, will only contain patches for security vulnerabilities and bugs.

Features

  • Bridges between Discord and Hypixel guild chats.
  • Sends all guild related messages, including chat, guild announcements and more to Discord.
  • Automatic restarts and reconnections.
  • Toggleable use of Discord emojis for Hypixel ranks in chat messages.
  • Privileged slash commands to control bot behaviour in-game.
  • Toggleable slowmode to control member usage.
  • Basic filtering of extreme profanity to protect bot accounts from abuse.
  • Configurable in-game reminders to spread the word about news and upcoming events.

Installation

Prerequisites

  • Git
  • NodeJS >=16.6.0 and npm
  • A full access Minecraft Java Edition account

Setup

  1. ⭐ Star this repository!
  2. Install pnpm via one of their installation methods, or the following command:
$ npm install -g pnpm
  1. Clone the repository into a directory of your choice.
$ git clone https://github.com/MiscGuild/bridge.git
  1. Enter the new directory and install packages.
$ cd bridge
$ pnpm install
  1. Make a new Discord bot account on the Discord Developer Portal and retrieve the bot token.

  2. Under the Bot tab, grant the bot the Message Content Intent.

  3. Generate an invite URL by going to the OAuth2 tab and clicking on the URL Generator. Add the bot and application.commands scopes, before opening the link to invite the bot to your server.

  4. Setup the project config files.

$ pnpm run setup-files
  1. Fill out the .env file with your credentials.

  2. Promote the Minecraft account the bot uses to Officer in-game in order for it to view the Officer chat and run privileged commands.

  3. Build and run the bot.

$ pnpm run build
$ pnpm start

Rank Emojis

Optionally, you may activate the use of rank emojis in discord messages by following these steps:

  1. Run the /emojis upload command in a discord server of your choice.

    Note It is recommended to run this command in an alternate server, as it uses a significant number of emoji slots. In this case, the user of id BOT_OWNER_ID is the only person with permission to run this command.

  2. Set the value of USE_RANK_EMOJIS in the .env file to true, or false to disable this feature.

If at any time you wish to delete the emojis created by the bot, run the /emojis remove command.

Process Management

If you are self-hosting or your process manager does not automatically restart the bot in the event of a crash, you may use PM2, a process manager for Node.js applications.

  1. Install PM2.
$ pnpm add pm2
  1. Use the pm2 script instead of the start script to launch the bot.
$ pnpm run pm2

Please refer to the PM2 Documentation for more configuration options and information about PM2.

Contributing

Pull requests are welcome. If you would like to chat with other developers please join our Discord and go to #programming-talk.

Please ensure the following before committing your changes:

Issues and Bug Reports

To submit an issue or bug, please contact a developer or open an issue here.

Acknowledgements

Parts of this project use code from the following repositories:

License

This is an open-source project licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published