Channel Object

Channels are where all the messages in the chat are seen and interacted with. This module simplified them and added a method to get the direct channel from Roblox's built-in API if this module doesn't fit your needs.

:systemMessage

This method creates a system message in the channel, all users in the channel will see it.

Arguments:

<string> text -> the system message

Sample code:

local channel = chatPlus:getChannel("All")
channel:systemMessage("Hello world!")

Result:

:setWelcomeMessage

This method sets the channel's welcome message, for example the default welcome message is "Chat '?' or '/help' for a list of chat commands".

Arguments:

<string> text -> the system message

Sample code:

local channel = chatPlus:getChannel("All")
channel:setWelcomeMessage("It's been Jumpathy all along!") --> wandavision reference

Result:

:assignUser

This method places a player in the channel, by default nobody will have access to it.

Arguments:

<Instance> Player -> the player you want to have in the channel

Sample code:

local channel = chatPlus:getChannel("VIP")
channel:assignUser(game.Players.ROBLOX)

:removeUser

This method removes a player from the channel.

Arguments:

<Instance> Player -> the player you want to have out of the channel

Sample code:

local channel = chatPlus:getChannel("VIP")
channel:assignUser(game.Players.ROBLOX)
task.wait(1)
-- SIKE
channel:removeUser(game.Players.ROBLOX)

:remove

This method just destroys the channel lmao

Arguments:

<void>

Sample code:

local channel = chatPlus:getChannel("VIP")
channel:remove() --> bye bye vip channel

:getRawChannel

If you're weird and need this, you can get the direct channel object provided by Roblox. Documentation for that here:

Arguments:

<void>

Sample code:

local channel = chatPlus:getChannel("VIP")
print(channel:getRawChannel()) --> magical channel table

Last updated