Ejemplo n.º 1
0
        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()));
        }
Ejemplo n.º 2
0
        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()));
        }
Ejemplo n.º 3
0
 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());
 }