diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..6a775d2 --- /dev/null +++ b/Readme.md @@ -0,0 +1,34 @@ +# Discord Bot for Minecraft Whitelist + +A simple Discord Bot designed to allow your server members to add themselves to the whitelist of a configured Minecraft server. Each member assigns one MC username to their discord username. Currently, there is no verification for MC usernames so deploy only on trusted servers with trustable members. + +# Discord Usage + +The bot adds 3 slash functions: + +`/whitelist-add ` assigns MC username to the calling Discord member + +`/whitelist-remove` removes the assignment from the calling Discord member + +`/whitelist-show` prints whether an assignment to the calling Discord member exists and its value + +# Installation + +## Prerequisites + +Create a new Discord App using the developer portal and invite the bot to your server with at least the following scopes: +- bot +- application.commands +and the following permissions: +- Send Messages + +## Installation + +1. Download `discord-minecraft-whitelist-bot` binary and `template.config.json` from from [releases](https://git.tronnet.net/alu/discord-minecraft-whitelist-bot/releases) +2. Rename `template.config.json` to `config.json` and modify: + - app-id: Discord App ID from the developer portal + - guild-id: Server ID which can be obtained by right clicking the server in Discord and clicking `Copy Server ID` + - token: Discord App Token from the developer portal + - mc-rcon: `IP:port` or `hostname:port` formatted ip/hostanme and port number of the MC server rcon + - mc-rcon-password: Password for the MC server rcon +3. Run the binary \ No newline at end of file diff --git a/go.mod b/go.mod index afcbe46..1b4ca0d 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,11 @@ go 1.23.2 require ( github.com/bwmarrin/discordgo v0.28.1 - github.com/gorcon/rcon v1.3.5 + github.com/gorcon/rcon v1.4.0 ) require ( github.com/gorilla/websocket v1.5.3 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/sys v0.27.0 // indirect )