Fix !changelog, fix bug in logger and typo in !mod namehistory
This commit is contained in:
parent
8599c815d7
commit
290b85fdb6
5 changed files with 6 additions and 4 deletions
|
@ -47,7 +47,7 @@ namespace Geekbot.net.Commands.Admin
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_errorHandler.HandleCommandException(e, Context,
|
_errorHandler.HandleCommandException(e, Context,
|
||||||
$"I don't have enough permissions to give {user.Username} that role");
|
$"I don't have enough permissions do that");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace Geekbot.net.Commands.Utils.Changelog
|
||||||
});
|
});
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
foreach (var commit in commits.Take(10))
|
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.Description = sb.ToString();
|
||||||
eb.WithFooter(new EmbedFooterBuilder
|
eb.WithFooter(new EmbedFooterBuilder
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,8 @@ namespace Geekbot.net.Commands.Utils.Changelog
|
||||||
{
|
{
|
||||||
public class CommitAuthorDto
|
public class CommitAuthorDto
|
||||||
{
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Email { get; set; }
|
||||||
public DateTimeOffset Date { get; set; }
|
public DateTimeOffset Date { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
public class CommitInfoDto
|
public class CommitInfoDto
|
||||||
{
|
{
|
||||||
public CommitAuthorDto AuthorDto { get; set; }
|
public CommitAuthorDto Author { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -43,7 +43,7 @@ namespace Geekbot.net.Lib.Logger
|
||||||
|
|
||||||
public void Error(string source, string message, Exception stackTrace, object extra = null)
|
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)
|
private string CreateLogString(string type, string source, string message, Exception stackTrace = null, object extra = null)
|
||||||
|
|
Loading…
Reference in a new issue