discord-api-docs
discord-api-docs copied to clipboard
Error when setting param `offset` to value more than 5000. (NUMBER_TYPE_MAX)
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
This is currently working as intended.