Open TyBraniff opened 6 months ago
Also restarting generates this error
[06May2024 23:18:35.957] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-5/INFO] [fr.denisd3d.mc2discord.shadow.discord4j.core.shard.LocalShardCoordinator/]: [G:6cd5b1fe, S:0] Shard disconnected
[06May2024 23:18:35.958] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-5/INFO] [fr.denisd3d.mc2discord.shadow.discord4j.core.shard.GatewayBootstrap/]: [G:6cd5b1fe, S:0] All shards disconnected
[06May2024 23:18:35.966] [Server thread/INFO] [fr.denisd3d.mc2discord.shadow.discord4j.core.DiscordClientBuilder/]: Discord4J 3.3.0-RC1 (https://discord4j.com)
[06May2024 23:18:35.967] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Mc2Discord restarted
[06May2024 23:18:36.417] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-8/INFO] [fr.denisd3d.mc2discord.shadow.discord4j.gateway.DefaultGatewayClient/]: [G:751960d1, S:0] Connected to Gateway
[06May2024 23:18:36.418] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-8/INFO] [fr.denisd3d.mc2discord.shadow.discord4j.core.shard.LocalShardCoordinator/]: [G:751960d1, S:0] Shard connected
[06May2024 23:18:36.600] [boundedElastic-5/ERROR] [fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators/]: Operator called default onErrorDropped
fr.denisd3d.mc2discord.shadow.reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.ClassCastException: Cannot cast fr.denisd3d.mc2discord.shadow.discord4j.core.object.entity.channel.ForumChannel to fr.denisd3d.mc2discord.shadow.discord4j.core.object.entity.channel.TopLevelGuildMessageChannel
Caused by: java.lang.ClassCastException: Cannot cast fr.denisd3d.mc2discord.shadow.discord4j.core.object.entity.channel.ForumChannel to fr.denisd3d.mc2discord.shadow.discord4j.core.object.entity.channel.TopLevelGuildMessageChannel
at java.lang.Class.cast(Class.java:3889) ~[?:?]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2400) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2196) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2070) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Mono.subscribe(Mono.java:4490) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:203) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:180) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:224) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxFilter$FilterConditionalSubscriber.onNext(FluxFilter.java:247) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at fr.denisd3d.mc2discord.shadow.reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[mc2discord-forge-1.20.1-4.2.3.jar%23729!/:4.2.3]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
[06May2024 23:18:36.978] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-8/INFO] [Mc2Discord/]: Mc2Discord started as Block Buddy#5842
After more investigation, the Discord library doesn't support yet webhook for thread channels. See https://github.com/Discord4J/Discord4J/issues/1174 for progress.
After more investigation, the Discord library doesn't support yet webhook for thread channels. See Discord4J/Discord4J#1174 for progress.
A PR to fix that has been created: https://github.com/Discord4J/Discord4J/pull/1232 ;)
However, the second error is not related to this. A ForumChannel
is not a TopLevelGuildMessageChannel
. The first common type is BaseTopLevelGuildChannel.
Please also note that a TopLevelGuildMessageChannel
does not mean that threads can be created within, as a VoiceChannel
is a TopLevelGuildMessageChannel
but cannot have threads. This PR aims to partially fix this issue by adding a TopLevelGuildMessageWithThreadsChannel
interface; however, ThreadChannel
nor ForumChannel
extends it. You will unfortunately have to change some logic in your mod :(
Thanks for the update. TopLevelGuildMessageChannel was first used because it was common to all channels supporting text message, will make some change to support your feature as soon as it get merge :+1:
Describe the bug
Having an error stating source is empty.
Part of me feels its because I'm using a Forum channel instead of a main channel. Our gaming community runs all of our servers in forum topics.
The main channel ID is
1021543376941748306
and the thread is1218778350718287872
I attempted to use
1021543376941748306/1218778350718287872
however that gave me errors when reloading the mod.The bot loads and partially works. Just cant send messages to discord. But wont fire back messages.
Your config file
http://m2d.denisd3d.fr/uploads/view?key=6953c16e-cdb6-4b78-9136-49da01e34f22