Skip to main content
Version: 5.9.6

OnSessionListInGuildChannel

public SessionListInChannelHandler OnSessionListInGuildChannel;

Argument

ValueTypeDescription
argsSessionListInChannelEventArgsWhen joining a channel, a list of users who exist in the channel

SessionListInChannelEventArgs

ValueTypeDescription
ErrInfoErrorInfoSuccess/failure information
SessionListListInformation list of all gamers connected to the channel

Description

Looks up the information of all users currently connected to the channel.
It is called only once after successfully entering a chat channel.

In order for an event to be called, the message sending/receiving method must be called.

Example

// First way
Backend.Chat.OnSessionListInGuildChannel = (SessionListInChannelEventArgs args) =>
{
Debug.Log(string.Format("OnSessionListInGuildChannel {0}", args.ErrInfo));
List<string> nameList = new List<string>();

// When successful
if(args.ErrInfo == ErrorInfo.Success)
{
// Adds gamer information to the participant list
foreach(SessionInfo session in args.SessionList)
{
Debug.Log(session.NickName);
nameList.Add(session.NickName);
}
}
else
{
// When failed
Debug.Log("An error occurred while loading the user list : " + args.ErrInfo.Reason);
}
};

// Second way
Backend.Chat.OnSessionListInGuildChannel += (args) => {
// Same logic as the first way
}

Argument cases

When the user information is loaded successfully ErrInfo.Category: Success ErrInfo.Detail: Success ErrInfo.SocketError: Success