Fabric Discord Link

Fabric Discord Link is a Discord related mod for Fabric on various modern and older Minecraft versions.

Curseforge Description:
This mod work with Fabric Loader : https://fabricmc.net

This mod require Fabric API to work : https://www.curseforge.com/minecraft/mc-mods/fabric-api

Fabric-Discord-Link is for Minecraft 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, snapshots included.

A mod to link Minecraft and Discord chats for Fabric

This mod is server side only.

Fabric-Discord Link has a discord server : https://discord.gg/xTvWwzV.

If you don't know how to create a discord bot follow this : https://github.com/arthurbambou/Fabric---Discord-Link/wiki/How-to-get-a-token-and-channel-ID-for-Discord

GitHub Description:
Fabric-Discord-Link is a lightweight server mod for the fabric mod loader which links your minecraft server and it's chat to a discord server via your very own discord bot.

Features

Configure a Chat channel to chat between your minecraft world and a discord channel

Configure a Log channel to show server messages and admin actions

Use commands to get live information on your Minecraft Servers status:

!status - Shows number of players that are online right now and the server's uptime

!uptime - Shows server's uptime

!playercount - Shows number of online players / server player maximum

!playerlist - Shows list of names of online players

Configure custom messages for

Server starting

Server started

Server stopping

Server stopped

Player joining server

Player joining server with a different name to their known name

Player leaving server

Player making advancement

Player completing challenge

Player reaching goal

Prefix for death messages (i.e. emojis like :skull_crossbones:)

Postfix for death messages

Discord channel description

Configure Emojis

Configure how messages from Discord appear in the ingame chat (default is senders name in brackets to distinguish from ingame player's messages)

Installation
Dependencies

For Minecraft 1.14.4, 1.15.2 and any version (including snapshots) newer than 1.16.1:

Fabric-Discord-Link requires Fabric API to work. The Fabric-API jar needs to be in your mod folder. For other Minecraft version (including snapshots):

No dependencies required.

Obtaining the binaries

The release binaries are available on curseforge and modrinth.

After downloading the latest version, just drop the jar into the mods folder. Building from source

Download the repository

Follow this guide to setup gradle and build the project

Drop the resulting jar into the fabric mod folder

Acquiring and configuring a Discord Bot

Go to the discord developer portal and register a new Application

Register a new Bot for the application in the  tab to the left

Toggle  to on under  after creating a bot

In the  Tab to the left, select the option under  and select the options  and 

Also select the  permissions if you intend to enable custom channel descriptions.

Copy the URL generated under  and open it in a new tab to add the bot to your discord server

Configuring Fabric-Discord-Link

Start your minecraft server once to let Fabric-Discord-Link generate it's default config 

Turn your server back off

Copy your Bots Token from the Discord Developer Portal and paste it into the empty double quotes behind <"token"> in the config

Obtain the channel IDs of the channels that you want your bot to function in (these can be from separate discord servers).

To do this, you need to enable Discords Developer mode in your Discord Settings under . Afterwards you can right click channels and select  at the bottom

Paste the Discord Chat and/or Log Channel's IDs into the appropriate locations in the config. The IDs need to be in double quotes inside the brackets. If you have more than one Chat or Log Channel you need to separate the channel IDs inside the brackets with commas (no comma behind the last ID)

Configure the other settings in the config to your liking

When you set a certain message type to false, those messages will still go to any logChannel you configured, but they won't be sent to chatChannels

When minecraftToDiscordDiscriminator is set to true, messages sent from Discord into Minecraft will have the exact Discord name, e.g. Bob#1234 instead of just Bob

Restart your server