This commit is contained in:
runebaas 2018-05-03 21:20:49 +02:00
parent e3adf55742
commit 0828130ae8
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
8 changed files with 16 additions and 17 deletions

View file

@ -6,8 +6,8 @@ using Discord;
using Discord.Commands;
using Geekbot.net.Lib;
using Geekbot.net.Lib.ErrorHandling;
using Newtonsoft.Json;
using StackExchange.Redis;
using Utf8Json;
namespace Geekbot.net.Commands.Integrations.Google
{
@ -40,7 +40,7 @@ namespace Geekbot.net.Commands.Integrations.Google
var url = new Uri($"https://kgsearch.googleapis.com/v1/entities:search?languages=en&limit=1&query={searchText}&key={apiKey}");
var responseString = client.DownloadString(url);
var response = JsonSerializer.Deserialize<GoogleKgApiResponseDto>(responseString);
var response = JsonConvert.DeserializeObject<GoogleKgApiResponseDto>(responseString);
if (!response.ItemListElement.Any())
{

View file

@ -12,7 +12,7 @@ using Geekbot.net.Lib.Logger;
using Geekbot.net.Lib.UserRepository;
using StackExchange.Redis;
namespace Geekbot.net.Commands.User.Rank
namespace Geekbot.net.Commands.User.Ranking
{
public class Rank : ModuleBase
{
@ -37,8 +37,7 @@ namespace Geekbot.net.Commands.User.Rank
[Command("rank", RunMode = RunMode.Async)]
[Remarks(CommandCategories.Statistics)]
[Summary("get user top 10 in messages or karma")]
public async Task RankCmd([Summary("type")] string typeUnformated = "messages",
[Summary("amount")] int amount = 10)
public async Task RankCmd([Summary("type")] string typeUnformated = "messages", [Summary("amount")] int amount = 10)
{
try
{

View file

@ -1,4 +1,4 @@
namespace Geekbot.net.Commands.User.Rank
namespace Geekbot.net.Commands.User.Ranking
{
internal class RankUserPolyfillDto
{

View file

@ -2,7 +2,7 @@
namespace Geekbot.net.Commands.Utils.Changelog
{
internal class CommitAuthorDto
public class CommitAuthorDto
{
public DateTimeOffset Date { get; set; }
}

View file

@ -1,6 +1,6 @@
namespace Geekbot.net.Commands.Utils.Changelog
{
internal class CommitDto
public class CommitDto
{
public CommitInfoDto Commit { get; set; }
}

View file

@ -1,6 +1,6 @@
namespace Geekbot.net.Commands.Utils.Changelog
{
internal class CommitInfoDto
public class CommitInfoDto
{
public CommitAuthorDto AuthorDto { get; set; }
public string Message { get; set; }