public async Task <Result <FeedbackMessage> > StopRoleplayAsync ( [RequireEntityOwner] [AutocompleteProvider("roleplay::owned")] Roleplay roleplay ) { var stopRoleplayAsync = await _discordRoleplays.StopRoleplayAsync(roleplay); return(!stopRoleplayAsync.IsSuccess ? Result <FeedbackMessage> .FromError(stopRoleplayAsync) : new FeedbackMessage($"The roleplay \"{roleplay.Name}\" has been stopped.", _feedback.Theme.Secondary)); }
public async Task <RuntimeResult> StopRoleplayAsync ( [RequireEntityOwnerOrPermission(typeof(StartStopRoleplay), PermissionTarget.Other)] Roleplay roleplay ) { var stopRoleplayAsync = await _discordRoleplays.StopRoleplayAsync(roleplay); if (!stopRoleplayAsync.IsSuccess) { return(stopRoleplayAsync.ToRuntimeResult()); } return(RuntimeCommandResult.FromSuccess($"The roleplay \"{roleplay.Name}\" has been stopped.")); }
public async Task StopRoleplayAsync ( [RequireEntityOwnerOrPermission(typeof(StartStopRoleplay), PermissionTarget.Other)] Roleplay roleplay ) { var stopRoleplayAsync = await _discordRoleplays.StopRoleplayAsync(roleplay); if (!stopRoleplayAsync.IsSuccess) { await _feedback.SendErrorAsync(this.Context, stopRoleplayAsync.ErrorReason); return; } await _feedback.SendConfirmationAsync(this.Context, $"The roleplay \"{roleplay.Name}\" has been stopped."); }