The ChatSpeaker object is used to represent a person or bot that can chat.
Properties[]
Name: string []
The name of the speaker.
Methods[]
JoinChannel(channelName: string): void[]
Forces the speaker to connect to the given channel's name.
LeaveChannel(channelName: string): void[]
Forces the speaker to disconnect from the given channel's name.
GetChannelList(channelName: string): array[]
Returns a list of the Speaker's channels.
IsInChannel(channelName: string): bool[]
Returns whether or not the speaker is in the given channel.
SayMessage(message: string, Channel: string, ExtraData: Dictionary): ChatMessage[]
Makes the speaker say the given message and return the ChatMessage created.
SendMessage(message: string, channel: string, fromSpeaker: string): void[]
Sends a message from the given channel to the speaker.
SendSystemMessage(message: string, channelName: string): void[]
GetPlayer(): Variant[]
Returns the Player object associated with this speaker. Returns nil if this speaker does not have a player (for example, a bot).
SetExtraData(key: string, data: Variant): void[]
Sets extra data under a specific key. Whenever a message is sent from this ChatSpeaker, the extra data will be applied to the message.
GetExtraData(key: string): Variant[]
Returns the extra data of the given key, set with SetExtraData.
Events[]
SaidMessage(message: ChatMessage, channel: string)[]
Fires when this speaker sends a message to a channel.
ReceivedMessage(message: ChatMessage, channel: string)[]
Fires when this speaker receives a message from a different speaker.
ReceivedSystemMessage(message: ChatMessage, channel: string)[]
Fires when this speaker receives a system message from a channel.
ChannelJoined(channelName: string, channelWelcomeMessage: string)[]
Fires when this speaker joins a channel.
ChannelLeft(channelName: string)[]
Fires when this speaker leaves a channel.
Muted(channelName: string, nil: string reason =, 0: int duration =)[]
Fires when this speaker is muted.
Unmuted(channelName: string)[]
Fires when this speaker is unmuted.
ExtraDataUpdated(key: string, data: Variant)[]
Fires when this speaker's extra data is updated through SetExtraData.
MainChannelSet(channelName: string)[]
Fires when this speaker's main channel is changed to a different channel.
| Basic Lua types | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Roblox types |
| ||||||||||||||||||||||||||
| API reference only | |||||||||||||||||||||||||||