Skip to content

Commit

Permalink
[execute] Not show exception if is UserFriendlyException
Browse files Browse the repository at this point in the history
  • Loading branch information
DiFFoZ committed Jul 10, 2020
1 parent e4908d0 commit 2fb64e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dummy/Commands/CommandDummyExecute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected override async Task OnExecuteAsync()
var commandContext = await m_CommandExecutor.ExecuteAsync(new UnturnedUser(m_UserDataStore, dummy), Context.Parameters.Skip(1).ToArray(), "");

await PrintAsync($"Dummy has {(commandContext.Exception == null ? "<color=green>successfully" : "<color=red>unsuccessfully")}</color> executed command");
if (commandContext.Exception != null)
if (commandContext.Exception != null && !(commandContext.Exception is UserFriendlyException))
{
await PrintAsync(commandContext.Exception.Message, Color.Red);
}
Expand Down

0 comments on commit 2fb64e5

Please sign in to comment.