Skip to content

Discord

Matej edited this page Nov 9, 2024 · 23 revisions

With ChatControl, you can connect your channels to Discord. You can even send any message such as alert staff about ads or misbehavior, or broadcast death messages to any Discord channel!

There are some IMPORTANT notes at the bottom of this page, make sure to check them out.

IMPORTANT: Ensure to give your bot the ability (permission) to delete/manage messages.

DUPLICATE MESSAGES: To avoid duplicated messages, set DiscordChatChannelMinecraftToDiscord to false in DiscordSRV/config.yml.

Installation

1) Enable debug

Set "Debug" key in settings.yml to "[discord]" and restart. This will save you HOURS and print out what is happening to the console. After you're finished setting up, you can remove this key.

2) Install DiscordSRV

Install DiscordSRV to get started.

Warning: DiscordSRV updates frequently and tends to break the API. If you get any errors ask them first.

3) Create bot and connect DiscordSRV

Configure DiscordSRV as per this guide on its resource page (just scroll below and you will see it).

IMPORTANT: Ensure to give your bot the ability (permission) to delete/manage messages.

NOTICE: The image below may get outdated really fast, please check this link for up to date info on connecting discord.

joke

4) Link channels in DiscordSRV

Copy the channel ID of your channels you want connected. Open up Discord client, right click your channel and select Copy ID.

Copy ID

Now open up config.yml in plugins/DiscordSRV. Insert , "channel-name": "channel-id" at the end of Channels or without the initial ',' in case your Channels are empty. Use the exact channel names as you have on Discord. This is how multiple connected channels look like:

discord channels json

5) Link channels in ChatControl Red

Finally, open ChatControl's settings.yml, go to Channels.List section and paste the channel's ID to the Discord_Channel_Id key for channels you want connected.

Do this for ALL your servers that you want to link to the Discord channel.

Link ChatControl

6) (Optional) Send Discord messages from rules

You can use the then discord operator in Rules, such as then discord 753251852451053598 Hello world!. Specify the Discord channel ID and the message you want to send there.

Notes

Permissions

Ensure to give your bot the ability (permission) to delete/manage messages.

Proxy (BungeeCord/Waterfall, Velocity, Redis etc.)

If you have proxy enabled, and your channel has Discord on, we will send it both to proxy and to Discord. If the other server has DiscordSRV installed, it will not send it to Discord to avoid duplication.

If however, you send a message from a server on your network which lacks DiscordSRV but the channel has Discord enabled, it will try to find another network server which has Discord.Forward_From_Proxy on true in settings.yml and DiscordSRV installed and try forwarding the message to Discord through that server.

Rules and mentions

If you want rules and filtering for your Discord, the @ mentions or your other Discord plugin may not work.

When you send a message to Discord, by default we have to unsend it and send it again through our own system. This is because Discord doesn't let developers to edit messages sent by other players. This makes filtering functional but poses some limitations. You can turn this off in Discord section of settings.yml, see:

a

Clone this wiki locally