public async Task <Result <FeedbackMessage> > DenyAutoroleForUserAsync ( [DiscordTypeHint(TypeHint.Role)] AutoroleConfiguration autorole, IUser user ) { var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user.ID); return(!denyResult.IsSuccess ? Result <FeedbackMessage> .FromError(denyResult) : new FeedbackMessage("Qualification denied.", _feedback.Theme.Secondary)); }
public async Task <RuntimeResult> DenyAutoroleForUserAsync ( AutoroleConfiguration autorole, IUser user ) { var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user); if (!denyResult.IsSuccess) { return(denyResult.ToRuntimeResult()); } return(RuntimeCommandResult.FromSuccess("Qualification denied.")); }
public async Task DenyAutoroleForUserAsync ( AutoroleConfiguration autorole, IUser user ) { var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user); if (!denyResult.IsSuccess) { await _feedback.SendErrorAsync(this.Context, denyResult.ErrorReason); return; } await _feedback.SendConfirmationAsync(this.Context, "Qualification denied."); }