Fixed patreon error
This commit is contained in:
parent
83194fca6e
commit
a17de3dc58
@ -93,9 +93,12 @@ namespace NadekoBot.Modules.Utility.Services
|
|||||||
var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge");
|
var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge");
|
||||||
rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject<PatreonPledge>(x.ToString()))
|
rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject<PatreonPledge>(x.ToString()))
|
||||||
.Where(x => x.attributes.declined_since == null));
|
.Where(x => x.attributes.declined_since == null));
|
||||||
users.AddRange(data.Included
|
if (data.Included != null)
|
||||||
.Where(x => x["type"].ToString() == "user")
|
{
|
||||||
.Select(x => JsonConvert.DeserializeObject<PatreonUser>(x.ToString())));
|
users.AddRange(data.Included
|
||||||
|
.Where(x => x["type"].ToString() == "user")
|
||||||
|
.Select(x => JsonConvert.DeserializeObject<PatreonUser>(x.ToString())));
|
||||||
|
}
|
||||||
} while (!string.IsNullOrWhiteSpace(data.Links.next));
|
} while (!string.IsNullOrWhiteSpace(data.Links.next));
|
||||||
}
|
}
|
||||||
var db = _cache.Redis.GetDatabase();
|
var db = _cache.Redis.GetDatabase();
|
||||||
|
@ -21,7 +21,7 @@ namespace NadekoBot.Core.Services.Impl
|
|||||||
private readonly IBotCredentials _creds;
|
private readonly IBotCredentials _creds;
|
||||||
private readonly DateTime _started;
|
private readonly DateTime _started;
|
||||||
|
|
||||||
public const string BotVersion = "2.2.2";
|
public const string BotVersion = "2.2.3";
|
||||||
|
|
||||||
public string Author => "Kwoth#2560";
|
public string Author => "Kwoth#2560";
|
||||||
public string Library => "Discord.Net";
|
public string Library => "Discord.Net";
|
||||||
|
Loading…
Reference in New Issue
Block a user