If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/zh/nakama/tutorials/unity/pirate-panic/clans/llm.md — optimized for AI and LLM tools.
/**
* Send an in-app notification to all clan members when a new member joins.
*/constafterJoinGroupFn: nkruntime.AfterHookFunction<void,nkruntime.JoinGroupRequest>=function(ctx: nkruntime.Context,logger: nkruntime.Logger,nk: nkruntime.Nakama,data: void,request: nkruntime.JoinGroupRequest){sendGroupNotification(nk,request.groupId??"",ClanNotificationCode.Refresh,"New Member Joined!");}
/**
* Send an in-app notification to all clan members when one or more members are kicked.
*/constafterKickGroupUsersFn: nkruntime.AfterHookFunction<void,nkruntime.KickGroupUsersRequest>=function(ctx: nkruntime.Context,logger: nkruntime.Logger,nk: nkruntime.Nakama,data: void,request: nkruntime.KickGroupUsersRequest){sendGroupNotification(nk,request.groupId??"",ClanNotificationCode.Refresh,"Member(s) Have Been Kicked!");}
privateasyncvoidCreateClan(){stringname=_clanName.text;try{IApiGroupgroup=await_connection.Client.CreateGroupAsync(_connection.Session,name,"A super great clan.",_avatarImage.name);if(OnClanCreated!=null){OnClanCreated(group);}}catch(ApiResponseExceptione){Debug.LogError("Error creating clan: "+e.Message);}}