public async Task <Result <FeedbackMessage> > RemoveConditionAsync ( [DiscordTypeHint(TypeHint.Role)] AutoroleConfiguration autorole, long conditionID ) { var removeCondition = await _autoroles.RemoveConditionAsync(autorole, conditionID); return(!removeCondition.IsSuccess ? Result <FeedbackMessage> .FromError(removeCondition) : new FeedbackMessage("Condition removed.", _feedback.Theme.Secondary)); }
public async Task <RuntimeResult> RemoveConditionAsync ( AutoroleConfiguration autorole, long conditionID ) { var removeCondition = await _autoroles.RemoveConditionAsync(autorole, conditionID); if (!removeCondition.IsSuccess) { return(removeCondition.ToRuntimeResult()); } return(RuntimeCommandResult.FromSuccess("Condition removed.")); }
public async Task RemoveConditionAsync ( AutoroleConfiguration autorole, long conditionID ) { var removeCondition = await _autoroles.RemoveConditionAsync(autorole, conditionID); if (!removeCondition.IsSuccess) { await _feedback.SendErrorAsync(this.Context, removeCondition.ErrorReason); return; } await _feedback.SendConfirmationAsync(this.Context, "Condition removed."); }