示例#1
0
        public async Task Ban(Group group, MessageChain who, string reason)
        {
            var at = (At)who.FirstOrDefault(x => x is At);

            if (at != null)
            {
                _service.Ban(at.TargetId, reason);
                await group.SendPlainAsync($"{at.TargetId} has been banned: {reason}.");
            }
        }
示例#2
0
 public static void Ban(this User user, string reason)
 {
     service.Ban(user.Identity, reason);
 }