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