群聊相关API

bot.MessageReceived.OfType<GroupReceiver>().Subscribe(async msg =>
{
    //具体看表格
})
名称调用方法说明
禁言msg.Sender.Ban(10)单位:秒
解禁msg.Sender.NoBan()
戳一戳msg.Sender.Touch()
踢出群聊msg.Sender.Kick()
设置头衔msg.Sender.SetSpecialTitle()
设置为管理员msg.Sender.SetAdmin()
移除管理员msg.Sender.RemoveAdmin()
设置成员群名片msg.Sender.SetCard()
成员资料卡点赞msg.Sender.Like()

群成员相关API

Member和上面的Sender是同一个对象,所有API同上。

群相关API

var bot = new Bot(new Config())
var group = bot.Groups.FirstOrDefault();
名称调用方法说明
群成员group.Members
被禁言列表group.BanList
群精华消息group.EssenceMsg
群文件系统信息group.FilesSystemInfo
群根目录group.RootFiles
群荣誉group.Honor
群公告group.Notice
群系统消息group.SystemMsg不知道什么结果哦
机器人可@全体成员的剩余次数group.AtAllCount如果机器人不是管理,次数为0
全体禁言/取消禁言group.AllBan(true/false)
获取群历史聊天group.GetHistoryMsg()
群打卡group.Sign()
发送群公告group.SendNotice()我没有发送成功,暂不知哪里出了问题
退出群聊group.Leave()
设置群名group.SetName()
创建文件夹group.CreateFolder()
上传到群文件group.UploadFilesByPath()UploadFilesByUrl(),UploadFilesByBase64()
设置群备注group.SetGroupRemark()
机器人可@全体成员的剩余次数group.AtAllCount

好友相关API

var bot = new Bot(new Config())
var friend = bot.Firends.FirstOrDefault();
上传文件friend.UploadFilesByPath()friend.UploadFilesByUrl(),friend.UploadFilesByBase64()
成员资料卡点赞friend.Like()

频道相关API

var bot = new Bot(new ReverseConnectConfig())
频道系统内BOT的资料bot.GuildBotInfo
频道列表bot.GuildList
频道元数据bot.GuildList[0].GuildMeta
频道角色列表bot.GuildList[0].Roles
频道成员列表bot.GuildList[0].GuildMember()
频道成员更多信息bot.GuildList[0].GuildMember()[0].MoreInfo
设置角色bot.GuildList[0].GuildMember()[0].SetRole()
移除角色bot.GuildList[0].GuildMember()[0].RemoveRole()
频道成员列表bot.GuildList[0].GuildMember()
子频道列表bot.GuildList[0].Channels()
获取频道帖子广场帖子bot.GuildList[0].GuildFeeds()

其他API

var bot = new Bot(new Config())
名称调用方法说明
登录用户信息bot.LoginInfo
群列表bot.Groups
好友列表bot.Friends
手机电池信息bot.Battery
shamrock启动时间bot.StartTime
获取好友系统消息bot.FriendSysMsg未能正确获取到数据
登录用户信息bot.LoginInfo
是否在黑名单中bot.InBlack(123)
是否在黑名单中bot.InBlack(123)
获取图片bot.GetImage("md5")不知道可用不可用
获取语音bot.GetRecord("md5")不知道可用不可用
要使用此接口, 需要安装ffmpeg, 请参考 OpenShamrock 文档
获取消息bot.GetMsg(123)
获取历史消息bot.GetHistoryMsg(MessageType.Text)
设置QQ个人资料bot.SetQQProfile(new())
清除本地缓存消息bot.ClearMsgs()
获取陌生人资料bot.StrangerInfo(132)
日志bot.GetLog()
Last Updated:
Contributors: Jaffoo