Channels

Why not?

Channels are cool, but sometimes confusing to set up. This module also simplifies that (somewhat)

circle-info

The default chat channel if you need it for some reason with the ':getChannel' method is 'All'.

:createChannel

This method creates a chat channel object, more on those below.

Arguments:

<string> name -> Chat channel name

Sample code:

-- This creates a VIP channel and assigns everyone to it
-- (planning on adding the AutoJoin property later chat nerds lol)

local channel = chatPlus:createChannel("VIP")
channel:setWelcomeMessage("Only vip people can see this!")

chatPlus:onPlayer(function(player)
    channel:assignUser(player)
end)

Result:

circle-info

In order to show the channels bar like below, check out the 'setConfig' method in the 'Misc. functions' category of the documentation.

Returns:

Channel Objectchevron-right

:getChannel

This method gets a chat channel object, more on those below.

Arguments:

<string> name -> Chat channel name

Sample code:

Returns:

Channel Objectchevron-right

Last updated