public async Task SetCaptchaAction(CaptchaConfig.Action action = CaptchaConfig.Action.Kick) { var config = CaptchaService.GetCaptchaConfig(Context.Guild.Id); config.MaxFailuresAction = action; CaptchaService.SaveCaptchaConfig(config); await ReplyAsync($"Max Failure Action: {action}"); }
public async Task PerformCaptchaAction(CaptchaConfig.Action actionType, SocketGuildUser user) { if (actionType == CaptchaConfig.Action.None) { return; } if (actionType == CaptchaConfig.Action.Kick) { await user.KickAsync("Failed to pass captcha verification"); return; } if (actionType == CaptchaConfig.Action.Ban) { await user.BanAsync(7, "Failed to pass captcha verification"); return; } }