#(thesleepin) Hooking message from global chat (carbonchat plugin).

31 messages · Page 1 of 1 (latest)

scenic echo
#

I am making a chat sync between minecraft and discord, I want messages only from the global chat to be sent to a special discord chat.

reef baneBOT
#

(thesleepin) Hooking message from global chat (carbonchat plugin).

reef baneBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

sage timber
#

Might be kind of difficult. How do you normally talk in other chat channels via the plugin?

scenic echo
#

personally i use "!" and configured messages that starts with ! will be synced to chat, but some of players just use /channel global so theirs messages dont hook into discord

sage timber
#

Does doing /channel global automatically make messages typed sent to a global chat?

scenic echo
#

yes

sage timber
#

That makes things more difficult then.

scenic echo
#

yeah, unluckily

sage timber
#

I'm not sure how you're able to check if a message is global or not through denizen.

scenic echo
#

i know plugin conditionalevents can somehow hook in any possible event from other plugins, is there any alternative in denizen?

sage timber
#

While there is a chat hook, I'm not sure if it'll be intercepted by the plugin and if the message will have the formatting.

#

If your chat has prefixes for global chat like [GLOBAL] or something static that you know will appear every time, you might be able to...

#

!e player receives messages

sick dawnBOT
#
Possible Confusion

Did you mean to search for player receives message?

sick dawnBOT
# sage timber !e player receives messages
Group

Player

**WARNING**

Using this will forcibly sync the chat thread.

Event Lines

player receives message

Triggers

when a player receives any chat message from the server. This does not normally include *player* chat, instead prefer !event player chats for that.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.message> returns an ElementTag of the message.
<context.raw_json> returns an ElementTag of the raw JSON used for the message.
<context.system_message> returns true if the message is a system message (not player chat).

Determine

"MESSAGE:<ElementTag>" to change the message.
"RAW_JSON:<ElementTag>" to change the JSON used for the message.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

sage timber
#

Or maybe

#

!e player chats

sick dawnBOT
# sage timber !e player chats
Group

Player

**WARNING**

Using this will forcibly sync the chat thread.

Event Lines

player chats

Switches

message:<matcher> to only process the event if the chat message matches an advanced matcher.

Triggers

when a player chats.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.message> returns the player's message as an Element.
<context.format> returns the chat message's raw format.
<context.full_text> returns the full text of the chat message (ie, the written message with the format applied to it).
<context.recipients> returns a list of all players that will receive the chat.

Determine

ElementTag to change the message.
"FORMAT:<ScriptTag>" to set the format script the message should use.
"RAW_FORMAT:<ElementTag>" to set the format directly (without a format script). (Use with caution, avoid if possible).
"RECIPIENTS:<ListTag(PlayerTag)>" to set the list of players that will receive the message.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

sage timber
#

With an after event.

#

Assuming the full format is given by the plugin.

#

Alternatively, assuming the chat plugin only produces chat channels you could just replicate the entire plugin in denizen and work with that.

scenic echo
sage timber
#

!e console output

sick dawnBOT
# sage timber !e console output
Group

Core

Event Lines

console output

Triggers

when any message is printed to console. (Requires !mechanism system.redirect_logging be set true.)

Context

<context.message> returns the message that is being printed to console.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

scenic echo
sage timber
#

If that never changes, than you could use that as a way to catch global messages.

#

Ah. I see.

scenic echo