mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 13:57:54 +00:00
Port some things, still does not compile
This commit is contained in:
parent
f56c3e819f
commit
23cf06df4c
18 changed files with 543 additions and 538 deletions
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
|
||||
using Discord;
|
||||
using DSharpPlus.Entities;
|
||||
|
||||
using NodaTime;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ namespace PluralKit.Bot
|
|||
|
||||
public int CacheSize => _info.Count;
|
||||
|
||||
public bool TryExecuteWebhook(IWebhook webhook)
|
||||
public bool TryExecuteWebhook(DiscordWebhook webhook)
|
||||
{
|
||||
// If we have nothing saved, just allow it (we'll save something once the response returns)
|
||||
if (!_info.TryGetValue(webhook.Id, out var info)) return true;
|
||||
|
|
@ -57,7 +57,7 @@ namespace PluralKit.Bot
|
|||
return true;
|
||||
}
|
||||
|
||||
public void UpdateRateLimitInfo(IWebhook webhook, HttpResponseMessage response)
|
||||
public void UpdateRateLimitInfo(DiscordWebhook webhook, HttpResponseMessage response)
|
||||
{
|
||||
var info = _info.GetOrAdd(webhook.Id, _ => new WebhookRateLimitInfo());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue