discord / discord-api-docs

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

/members-search doesn't fetch a newly joined member's information #6781

Open patrikcb opened 4 months ago

patrikcb commented 4 months ago

Description

When using the /members-search endpoint for a member that joined the guild <20 seconds ago, their information doesn't show up, as if they aren't currently in the guild.

Steps to Reproduce

I'm not exactly sure how to do curl requests, since I'm using the API with the help of a third-party app (BotGhost).

  1. Have a member join the guild.
  2. Send the following request:
    POST /guilds/guild.id/members-search
    key: and_query
    value: {
         "user_id": {
             "or_query": ["{Member.id}"]
         }}
  3. View first object from results

Expected Behavior

{
  "response": {
    "guild_id": "1211762421879013506",
    "members": [
      {
        "member": {
          "avatar": null,
          "communication_disabled_until": null,
          "flags": 0,
          "joined_at": "2024-03-05T14:22:57.835000+00:00",
          "nick": null,
          "pending": false,
          "premium_since": null,
          "roles": [
            "1215019331151331368",
            "1211765187372130435",
            "1214301016657232013"
          ],
          "unusual_dm_activity_until": null,
          "user": {
            "id": "819667609690701874",
            "username": "patrikcb",
            "avatar": "edf7ef2064062f9c6050c08f82b81e6e",
            "discriminator": "0",
            "public_flags": 4194304,
            "premium_type": 0,
            "flags": 4194304,
            "banner": null,
            "accent_color": null,
            "global_name": "Patrik",
            "avatar_decoration_data": null,
            "banner_color": null
          },
          "mute": false,
          "deaf": false
        },
        "source_invite_code": "BYQrz4PUYE",
        "join_source_type": 5,
        "inviter_id": "480126550868754465"
      }
    ],
    "page_result_count": 1,
    "total_result_count": 1
  },
  "status": 200,
  "statusText": "OK"
}

Current Behavior

{
  "response": {
    "guild_id": "1211762421879013506",
    "members": [],
    "page_result_count": 0,
    "total_result_count": 0
  }
}

Screenshots/Videos

Screenshot 2024-04-02 at 1 10 53 PM Screenshot 2024-04-02 at 1 11 00 PM

Client and System Information

I'm using BotGhost as my client, so I'm not exactly sure if that checks any criteria.

Jupith commented 4 months ago

members, like anything, take a bit to be indexed.

patrikcb commented 4 months ago

How long does it take at the maximum?