mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +00:00
feat: upgrade to .NET 6, refactor everything
This commit is contained in:
parent
d28e99ba43
commit
1918c56937
314 changed files with 27954 additions and 27966 deletions
|
|
@ -1,29 +1,26 @@
|
|||
using System;
|
||||
|
||||
using Myriad.Rest.Ratelimit;
|
||||
|
||||
namespace Myriad.Rest.Exceptions
|
||||
namespace Myriad.Rest.Exceptions;
|
||||
|
||||
public class RatelimitException: Exception
|
||||
{
|
||||
public class RatelimitException: Exception
|
||||
public RatelimitException(string? message) : base(message) { }
|
||||
}
|
||||
|
||||
public class RatelimitBucketExhaustedException: RatelimitException
|
||||
{
|
||||
public RatelimitBucketExhaustedException(Bucket bucket, TimeSpan retryAfter) : base(
|
||||
"Rate limit bucket exhausted, request blocked")
|
||||
{
|
||||
public RatelimitException(string? message) : base(message) { }
|
||||
Bucket = bucket;
|
||||
RetryAfter = retryAfter;
|
||||
}
|
||||
|
||||
public class RatelimitBucketExhaustedException: RatelimitException
|
||||
{
|
||||
public RatelimitBucketExhaustedException(Bucket bucket, TimeSpan retryAfter) : base(
|
||||
"Rate limit bucket exhausted, request blocked")
|
||||
{
|
||||
Bucket = bucket;
|
||||
RetryAfter = retryAfter;
|
||||
}
|
||||
public Bucket Bucket { get; }
|
||||
public TimeSpan RetryAfter { get; }
|
||||
}
|
||||
|
||||
public Bucket Bucket { get; }
|
||||
public TimeSpan RetryAfter { get; }
|
||||
}
|
||||
|
||||
public class GloballyRatelimitedException: RatelimitException
|
||||
{
|
||||
public GloballyRatelimitedException() : base("Global rate limit hit") { }
|
||||
}
|
||||
public class GloballyRatelimitedException: RatelimitException
|
||||
{
|
||||
public GloballyRatelimitedException() : base("Global rate limit hit") { }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue