Channels

Why not?

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

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:

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

Returns:

pageChannel Object

:getChannel

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

Arguments:

<string> name -> Chat channel name

Sample code:

local channel = chatPlus:getChannel("All")

Returns:

pageChannel Object

Last updated