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

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

Open patrikcb opened this issue 3 months ago • 2 comments

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}"]
         }}
  1. 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.

patrikcb avatar Apr 02 '24 17:04 patrikcb

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

Jupith avatar Apr 02 '24 17:04 Jupith

How long does it take at the maximum?

patrikcb avatar Apr 02 '24 20:04 patrikcb