discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Error when setting param `offset` to value more than 5000. (NUMBER_TYPE_MAX)

Open Hermes1312 opened this issue 1 year ago • 0 comments

Description

I'm getting error when trying to get messages from offset more than 5000. It can also be seen in Discord client when going to search area in DM and searching for messages from specific author then going to page more than 200 (beacuse 200*25=5000)

Steps to Reproduce

[GET] https://discord.com/api/v9/channels/{channel_id}/messages/search?author_id={author_id}&offset=5001 Of course you need to be authenticated.

Expected Behavior

Should return another 25 messages that was sent by provided author (author_id)

Current Behavior

{
  "code": 50035,
  "errors": {
    "offset": {
      "_errors": [
        {
          "code": "NUMBER_TYPE_MAX",
          "message": "int value should be less than or equal to 5000."
        }
      ]
    }
  },
  "message": "Invalid Form Body"
}

Screenshots/Videos

No response

Client and System Information

stable 136240 (9a882e6) Windows 10 64-bit

Hermes1312 avatar Jul 13 '22 09:07 Hermes1312

This is currently working as intended.

devsnek avatar Aug 29 '22 18:08 devsnek