public Task ShowCommandHelp(Command command, IUser user, IMessageChannel channel, IMessageChannel replyChannel = null) { var output = EmbedBuilder(); if (!command.CanRun(user, channel, out var error)) { output.WithDescription(error ?? "You do not have permission to access this command."); } else { ShowCommandHelpInternal(command, user, channel, output); } return((replyChannel ?? channel).SendMessageAsync(string.Empty, embed: output.Build())); }
public Task ShowCommandHelp(Command command, User user, Channel channel, Channel replyChannel = null) { StringBuilder output = new StringBuilder(); string error; if (!command.CanRun(user, channel, out error)) { output.AppendLine(error ?? "You do not have permission to access this command."); } else { ShowCommandHelpInternal(command, user, channel, output); } return((replyChannel ?? channel).SendMessage(output.ToString())); }
public Task ShowCommandHelp(Command command, User user, Channel channel, Channel replyChannel = null) { StringBuilder output = new StringBuilder(); string error; if (!command.CanRun(user, channel, out error)) output.AppendLine(error ?? DefaultPermissionError); else ShowCommandHelpInternal(command, user, channel, output); return _client.SendMessage(replyChannel ?? channel, output.ToString()); }