Skip to main content
Version: 5.9.6

ChatToChannel

public bool ChatToChannel(ChannelType type, string message);

Parameters

ValueTypeDescription
typeChannelType(enum)Type of the channel to which the message is sent. ChannelType.Public(normal) or ChannelType.Guild(guild)
messagestringContent of the chat message to be sent

Description

A message is sent to the currently connected channel. The message cannot exceed 512 bytes.

Example

Backend.Chat.ChatToChannel(ChannelType.Guild, "Nice to meet you.");

When the length of the chat message attempted to be sent exceeds 512 bytes Maximum chat size is 512 byte

When an attempt is made to send a message without connecting to a chat channel Not connected.(0)

When an attempt is made to send a message even though the connection to the chat channel is not complete(OnJoinChannel event has not been called) Not connected.(1)