Table of Contents

用户相关事件列表

预声明变量

readonly KookSocketClient _client = null;

用户加入语音频道

_client.UserConnected += (user, channel, time) => Task.CompletedTask;

用户退出语音频道

_client.UserDisconnected += (user, channel, time) => Task.CompletedTask;

用户信息更新

_client.UserUpdated += (before, after) => Task.CompletedTask;
_client.CurrentUserUpdated += (before, after) => Task.CompletedTask;

自己新加入服务器

_client.JoinedGuild += guild => Task.CompletedTask;

自己退出服务器

_client.LeftGuild += guild => Task.CompletedTask;

Card 消息中的 Button 点击事件

_client.MessageButtonClicked += (value, user, message, channel) => Task.CompletedTask;
_client.DirectMessageButtonClicked += (value, user, message, channel) => Task.CompletedTask;