簡體   English   中英

Discord api /users/@me/guilds 限速

[英]Discord api /users/@me/guilds rate limit

我正在創建一個 Discord 登錄功能,用戶必須在特定的公會中才能登錄儀表板。 現在我從 26-10-2022 20:30 開始一直在達到速率限制,此時速率限制仍然存在。

這些是從公會請求返回的標頭:

array:22 [▼
  "retry-after" => array:1 [▼
    0 => "772"
  ]
  "x-ratelimit-reset" => array:1 [▼
    0 => "1664228738"
  ]
  "x-ratelimit-reset-after" => array:1 [▼
    0 => "1"
  ]
]

x-ratelimit-reset 是一個紀元時間,所以我將其轉換

$epoch = 1664228738;
$dt = new DateTime("@$epoch");  // convert UNIX timestamp to PHP DateTime
echo $dt->format('Y-m-d H:i:s'); // output = 2022-09-26 21:45:38
X-RateLimit-Reset - Epoch time (seconds since 00:00:00 UTC on January 1, 1970) at which the rate limit resets

X-RateLimit-Reset-After - Total time (in seconds) of when the current rate limit bucket will reset. Can have decimals to match previous millisecond ratelimit precision

有什么方法可以請求訪問或增加此端點上的請求數量?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM