discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.95k stars 1.26k forks source link

SessionStartLimit data isn't sent by Get Gateway Bot request #5717

Closed switchupcb closed 1 year ago

switchupcb commented 1 year ago

Description

SessionStartLimit data isn't sent by Get Gateway request https://discord.com/developers/docs/topics/gateway#session-start-limit-object

https://discord.com/developers/docs/topics/gateway#sharding The Get Gateway Bot endpoint will always return the correct amount of shards, so if you're already using this endpoint to determine your number of shards, you shouldn't require any changes.

https://discord.com/developers/docs/topics/gateway#get-gateway-bot Returns an object based on the information in Get Gateway, plus additional metadata that can help during the operation of large or sharded bots.

Steps to Reproduce

  1. Send Get Gateway Bot request.
{
    "level": "info",
    "time": "2022-12-04T17:31:42.1153182-06:00",
    "client": "",
    "request": {
        "xid": "ce6irndfmjcga00gp890",
        "route": "173",
        "resource": "",
        "endpoint": "https://discord.com/api/v10/gateway"
    },

    "response": {
        "header": "HTTP/1.1 200 OK\r\nServer: cloudflare\r\nDate: Sun, 04 Dec 2022 23:31:42 GMT\r\nContent-Type: application/json\r\nContent-Length: 35\r\nConnection: keep-alive\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains; preload\r\nVia: 1.1 google\r\nAlt-Svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\nCf-Cache-Status: HIT\r\nAge: 18939\r\nLast-Modified: Sun, 04 Dec 2022 18:16:02 GMT\r\nExpires: Mon, 05 Dec 2022 00:01:41 GMT\r\nCache-Control: public, max-age=1800\r\nAccept-Ranges: bytes\r\nReport-To: {\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=YzOywFkGnQFy6S4NsyO5ibpqcxZZDQf9hUM9hTEdMcmsPJGNvjItLWO%2BRdjTA98V0bYYJ2bSSF2yngawAzOEpyekNuiIstoIifFZTcrDpl%2F%2FfzLFpqBgCMnQA2QI\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\nNel: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\nX-Content-Type-Options: nosniff\r\nCf-Ray: 774856485bcbe97a-DFW\r\nSet-Cookie: __cfruid=9c5a203d28089dbbf35197e36722bf30e3a7ed1c-1670196701; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None\r\n\r\n",
        "body": "{\"url\": \"wss://gateway.discord.gg\"}"
    }
}

Expected Behavior

Sesson Shard Limit is included with a max concurrency of 1.

Current Behavior

Session Shard Limit isn't provided.

Screenshots/Videos

No response

Client and System Information

.

aetheryx commented 1 year ago

you made a request to /gateway (https://discord.com/developers/docs/topics/gateway#get-gateway), not /gateway/bot (https://discord.com/developers/docs/topics/gateway#get-gateway-bot). only the latter includes session_start_limit

switchupcb commented 1 year ago

Thanks @aetheryx