Discord Webhook

MCSync: Discord Webhook Integration Guide

This guide will help you set up the Discord webhook feature for MCSync, allowing in-game Minecraft chat to be mirrored in a designated Discord channel.


Table of Contents

  1. Introduction
  2. Enabling the Webhook in MCSync
  3. Creating a Discord Webhook
  4. Testing the Webhook
  5. Troubleshooting

Introduction

MCSync provides seamless integration between your Minecraft server and Discord. By enabling the webhook feature, you can relay in-game chat messages to a specific Discord channel, keeping your community connected at all times.


Enabling the Webhook in MCSync

To enable and configure the webhook feature in MCSync:

  1. Locate the MCSync configuration file, typically found at .../plugins/MCSync/config.yml.

  2. Open the file in your preferred text editor.

  3. Find the following settings and update them as follows:

    • Change discordWebhookEnabled to true.
    • Paste your Discord webhook URL into the discordWebhookURL field.

    Example:

    • discordWebhookEnabled: true
    • discordWebhookURL: 'YOUR_WEBHOOK_URL'
  4. Save the changes to the file.

  5. Restart your Minecraft server to apply the changes.


Creating a Discord Webhook

To create a webhook in Discord:

  1. Open Discord and navigate to your server.

  2. Go to Server Settings:

    • Click your server's name at the top-left corner.
    • Select Server Settings from the dropdown menu.
  3. In the left-hand menu, select Integrations and find the Webhooks section. Click Create Webhook.

  4. Configure the webhook:

    • Give your webhook a name, such as "MCSync Chat".
    • Select the channel where you want in-game chat messages to appear.
  5. Copy the webhook URL by clicking the Copy Webhook URL button.

  6. Save your changes.


Testing the Webhook

After setting up the webhook:

  1. Ensure the MCSync configuration file is correctly updated with discordWebhookEnabled set to true and a valid webhook URL in discordWebhookURL.

  2. Restart your Minecraft server to load the new settings.

  3. Send a message in the in-game chat. It should appear in the designated Discord channel.


Troubleshooting

If the webhook doesn’t work as expected:

  • Check the Configuration File:

    • Make sure discordWebhookEnabled is set to true and the webhook URL is correctly entered.
  • Review Discord Permissions:

    • Confirm that the webhook is active and the bot has permission to send messages in the selected channel.
  • Examine Server Logs:

    • Look for errors in your Minecraft server logs or console output related to MCSync.
  • Test the Webhook Directly:

    • Use a tool like Postman or curl to manually test the webhook URL and confirm it’s functioning.

Example Configuration

Here’s an example of how your configuration settings should look:


By following this guide, you can seamlessly integrate your Minecraft server's in-game chat with Discord using MCSync. If you need further assistance, contact the MCSync support team or check the official documentation.