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
65 stars 36 forks source link

[Support] 1/2 servers set up in multi server mode fails to send messages to discord and both fail to send messages to each other #215

Closed Silverdev2482 closed 7 months ago

Silverdev2482 commented 9 months ago

Checks

Description

I'm trying to set the mod up on my servers but I'm having problems, I'm not sure if the bots are set up correctly, or how to verify that the are but I will report the behavior here, and will give any additional info. The servers are hosted on separate computers, and are on the same network/vpn. I will give any information that is useful. Also I have really struggled with understanding the documentation, it believe it needs improvement, although this probably calls for another issue server-b.json server-a.json

Server A/SMP Normal Chat -> Discord Doesn't work Server A join/leave, start, achievements -> Discord Works Discord -> Server A works Server B/CMP any method -> Discord Works Discord -> Server B Works Server A/B -> the other server Doesn't work.

Xujiayao commented 9 months ago

Log?

Silverdev2482 commented 9 months ago

server-b.log server-a.log These are some of the latest logs from each server, would you like me to try anything and upload the log then?

Xujiayao commented 9 months ago

Thanks. Please designate one of your servers as the main server for MCDC Multi-Server, let's say, Server A. Update the multiServer.host setting of both Servers A and B to the internal IP address of Server A, such as 192.168.xxx.xxx. Remember to start / reload Server A first.

Silverdev2482 commented 9 months ago

I will do that, however server b is temporarily down, but it should be back up in a few days. After setting server a to no multi server mode it still doesn't work. Will this resolve itself upon server b's host being set to server a's ip address? I there something special about setting the server's address to it self rather than localhost? Server B is the one that gets messed with so it would be rebooted a lot and I would prefer server A not needing frequent reboots. On a different question could i set the host to a public ip as long as 5000 is forwarded?

Xujiayao commented 9 months ago

On a different question could i set the host to a public ip as long as 5000 is forwarded?

I think yes. You should also be able to customize the port when using a public IP.

Xujiayao commented 9 months ago

After setting server a to no multi server mode it still doesn't work. Will this resolve itself upon server b's host being set to server a's ip address?

You mean "Server A/SMP Normal Chat -> Discord Doesn't work"?

Silverdev2482 commented 9 months ago

Yes, even when server B is down.

Xujiayao commented 9 months ago

Could you send me your zipped mods folder for me to test?

Silverdev2482 commented 9 months ago

Not right now, however I can send you these mods used on both servers. https://github.com/Silverdev2482/Survival-mods I use nix-minecraft so it should be a perfect copy of a commit in the mod folder, and I believe it is the latest commit on both. Would you like the config directory later too?

Xujiayao commented 9 months ago

Hmmm I'm not certain which mod modifies the in-game chat functionality in your server.

Server A: Please first try setting useWebhook to false and then running /mcdc reload to check if the "Server A/SMP Normal Chat -> Discord Doesn't work" issue is related to Discord Webhook. This will help determine if the issue lies with the webhook configuration.

Silverdev2482 commented 9 months ago

Ok, I will do that when I get home in a few hours. I don't think the basic firewall on the server could be causing any problems, but it is not out of the question.

Xujiayao commented 9 months ago

Take your time! I am going to sleep and will reply later.

Silverdev2482 commented 9 months ago

That appears to make it work. Here is the config directory, please note it is zstd, github just won't allow the file extension. config.tar.zst

Xujiayao commented 9 months ago

The config works well even after turning on useWebhook. Could you send your mods folder's archive of JARs? Thanks

Silverdev2482 commented 9 months ago

Where should I send the compressed archive? It is 76MB so too large to upload on github. Could you simply use packwiz to install my modpack? Also I probably should change my token, as I forgot to censor it.

Xujiayao commented 9 months ago

You may send it via email. The address is specified in my profile. I have tried, packwiz is too complex for me to use as I am not familiar with modpack management software to import the exported modpack. Thanks for understanding.

Xujiayao commented 9 months ago

The provided mods and configs still work well even after turning on useWebhook. It must be a problem with your own Discord side.

  1. Open the manage page of Minecraft chat channel image
  2. Check if webhook is successfully created by the bot (turn on useWebhook) image
  3. No matter yes or no, delete the webhook
  4. Redo everything in the "Setup Discord Bot" step at Docs#Setup-Discord-Bot
  5. Start SMP to test if "Server A/SMP Normal Chat" using webhook works image
Silverdev2482 commented 8 months ago

Ok, I will do that, I have been a bit busy lately.

Silverdev2482 commented 8 months ago

not feeling that good, just a bump so you know I haven't forgotten about this.

Silverdev2482 commented 7 months ago

Temporarily closing because I'm not going to get to this for a while, likely for a few months.