Xujiayao / Discord-MC-Chat

Discord-MC-Chat (DMCC), formerly known as MC-Discord-Chat and MCDiscordChat (MCDC), is a practical and powerful Fabric and Quilt Minecraft <> Discord chat bridge inspired by BRForgers/DisFabric
https://blog.xujiayao.com/posts/4ba0a17a/
MIT License
63 stars 36 forks source link

[Bug] Server is double-sending all chat and server messages #197

Closed Nanosplitter closed 2 months ago

Nanosplitter commented 11 months ago

Checks

Minecraft Version

1.18.2

MC-Discord-Chat Version

Latest Build

Description

It seems there is an extra Server webhook send that is duplicating everything that should be sent to the channel. I'm not sure how to fix this.

image

To Reproduce

I just followed the setup instructions here: https://blog.xujiayao.top/posts/4ba0a17a/

Log

latest.log

Config

{
  "generic": {
    "language": "en_us",
    "botToken": "[REDACTED]",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "914293049927024686",
    "consoleLogChannelId": "914548440896274432",
    "updateNotificationChannelId": "",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": false,
    "broadcastSlashCommandExecution": false,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": false,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "whitelistRequiresAdmin": true,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": true,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": [340690145324040192]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "messageWithoutWebhook": "",
    "messageWithoutWebhookForMultiServer": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.2.2",
  "latestCheckTime": 1698211375341
}
Xujiayao commented 11 months ago

You did not make the correct statement about your version of MC-Discord-Chat.

Nanosplitter commented 11 months ago

Oh sorry, I thought I downloaded the latest version from curseforge. Do I not have the latest version?

Xujiayao commented 11 months ago

Latest build is not equivalent to Latest Release

image

Xujiayao commented 11 months ago

CurseForge requires manual review before publishing, so there is a delay on new releases. Current latest is 2.2.3.

But do not download it, cuz 2.2.3 does not work on 1.18.2 at all. Fixing

Xujiayao commented 11 months ago

MC-Discord-Chat-2.2.3.jar.zip

You may use this as a temporary fix.

This also proves that there are very few people using the old version of MC, otherwise such a serious problem should have been reported long ago. Thanks for reporting :)

Xujiayao commented 9 months ago

This issue's related feature (console <> discord messaging) has been removed in versions 1.18.2 and below due to compatibility issues.

Xujiayao commented 2 months ago

This issue's related feature (console <> discord messaging) has been removed in versions 1.18.2 and below due to compatibility issues.

Changed the method of how the server process /say commands, and restored the feature in version 1.18.2 and below.