Closed AleGuzAva closed 10 months ago
Hello.
My understanding is that the four pictures you sent are four different channels of the same guild, and the MCDC config of the four servers each uses different botToken
and channelId
, and useWebhook
is set to true
. Am I correct?
Also, please send the log file of the four servers for me to have a look.
Good evening,
You are correct, they are four different channels, but they're all part of the same Discord Guild. All four servers also each use a unique botToken, channelId, and useWebhook is set to true for all four of them.
Working Properly: Purple Server: https://paste.helpch.at/cubolexuva.makefile
Not Working Properly: Dusk Server: https://paste.helpch.at/jekapazoni.makefile Gold Server: https://paste.helpch.at/mavomufufo.makefile Green Server: https://paste.helpch.at/ehufolirap.sql
Thanks. Please try updating to MCDC 2.2.5 first. In addition, are these logs the same log file when taking the screenshot? If not, I would want the log file at that time.
I updated to MCDC 2.2.5 and that fixed all the issues I was having! Thank you very much for the assistance =)
Nice!
Hello! Sorry for reviving this ticket after it closed, although the mod was working normally when I updated to MCDC 2.2.5, it seems to have stopped working. However, this time it isn't Purple which is working, instead it is my Dusk server that is functional while the other three aren't. According to players who were online around that time, it seems that it "broke" after each server restart.
These are the latest logs from each server: Dusk: https://paste.helpch.at/siyetuqoce.makefile Gold: https://paste.helpch.at/xumocubawu.makefile Green: https://paste.helpch.at/acelemarok.makefile Purple: https://paste.helpch.at/mukiwimiqi.makefile
Attached are the four screenshots showing what is happening as of this post (same time as the latest.logs). They are posted in the following order: Dusk, Gold, Green, Purple.
Found the problem, it seems to be caused by Webhook. I will try to reproduce and solve this issue tonight when I have free time. During this period, you can first set useWebhook
to false
to ensure basic chat functionality on each server.
[15:01:01] [ForkJoinPool.commonPool-worker-1/ERROR]: RestAction queue returned failure: [ErrorResponseException] 10015: Unknown Webhook
net.dv8tion.jda.api.exceptions.ContextException: null
at net.dv8tion.jda.api.exceptions.ContextException.here(ContextException.java:54) ~[net_dv8tion_jda-5.0.0-beta.18-7e0acf4837b6ce56.jar:?]
at net.dv8tion.jda.api.requests.Request.<init>(Request.java:77) ~[net_dv8tion_jda-5.0.0-beta.18-7e0acf4837b6ce56.jar:?]
at net.dv8tion.jda.internal.requests.RestActionImpl.queue(RestActionImpl.java:197) ~[net_dv8tion_jda-5.0.0-beta.18-7e0acf4837b6ce56.jar:?]
at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:572) ~[net_dv8tion_jda-5.0.0-beta.18-7e0acf4837b6ce56.jar:?]
at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:538) ~[net_dv8tion_jda-5.0.0-beta.18-7e0acf4837b6ce56.jar:?]
at top.xujiayao.mcdiscordchat.Main.onInitializeServer(Main.java:123) ~[mcdiscordchat-1_20_1-2.2.5-4e3741fc55859dfb.jar:?]
at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:383) ~[fabric-loader-0.14.24.jar:?]
at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:64) ~[fabric-loader-0.14.24.jar:?]
at net.minecraft.server.Main.main(Main.java:112) ~[server-intermediary.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.14.24.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.14.24.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.14.24.jar:?]
at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.14.24.jar:?]
at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-launch.jar:0.11.2]
I see now. MCDC tried to create webhooks with the same name as "MCDC Webhook" in different channels, but Discord only allows all channels in the entire guild to have only one webhook named "MCDC Webhook". Webhooks previously created by three other servers are all overwritten by the last server.
To solve this issue, you need to enable the multi-server function of MCDC, which names the webhook as, for example, "MCDC Webhook (Purple)".
The following is a recommended configuration, assuming you do not want servers of different colours to be able to see each other's messages in-game. Please replace the botId
with the MCDC Bot ID of the colour server.
Dusk
"multiServer": {
"enable": true,
"host": "127.0.0.1",
"port": 5001,
"name": "Dusk",
"botIds": [
"Dusk's Bot ID"
]
},
Gold
"multiServer": {
"enable": true,
"host": "127.0.0.1",
"port": 5002,
"name": "Gold",
"botIds": [
"Gold's Bot ID"
]
},
Green
"multiServer": {
"enable": true,
"host": "127.0.0.1",
"port": 5003,
"name": "Green",
"botIds": [
"Green's Bot ID"
]
},
Purple
"multiServer": {
"enable": true,
"host": "127.0.0.1",
"port": 5004,
"name": "Purple",
"botIds": [
"Purple's Bot ID"
]
},
Hello! I've tried your suggestions and they seem to be working perfectly. We have our next server restarts taking place in about 5-6 hours so I'll come back and update this to confirm if it works or not after the restarts.
Thank you!
Ok 👍
It works perfectly 👍🏽 thank you for all the assistance! Especially setting up the configs for me, you didn’t have to but I appreciate you going above and beyond :)
You're welcome.
The main reason why I suggest the config for you is that I believe you treat your four servers independently and do not communicate with each other. If port
of all servers are set to 5000
, I think you may get results that are not what you want.
If you want to try this function and decide whether to use it or not, you may set all port
to 5000
, add all four bot IDs to the config of all four servers (link with commas), then run MCDC /reload
command one by one (i.e. no need to restart server).
Checks
Description
I currently run 4 Minecraft Servers under the same network, and I set up four MCDC Discord Bots for each server. When I set up the channels, there's a weird issue going on where even though all 4 bots are online, only one bot actually sends chat messages. The other three servers only send Login/Logout and Server Start/Stop.
All Bots were set up identically and have identical permissions, only one works at random though.
Each Bot is supposed to only send messages to one channel. The images below show what I mean: Only the Purple Bot is correctly sending discord and chat messages, but the other bots (Dusk, Green, Gold) only send Login/Logout.
How can I fix this issue?