DenisD3D/Mc2Discord

In game chat not going to discord

Closed this issue · 4 comments

Describe the bug

I have chat and info set to go to discord, but only info is working.. - Version mc2discord-forge-1.20.x-4.1.1.jar

Here is snip from my config file..

[Channels]

[[Channels.Channel]]
	# Id of the Discord channel to send messages in (see: https://github.com/DenisD3D/Mc2Discord/wiki/Discord-ids)
	id = 103....9564
	# List of messages types to send that will be sent in this channel. Available values: "info", "chat", "command", "logs"
	subscriptions = ["info", "chat"]
	# Messages format in this channel. Available values: WEBHOOK, PLAIN_TEXT, EMBED
	mode = "WEBHOOK"

Here is error in the console..

[11:02:40] [boundedElastic-12/ERROR] [fr.de.mc.sh.re.co.pu.Operators/]: Operator called default onErrorDropped
fr.denisd3d.mc2discord.shadow.reactor.core.Exceptions$ErrorCallbackNotImplemented: fr.denisd3d.mc2discord.shadow.discord4j.rest.http.client.ClientException: POST /channels/10392....789564/webhooks returned 400 Bad Request with response {code=50035, message=Invalid Form Body, errors={name={_errors=[{code=BASE_TYPE_BAD_LENGTH, message=Must be between 1 and 80 in length.}, {code=USERNAME_INVALID, message=Username cannot be ""}]}}}
Caused by: fr.denisd3d.mc2discord.shadow.discord4j.rest.http.client.ClientException: POST /channels/10392....89564/webhooks returned 400 Bad Request with response {code=50035, message=Invalid Form Body, errors={name={_errors=[{code=BASE_TYPE_BAD_LENGTH, message=Must be between 1 and 80 in length.}, {code=USERNAME_INVALID, message=Username cannot be ""}]}}}
at fr.denisd3d.mc2discord.shadow.discord4j.rest.http.client.ClientResponse.clientException(ClientResponse.java:171) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
Suppressed: fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ Request to POST /channels/10392....789564/webhooks [RequestStream]
*__checkpoint ⇢ Request to POST /channels/10392....789564/webhooks [DefaultRouter]
Original Stack Trace:
at fr.denisd3d.mc2discord.shadow.discord4j.rest.http.client.ClientResponse.clientException(ClientResponse.java:171) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.discord4j.rest.http.client.ClientResponse.lambda$createException$13(ClientResponse.java:149) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1839) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:126) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:224) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:191) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1839) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:129) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:413) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:424) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:478) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:712) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:113) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1383) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1246) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1295) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at fr.denisd3d.mc2discord.shadow.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[mc2discord-forge-1.20.x-4.1.1.jar%23642!/:4.1.1] {re:classloading}
at java.lang.Thread.run(Thread.java:833) ~[?:?] {re:mixin}

Your config file

No response

Can you share your config file with /mc2discord upload ?
It looks like an issue with the bot name field in the [style] section of the config.
Please set it to an empty String "". It should default to the Discord bot name

I'm not sure where u meant for me to upload - I tried https://github.com/DenisD3D/Mc2Discord/upload but it didnt let me..

Anyway - here is how I have style set. I shall try removing the name as you suggested..

[Style]
# Override the bot name in webhook mode ("global" variables are available)
bot_name = "ATM9Bot"
# Override the bot avatar in webhook mode, must be a valid URL to an image ("player" and "global" variables are available)
bot_avatar = ""
# Set the name appearing next to the message when using webhook mode ("global" variables are available)
webhook_display_name = "${player_display_name}"
# URL used to get players head, must be a valid URL to an image ("player" and "global" variables are available)
webhook_avatar_api = "https://mc-heads.net/head/${player_uuid}/right"
# Format used for messages sent in minecraft chat. ("${reply}", "${attachements}", "member", "message", "global" and minecraft formatting variables are available)
minecraft_chat_format = "<Discord - ${member_display_name}> ${reply}${message}"
# Replace ${reply} in minecraft_chat_format if the message has a referenced message. ("member" (author of the referenced message) and "global" variables are available).
reply_format = "Replying to ${member_nickname}: "
# Format used for chat messages in PLAIN_TEXT mode ("player", "message" and "global" variables are available)
discord_chat_format = "${player_display_name}: ${message}"
# If true, bot avatar will be shown in the embed for info messages
embed_show_bot_avatar = false

# Embed colors. A color from https://github.com/DenisD3D/Mc2Discord/wiki/Embed-Colors or a decimal color
[Style.EmbedColors]
	info = "SUMMER_SKY"
	chat = "MEDIUM_SEA_GREEN"
	command = "MEDIUM_SEA_GREEN"
	log = "SUMMER_SKY"

# Presence configuration
[Style.Presence]
	# Message to display under the bot in the member list on Discord ("global" variables are available)
	message = "${online_players} / ${max_players} players"
	# The type of presence (PLAYING, STREAMING, LISTENING, WATCHING, COMPETING)
	type = "PLAYING"
	# Delay between to update of the channel (in seconds, any value below 610 may cause issues)
	update = 60
	# Only if type is STREAMING, ignored for others type, must be a valid youtube or twitch link.
	link = ""

Please delete the whole [Style] section and restart the Discord bot with the /mc2discord restart command
Also /mc2discord upload is a command to easily share the config file.
You could also update to the latest version of the mod.

Thanks, deleting that section and restarting has fixed it.