How do you detect whether a player is using whisper or team chat in TextChatService?

I’m making a system where when you talk in team chat or whisper, your bubble is a different color, but I can’t seem to find any documentation about detecting when a message is sent using either of these.

Closest i’ve found is TextChatCommand.Triggered() but it doesn’t seem to fire and i don’t think it’s what i’m looking for.

You might just be able to check if the message has /whisper in it when sent, If it doesn’t work then I have no idea :person_shrugging:

1 Like

When using /Whisper or /Team, you are put into a new text channel, just check if the current text channel is RBXTeam or RBXWhisper.

if string.find(message.TextChannel.Name, "Team") then
	print("Team Message")
elseif string.find(message.TextChannel.Name, "Whisper") then
	print("Whisper Message")
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.