Is there a way to add tags to a message?

In the chat, is there a way to add tags to the message instead of the speaker?

1 Like

What do you mean – to the message instead of the speaker? What are ‘tags’, exactly? Explain your question more :slightly_smiling_face:

Well, in the “ExtraDataInitializer” module under “ChatModules”, you’re able to add tags to a speaker’s label-thing, such as “[VIP]”, like this…
32%20PM

but I’m wondering if there’s a way to add tags to the message label, and not the speaker label.

1 Like

or at least just in the ChatBar

Do you mean you want the tag to be on the other side? Ex: [CleverSource]: hi [VIP]

yep

I suppose I could just make a whole chatmodule for it

Nvm misunderstood

It looks like messages have a Tags field: messageData.ExtraData.Tags - see the ClientChatModules.MessagesCreatorModules.DefaultChatMessage module.

Using a custom filter command I can do the below, and assign tags to specific messages. See the MeCommand module for an example of a filter command.

messageObj.ExtraData.Tags = {
					{
						TagText = "VIP",
						TagColor = Color3.new(1, 1, 0)
					}
				}
1 Like

I think I could make a module under “ChatModules” and have it edit the message every time a speaker says something.

In MessageCreatorModules.Util there is a method AddTagLabelToBaseMessage() that gets called in MessageCreatorModules.DefaultChatMessage. I believe what you want to do is write your own util module (minimize forking!) that contains its own function like AddTagLabelToBaseMessage(), that adds your special message tag to a passed in base message. You can then modify DefaultChatMessage to use this function where appropriate, in the same manner that’s already written for tags. I believe you can add your own special data to a messageObject.

1 Like

I’m making three whole modules for this lol

Awesome, will the module be open to public?

Depends on if I figure it out and it works…

Why do you want to add Tags to the Message tho?

You can already add it to the Name

Uniqueness?

Well I made my own admin system and I just wanted to add a little tag to the message for if it’s a command

Oh that’s neat, if you need help I can give you a hand I was messing with the Chat script the other day.

You can block commands from ever entering regular chat if you use the Lua chat’s built in command features.
https://wiki.roblox.com/index.php?title=Lua_Chat_System

1 Like

turns out the method “AddTagLabelToBaseMessage” is just the method for adding a tag to the speaker label :confused: gonna have to try a different way

1 Like

Yes it is. I’ve told you to make your own util module and write a new method that’s similar, but does what you want.

1 Like

He’s not trying to block it, that’s also easy to do

You know how /e dance does not show up in chat?

yeah you could just edit that script a little bit and what ever you want to not show up won’t.

I know your intentions and the reason why you mentioned it tho, You can register a string as a command.

The point is he’s trying to add a Tag to it not hide it.

I think he is trying to achieve this

https://gyazo.com/05e09911ff9a8f2c645bb044fc76c59e

@DanPai correct me if I’m wrong


With my current knowledge there is no official way supported by the Default Chat Script to add Tags to the Message Text , I mean you can get what I did in the GIF but there won’t be any color differences because the Message Text is only 1 TextLable

The Chat Tag in front of the Player’s name is a Different TextLable so they share different Properties.