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