Closed Microjett closed 3 months ago
Could you send a screen of the message that was sent on the Discord channel when the error occured ? Denis
Hi Denis,
This was the message sent. The first one directly from Discord worked fine and appeared in MC chat.
But the 2nd comes from another mc server running plexiglass mountain and this one appeared to cause the stacktrace above.
Edit: I should say the other server is also using mc2discord to send messaging from mc plexiglass mountain
Hi Denis, Might have found some more about this. I started with two fresh 1.18.2 forge only servers with no other mods.
Setup both of these with mc2discord and configured two different bots for each server and changed the relay_bot_messages to true in both configs.
With no other changes made to default configs mc2discord was able to relay the server started messages and the player join messages from the other server. but only then crashed with the error in above description when an actual player message was sent.
[13:37:07] [Server thread/INFO] [ne.mi.se.pe.PermissionAPI/]: Successfully initialized permission handlerforge:default_handler [13:37:07] [Server thread/INFO] [Mc2Discord/]: Mc2Discord started as chat-test2#0336 [13:37:09] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-3/INFO] [Mc2Discord/]: Mc2Discord started as chat-test2#0336 [13:37:43] [d4j-events-1/INFO] [minecraft/DedicatedServer]: <Discord - Microjet> test [13:38:13] [d4j-events-3/INFO] [minecraft/DedicatedServer]: <Discord - chat-test1> Microjet joined the game [13:38:24] [d4j-events-2/ERROR] [fr.de.mc.sh.re.co.pu.Operators/]: Operator called default onErrorDropped fr.denisd3d.mc2discord.shadow.reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.NoSuchElementException: No value present Caused by: java.util.NoSuchElementException: No value present
So this issue seems to be related to the player name in discord being used instead of the bots actual name?
Also another note, when using PLAIN_TEXT mode this does seem to work. The above failed testing was using WEBHOOK mode. I also tried to use EMBED mode but the message content was not being passed on to the target server so the target server was having empty messages.
Error is happening due to the bot looking to get informations that doesn't exist for websites messages. I'm gonna need to do an update Thanks for investigating
Describe the bug
Hi There, Trying to use relay_bot_messages option however I'm getting a No Value Present error in minecraft when trying to send a message from another bot. Any idea what config changes are needed to fix this ?
This is on 1.20.1 Fabric
[02:25:06] [d4j-events-1/ERROR]: Operator called default onErrorDropped fr.denisd3d.mc2discord.shadow.reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.NoSuchElementException: No value present Caused by: java.util.NoSuchElementException: No value present at java.util.Optional.get(Unknown Source) ~[?:?] at fr.denisd3d.mc2discord.core.events.DiscordEvent.onMessageCreate(DiscordEvent.java:39) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:160) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.tryOnNext(FluxContextWrite.java:115) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxDoFinally$DoFinallyConditionalSubscriber.tryOnNext(FluxDoFinally.java:172) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.tryOnNext(FluxPeekFuseable.java:530) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxHandleFuseable$HandleFuseableConditionalSubscriber.tryOnNext(FluxHandleFuseable.java:559) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.tryOnNext(FluxMapFuseable.java:317) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.tryOnNext(FluxFilterFuseable.java:367) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPublishOn$PublishOnConditionalSubscriber.runAsync(FluxPublishOn.java:992) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPublishOn$PublishOnConditionalSubscriber.run(FluxPublishOn.java:1067) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.scheduler.forkjoin.ForkJoinPoolScheduler$DisposableWorkerTask.run(ForkJoinPoolScheduler.java:443) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at fr.denisd3d.mc2discord.shadow.reactor.scheduler.forkjoin.ForkJoinPoolScheduler$Worker.processTaskQueue(ForkJoinPoolScheduler.java:407) ~[mc2discord-fabric-1.20.1-4.2.3.jar:?] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(Unknown Source) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) ~[?:?]
Your config file