-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: allow build workflow to run on lint failure
- Loading branch information
1 parent
cac966d
commit c0cf57a
Showing
6 changed files
with
176 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
dist | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js v18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Setup files & build | ||
if: success() || failure() | ||
run: pnpm setup-files && pnpm build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist | ||
dist | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,138 @@ | ||
<h1 align="center">Miscellaneous Guild Bridge</h1> | ||
|
||
<p align="center"> | ||
A bot used to Bridge between Discord and Hypixel guild chats. | ||
</p> | ||
|
||
<h3 align="center"> | ||
<a href="https://github.com/MiscGuild/bridge/stargazers"> | ||
<img alt="Stars" src="https://img.shields.io/github/stars/MiscGuild/bridge?color=blue"/> | ||
</a> | ||
<a href="https://github.com/MiscGuild/bridge/forks"> | ||
<img alt="Forks" src="https://img.shields.io/github/forks/MiscGuild/bridge"> | ||
</a> | ||
<a href="https://discord.gg/dEsfnJkQcq"> | ||
<img alt="Guild Discord" src="https://img.shields.io/discord/522586672148381726?label=discord&color=blue&logo=discord&logoColor=blue"/> | ||
</a> | ||
</h3> | ||
|
||
> [!Warning] | ||
> This application will log into Minecraft using Mineflayer, a JavaScript API for Minecraft. 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](https://github.com/MiscGuild/bridge/blob/master/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](#features) | ||
- [Installation](#installation) | ||
- [Prerequisites](#prerequisites) | ||
- [Setup](#setup) | ||
- [Process Management](#process-management) | ||
- [Contributing](#contributing) | ||
- [Issues and Bug Reports](#issues-and-bug-reports) | ||
- [Acknowledgements](#acknowledgements) | ||
- [License](#license) | ||
|
||
## 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. | ||
- 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](https://git-scm.com/downloads) | ||
- [NodeJS](https://nodejs.org/en/) >=16.6.0 and npm | ||
- A full access Minecraft Java Edition account | ||
|
||
### Setup | ||
|
||
1. ⭐ Star this repository! | ||
2. Install [pnpm](https://pnpm.io/) via one of their [installation methods](https://pnpm.io/installation), or the following command: | ||
|
||
```bash | ||
$ npm install -g pnpm | ||
``` | ||
|
||
3. Clone the repository into a directory of your choice. | ||
|
||
```bash | ||
$ git clone https://github.com/MiscGuild/bridge.git | ||
``` | ||
|
||
4. Enter the new directory and install packages. | ||
|
||
```bash | ||
$ cd bridge | ||
$ pnpm install | ||
``` | ||
|
||
5. Make a new Discord bot account on the [Discord Developer Portal](https://discord.com/developers/applications) and retrieve the bot token. | ||
|
||
6. Under the `Bot` tab, grant the bot the `Message Content` Intent. | ||
|
||
7. 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. | ||
|
||
8. Setup the project config files. | ||
|
||
```bash | ||
$ pnpm run setup-files | ||
``` | ||
|
||
9. Fill out the `.env` file with your credentials. | ||
|
||
10. Promote the Minecraft account used by the bot to Officer in-game in order for it to view the Officer chat and run privileged commands. | ||
|
||
11. Build and run the bot. | ||
|
||
```bash | ||
$ pnpm run build | ||
$ pnpm start | ||
``` | ||
|
||
### 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](https://pm2.keymetrics.io/), a process manager for Node.js applications. | ||
|
||
1. Install PM2. | ||
|
||
```bash | ||
$ pnpm add pm2 | ||
``` | ||
|
||
2. Use the `pm2` script instead of the `start` script to launch the bot. | ||
|
||
```bash | ||
$ pnpm run pm2 | ||
``` | ||
|
||
Please refer to the [PM2 Documentation](https://pm2.keymetrics.io/docs/usage/quick-start/) 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](https://discord.gg/bHFWukp) and go to `#programming-talk`. | ||
|
||
Before submitting your changes for review, please ensure: | ||
|
||
- all code has been thoroughly tested | ||
- you have followed the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) | ||
|
||
### Issues and Bug Reports | ||
|
||
To raise an issue or bug report, please contact a developer or [open an issue](https://github.com/MiscGuild/bridge/issues). | ||
|
||
## Acknowledgements | ||
|
||
Parts of this project use code from the following repositories: | ||
|
||
- [Hychat Self-Host](https://github.com/hychat-mc/self-host) Under MIT License. | ||
- [Hypixel API TypeScript](https://github.com/unaussprechlich/hypixel-api-typescript) Under MIT License. | ||
|
||
## License | ||
|
||
This is an open-source project licensed under the [MIT License](https://github.com/MiscGuild/bridge/blob/master/LICENSE). | ||
<h1 align="center">Miscellaneous Guild Bridge</h1> | ||
|
||
<p align="center"> | ||
A bot used to Bridge between Discord and Hypixel guild chats. | ||
</p> | ||
|
||
<h3 align="center"> | ||
<a href="https://github.com/MiscGuild/bridge/stargazers"> | ||
<img alt="Stars" src="https://img.shields.io/github/stars/MiscGuild/bridge?color=blue"/> | ||
</a> | ||
<a href="https://github.com/MiscGuild/bridge/forks"> | ||
<img alt="Forks" src="https://img.shields.io/github/forks/MiscGuild/bridge"> | ||
</a> | ||
<a href="https://discord.gg/dEsfnJkQcq"> | ||
<img alt="Guild Discord" src="https://img.shields.io/discord/522586672148381726?label=discord&color=blue&logo=discord&logoColor=blue"/> | ||
</a> | ||
</h3> | ||
|
||
> [!Warning] | ||
> This application will log into Minecraft using Mineflayer, a JavaScript API for Minecraft. 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](https://github.com/MiscGuild/bridge/blob/master/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](#features) | ||
- [Installation](#installation) | ||
- [Prerequisites](#prerequisites) | ||
- [Setup](#setup) | ||
- [Process Management](#process-management) | ||
- [Contributing](#contributing) | ||
- [Issues and Bug Reports](#issues-and-bug-reports) | ||
- [Acknowledgements](#acknowledgements) | ||
- [License](#license) | ||
|
||
## 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. | ||
- 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](https://git-scm.com/downloads) | ||
- [NodeJS](https://nodejs.org/en/) >=16.6.0 and npm | ||
- A full access Minecraft Java Edition account | ||
|
||
### Setup | ||
|
||
1. ⭐ Star this repository! | ||
2. Install [pnpm](https://pnpm.io/) via one of their [installation methods](https://pnpm.io/installation), or the following command: | ||
|
||
```bash | ||
$ npm install -g pnpm | ||
``` | ||
|
||
3. Clone the repository into a directory of your choice. | ||
|
||
```bash | ||
$ git clone https://github.com/MiscGuild/bridge.git | ||
``` | ||
|
||
4. Enter the new directory and install packages. | ||
|
||
```bash | ||
$ cd bridge | ||
$ pnpm install | ||
``` | ||
|
||
5. Make a new Discord bot account on the [Discord Developer Portal](https://discord.com/developers/applications) and retrieve the bot token. | ||
|
||
6. Under the `Bot` tab, grant the bot the `Message Content` Intent. | ||
|
||
7. 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. | ||
|
||
8. Setup the project config files. | ||
|
||
```bash | ||
$ pnpm run setup-files | ||
``` | ||
|
||
9. Fill out the `.env` file with your credentials. | ||
|
||
10. Promote the Minecraft account used by the bot to Officer in-game in order for it to view the Officer chat and run privileged commands. | ||
|
||
11. Build and run the bot. | ||
|
||
```bash | ||
$ pnpm run build | ||
$ pnpm start | ||
``` | ||
|
||
### 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](https://pm2.keymetrics.io/), a process manager for Node.js applications. | ||
|
||
1. Install PM2. | ||
|
||
```bash | ||
$ pnpm add pm2 | ||
``` | ||
|
||
2. Use the `pm2` script instead of the `start` script to launch the bot. | ||
|
||
```bash | ||
$ pnpm run pm2 | ||
``` | ||
|
||
Please refer to the [PM2 Documentation](https://pm2.keymetrics.io/docs/usage/quick-start/) 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](https://discord.gg/bHFWukp) and go to `#programming-talk`. | ||
|
||
Before submitting your changes for review, please ensure: | ||
|
||
- all code has been thoroughly tested | ||
- you have followed the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) | ||
|
||
### Issues and Bug Reports | ||
|
||
To raise an issue or bug report, please contact a developer or [open an issue](https://github.com/MiscGuild/bridge/issues). | ||
|
||
## Acknowledgements | ||
|
||
Parts of this project use code from the following repositories: | ||
|
||
- [Hychat Self-Host](https://github.com/hychat-mc/self-host) Under MIT License. | ||
- [Hypixel API TypeScript](https://github.com/unaussprechlich/hypixel-api-typescript) Under MIT License. | ||
|
||
## License | ||
|
||
This is an open-source project licensed under the [MIT License](https://github.com/MiscGuild/bridge/blob/master/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters