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.

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.