kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

1.20.4: Different join/quit message in-game and on Discord #2623

Closed v4rl1 closed 6 months ago

v4rl1 commented 6 months ago

Are you using MySQL?

No

Are you using BungeeCord/Velocity?

No

Question

Hello, I'm currently in the process of setting up CCR and it's been really great so far. There was something I am trying to do and I did not manage to achieve yet.

What I am trying to achieve is have a message from a list sent in-game and a message with different formatting sent on Discord (if it in a future update we could send embedd message this way it would be awesome, but one thing at a time)

So in my join/messages I wrote this :

group default
message:
- &8[%server_time_H:mm%] [&aLogin&8] %discordsrv_user_top_role_color_code%{player} &8vient de rejoindre le déjà-là communiste.
then discord 1196666118719406180 [LOGIN] {player} vient de rejoindre le déjà-là communiste.
- &8[%server_time_H:mm%] [&aLogin&8] %discordsrv_user_top_role_color_code%{player} &8veut vendre son journal trotskyste. Fuyez !
then discord 1196666118719406180 [LOGIN] {player} veut vendre son journal trotskyste. Fuyez !

In-game there was one of the two messages displayed, that worked fine, but on the Discord both messages formatted for Discord were displayed at the same time. I'm guessing obviously I didn't write this the proper way, but I did not manage to figure out how I should.

Thanks in advance for your assistance !

kangarko commented 6 months ago

Hello,

I see you are using "then discord" twice. Which does not support indentation, it is read the same as:

group default
message:
- &8[%server_time_H:mm%] [&aLogin&8] %discordsrv_user_top_role_color_code%{player} &8vient de rejoindre le déjà-là communiste.
then discord 1196666118719406180 [LOGIN] {player} vient de rejoindre le déjà-là communiste.
then discord 1196666118719406180 [LOGIN] {player} veut vendre son journal trotskyste. Fuyez !

And the second message line starting with "-" is ignored. Unfortunately at this time it is not possible to have multiple randomly picked messages for Discord, because all of them will be broadcasted at once.