public override async Task Act() { Global.currentTask[GroupId] = null; await session.SendGroupMessageAsync(GroupId, new PlainMessage("正在向服务器发送禁言请求,请注意,若禁言的对象是机器人本身或权" + "限高于等于机器人的对象,则不会生效")); await session.MuteAsync(ObjectId, GroupId, BanSpan); }
public static void Mute(this MiraiHttpSession session, long memberId, long groupNumber, TimeSpan time) { AsyncHelpers.RunSync(() => session.MuteAsync(memberId, groupNumber, time)); }
public static Task MuteGroupMemberAsync(long groupID, long qqID, TimeSpan duration) => session.MuteAsync(qqID, groupID, duration);