Fix !changelog, fix bug in logger and typo in !mod namehistory

This commit is contained in:
runebaas 2018-05-04 00:55:32 +02:00
parent 8599c815d7
commit 290b85fdb6
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
5 changed files with 6 additions and 4 deletions

View file

@ -47,7 +47,7 @@ namespace Geekbot.net.Commands.Admin
catch (Exception e)
{
_errorHandler.HandleCommandException(e, Context,
$"I don't have enough permissions to give {user.Username} that role");
$"I don't have enough permissions do that");
}
}

View file

@ -52,7 +52,7 @@ namespace Geekbot.net.Commands.Utils.Changelog
});
var sb = new StringBuilder();
foreach (var commit in commits.Take(10))
sb.AppendLine($"- {commit.Commit.Message} ({commit.Commit.AuthorDto.Date:yyyy-MM-dd})");
sb.AppendLine($"- {commit.Commit.Message} ({commit.Commit.Author.Date:yyyy-MM-dd})");
eb.Description = sb.ToString();
eb.WithFooter(new EmbedFooterBuilder
{

View file

@ -4,6 +4,8 @@ namespace Geekbot.net.Commands.Utils.Changelog
{
public class CommitAuthorDto
{
public string Name { get; set; }
public string Email { get; set; }
public DateTimeOffset Date { get; set; }
}
}

View file

@ -2,7 +2,7 @@
{
public class CommitInfoDto
{
public CommitAuthorDto AuthorDto { get; set; }
public CommitAuthorDto Author { get; set; }
public string Message { get; set; }
}
}

View file

@ -43,7 +43,7 @@ namespace Geekbot.net.Lib.Logger
public void Error(string source, string message, Exception stackTrace, object extra = null)
{
_logger.Error(stackTrace, CreateLogString("Error", source, message, stackTrace, extra));
_logger.Error(CreateLogString("Error", source, message, stackTrace, extra));
}
private string CreateLogString(string type, string source, string message, Exception stackTrace = null, object extra = null)