> For the complete documentation index, see [llms.txt](https://jumpathy.gitbook.io/chat+-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jumpathy.gitbook.io/chat+-documentation/docs/misc.-functions.md).

# Misc. functions

This module has some functions non-related to the chat but can be used interchangeably. I plan on adding more in the future.

### :onPlayer&#x20;

You add a function to this method and it'll be called for all players in the game and any new ones who join.

#### Arguments:

\<function> callback -> function called when a player is detected -> called with \<Instance> (player)

#### Sample code:

```lua
chatPlus:onPlayer(function(player)
    print(player)
end)
```

### :setConfig

{% hint style="warning" %}
This method needs to be called immediately after the game starts in order for it to work properly. Specifically just before the chat loads or it won't work.
{% endhint %}

The default chat system has tens of customizations that most people don't know about, and this module allows you to set it up quickly without forking the chat. Credits for this function and settings list documentation to: <https://devforum.roblox.com/t/changing-chat-type-and-other-chat-settings-without-forking/313614>

#### Arguments:

\<table> {...}

The full list of configurations for this function can be found below:

{% content-ref url="/pages/TchLyMKqbr3ryAjvF923" %}
[Chat settings list](/chat+-documentation/docs/misc.-functions/chat-settings-list.md)
{% endcontent-ref %}

#### Sample code:

```lua
chatPlus:setConfig({
    ["ShowChannelsBar"] = true
})
```

#### Example:

![](https://4256898209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmN4RyN9FVWeA5lfMWzJO%2Fuploads%2F8HUl6r41wc1mAMJ8JQKF%2Fimage.png?alt=media\&token=717227cf-5dc1-4efa-affd-42b9488bbb93)

### :sendFakeMessage

This can be used for things like admin commands ;talk commands etc, it sends a fake message in the chat for everyone to see.

{% hint style="info" %}
For people who may accuse me of making this for scams, that's not the intended function for this method. Unfortunately, this will probably be used to spit out scam games quicker but that part isn't a problem on my behalf because this has always been possible.&#x20;
{% endhint %}

#### Arguments:

\<string> name -> The speaker name

\<string> text -> The message text

\<string> channel (optional, default: 'All') -> The channel it's sent in

\<string> nameColor (optional) -> The speaker's name color (defaults to their default chat color)

#### Sample code:

```lua
chatPlus:sendFakeMessage("ROBLOX","Stop trying to scam people lmao","All")
```

Result:

![](https://4256898209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmN4RyN9FVWeA5lfMWzJO%2Fuploads%2FAI6NNGQTtCWZzlCY0k92%2Fimage.png?alt=media\&token=2e086b12-aa46-4e59-b218-23192f2b26cc)

### :removeTags&#x20;

Remove the specified user's chat tags.

#### Arguments:

\<Instance> player -> The Player in question

#### Sample code:

```lua
chatPlus:removeTags(game.Players.Roblox)
```
