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}."); } }
public static void Ban(this User user, string reason) { service.Ban(user.Identity, reason); }