New Chat System Now Live!

I was confused about this as well. Is there any way to create channels as a user, or are they all developer-defined? Regardless of what the developer defines, I’d think that it’d be useful for parties of friends to be able to chat as a group in private, so if that’s not already possible there’s a suggestion for you.

oups, that’s an old version of the chat with that problem. that’ll be fixed.

Okay. We’ll be taking a look at this.

Click to whisper exists in chatsettings.

We’re working on some UI for users to be able to create channels. An existing example of this would be the whisper module, it creates a channel for every whisper player-to-player pair when the whisper happens.

2 Likes

Can you put it at these two places if it isn’t too late?

399088704
393507963

Thank you :smiley:

1 Like

Could someone give a code example of how to use the following. Is it client only? What can I return? etc:

void RegisterProcessCommandsFunction(string functionId, function func)

RegisterProcessCommandsFunction is the server side way of implementing chat commands. We will have more/better documentation on these soon. For now, the best way to see how it is done is to look through the default chat commands, and see how they are done.

This is the simple /? command to list the available commands. The ProcessCommandsFunction function returns true if it processed the message, or false otherwise.

If you have something specific you want to implement, I can give you advice on the best way to do it.

2 Likes

We’ve observed another glitch.

Upon changing teams (we used an scripted button to do so), my chat color does not change to the corrosponding team, and remains yellow; as my old team.

1 Like

Yeah, the new chat does not pay attention to team updates. Someone actually submitted a pull request to fix this, so it should be fixed soon. https://github.com/ROBLOX/Core-Scripts/pull/633

1 Like

What do I have to require to get ChatService? Or do I have to put a module somewhere specific?

The easiest way to do this is to put a module in the chat modules folder. Press play solo in your game that is signed up to the beta, then copy contents of Chat. Exit play solo and paste these in Chat. Then add a module to the ChatModules folder in Chat. This module should return a single function, that will be called with a reference to the ChatService.

1 Like

Is there any way to do it without having a module within the chat? e.g. waiting for the chat and requiring it?

This is possible, but is not really advisable. If you do it this way, you make assumptions about where the chat is located and how it is structured. If you have a folder called ChatModules in Chat, this is guaranteed to work in the future.

Here is how you would do this externally, but I really would advise against it.


local ServerScriptService = game:GetService("ServerScriptService")
local ChatServiceRunner = ServerScriptService:WaitForChild("ChatServiceRunner")
local ChatService = require(ChatServiceRunner:WaitForChild("ChatService"))


local function ProcessCommandsFunction(fromSpeaker, message, channel)
	if message == "/helloworld" then
		print("Hello world")
		return true
	end

	return false
end

ChatService:RegisterProcessCommandsFunction("hello_world", ProcessCommandsFunction)
2 Likes

If I waited for the chat modules folder and then cloned my module into that would it work?

My problem with your way is my admin is currently self contained and requires no setup bar config, so I’d prefer a way of being able to register the commands function externally or via an external script cloning a module somewhere.

The /me command should be discarded/updated - it’s being used to impersonate administrators/talk differently.

Currently if you copy modules into ServerStorage.ChatModules at run time, these will be ran when they are added. I just realised that we may not need to put ChatModules in ServerStorage and can instead keep them in Chat. If I made this change, you would be able to copy modules into Chat.ChatModules at run time and have it be guaranteed to work. I will try this out and let you know if we will do this.

2 Likes

Added those two places to the beta :slight_smile:

1 Like

Just a personal preference.

Can the chat be loaded from the bottom, not the top? I typically look at the bottom of the chat window when looking for the most recent posts.

This is referenced specifically on server startup, when it is empty.

I also prefered the red dots next to names over the brackets, it was much cleaner and modern.

1 Like

Can we get a “drag” button in the right corner down.
I like to make the chat bigger and smaller.

There is a setting for this in ClientChatModules.ChatSettings. The setting is WindowResizable. We will have better documentation for what settings are available soon.

1 Like