Is there a way to add tags to a message?

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.

Maybe this helps?

1 Like

I know what he’s trying to achieve. It seems like he doesn’t know much about the Lua chat and what it can do so I’m suggesting features he could look into if this tag thing he’s trying to implement is a solution to a symptom resultant of not blocking commands from entering chat.

I’ve also suggested seams for where he can modify the Lua chat to include a new text label to accomodate his new tag - with unique color.

1 Like

Yeah… I’m going to just spend some time learning more about the chat system so that I can do this the best way possible.

1 Like

This is the right way to go about it. You’ll have to register a filter function to the ChatService to be able to format the message to your liking.

4 Likes