mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
Fix various bugs and regressions
This commit is contained in:
parent
8785354a2b
commit
80c572f594
11 changed files with 60 additions and 57 deletions
|
|
@ -73,11 +73,14 @@ namespace Myriad.Rest.Ratelimit
|
|||
try
|
||||
{
|
||||
_semaphore.Wait();
|
||||
|
||||
_logger.Verbose("{BucketKey}/{BucketMajor}: Received rate limit headers: {@RateLimitHeaders}",
|
||||
Key, Major, headers);
|
||||
|
||||
if (headers.ResetAfter != null)
|
||||
{
|
||||
var headerNextReset = DateTimeOffset.UtcNow + headers.ResetAfter.Value; // todo: server time
|
||||
if (headerNextReset > _nextReset)
|
||||
if (_nextReset == null || headerNextReset > _nextReset)
|
||||
{
|
||||
_logger.Debug("{BucketKey}/{BucketMajor}: Received reset time {NextReset} from server (after: {NextResetAfter}, remaining: {Remaining}, local remaining: {LocalRemaining})",
|
||||
Key, Major, headerNextReset, headers.ResetAfter.Value, headers.Remaining, Remaining);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
public record GuildMemberPartial
|
||||
{
|
||||
public string Nick { get; init; }
|
||||
public string? Nick { get; init; }
|
||||
public ulong[] Roles { get; init; }
|
||||
public string JoinedAt { get; init; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue