#(thesleepin) Hooking message from global chat (carbonchat plugin).
31 messages · Page 1 of 1 (latest)
(thesleepin) Hooking message from global chat (carbonchat plugin).
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.
Might be kind of difficult. How do you normally talk in other chat channels via the plugin?
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
Does doing /channel global automatically make messages typed sent to a global chat?
yes
That makes things more difficult then.
yeah, unluckily
I'm not sure how you're able to check if a message is global or not through denizen.
i know plugin conditionalevents can somehow hook in any possible event from other plugins, is there any alternative in denizen?
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
Did you mean to search for player receives message?
Player
Using this will forcibly sync the chat thread.
player receives message
when a player receives any chat message from the server. This does not normally include *player* chat, instead prefer !event player chats for that.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<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).
"MESSAGE:<ElementTag>" to change the message.
"RAW_JSON:<ElementTag>" to change the JSON used for the message.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Player
Using this will forcibly sync the chat thread.
player chats
message:<matcher> to only process the event if the chat message matches an advanced matcher.
when a player chats.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<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.
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.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
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.
it has prefix [carbon:global] Player: somemessage but it only appears in console
!e console output
Core
console output
when any message is printed to console. (Requires !mechanism system.redirect_logging be set true.)
<context.message> returns the message that is being printed to console.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Carbonchat supports velocity, which denizen can't
If that never changes, than you could use that as a way to catch global messages.
Ah. I see.
i will try it late, thanks!