> For the complete documentation index, see [llms.txt](https://developers.invitelogger.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.invitelogger.me/webhooks/content/members.md).

# Members

## members.join

This webhook is fired every time someone joins your server

{% tabs %}
{% tab title="Content" %}
{% code fullWidth="true" %}

```typescript
{
   guild: {
      id: string;
      name: string;
      icon?: string;
    };
    member: {
      id: string;
      username: string;
      discriminator: string;
      avatar: string;
      bot: boolean;
      joinedAt: number;
      createdAt: number;
    };
    inviter: {
      type: "user" | "vanity" | "unknown" | "oauth2";
      user?: { // only if type = user
        id: string;
        username: string;
        discriminator: string;
        avatar?: string;
        bot?: boolean;
      };
      invites?: { // only if type = user
        total: number,
        leaves: number,
        fake: number,
        bonus: number,
        joins: number,
        rank?: number // might not be shown, do no rely on it
      },
      code?: string  // only if vanity or user
    },
    fakeData: {
      isFake: boolean, // if the join has been counted as fake
      code: number // bitfield telling why the join has been counted as fake
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="Example" %}

```json
{
  "botID": "637662603564417024",
  "type": "member.join",
  "data": {
    "guild": {
      "id": "759100646120751124",
      "name": "test invitelogger",
      "icon": null
    },
    "member": {
      "id": "525813997241630732",
      "username": "chaun1403",
      "discriminator": "0",
      "avatar": "https://cdn.discordapp.com/avatars/525813997241630732/680097c6af2890418164a9d7bd3bd91b.webp?size=128",
      "bot": false,
      "joinedAt": 1694953136345,
      "createdAt": 1545434226094
    },
    "inviter": {
      "type": "user",
      "user": {
        "id": "417977361011572747",
        "username": "chaun14",
        "discriminator": "0",
        "avatar": null,
        "bot": false
      },
      "invites": {
        "total": 239,
        "leaves": 7,
        "fake": 4,
        "bonus": 240,
        "joins": 10
      },
      "code": "RMJpYgzz"
    },
    "fakeData": {
      "isFake": true,
      "code": 16
    }
  },
  "timestamp": 1694953134956
}
```

{% endtab %}
{% endtabs %}

***

## members.leave

This webhook is fired every time someone leaves your server

{% tabs %}
{% tab title="Content" %}

```typescript
{
   guild: {
      id: string;
      name: string;
      icon?: string;
    };
    member: {
      id: string;
      username: string;
      discriminator: string;
      avatar: string;
      bot: boolean;
      joinedAt: number;
      createdAt: number;
    };
    inviter: {
      type: "user" | "vanity" | "unknown" | "oauth2";
      user?: { // only if type = user
        id: string;
        username: string;
        discriminator: string;
        avatar?: string;
        bot?: boolean;
      };
      invites?: { // only if type = user
        total: number,
        leaves: number,
        fake: number,
        bonus: number,
        joins: number,
        rank?: number // might not be shown, do no rely on it
      },
      code?: string  // only if vanity or user
    },
}
```

{% endtab %}

{% tab title="Example" %}

```json
{
  "botID": "637662603564417024",
  "type": "member.leave",
  "data": {
    "guild": {
      "id": "759100646120751124",
      "name": "test invitelogger",
      "icon": null
    },
    "member": {
      "id": "525813997241630732",
      "username": "izzitox",
      "discriminator": "0",
      "avatar": "https://cdn.discordapp.com/avatars/525813997241630732/680097c6af2890418164a9d7bd3bd91b.webp?size=128",
      "bot": false,
      "joinedAt": 1694953089631,
      "createdAt": 1545434226094
    },
    "inviter": {
      "type": "user",
      "user": {
        "id": "417977361011572747",
        "username": "chaun14",
        "discriminator": "0",
        "avatar": "https://cdn.discordapp.com/avatars/417977361011572747/a_758f6228a02b2b714baeb10dde7f17c4.webp?size=128",
        "bot": false
      },
      "invites": {
        "total": 239,
        "leaves": 7,
        "fake": 3,
        "bonus": 240,
        "joins": 9
      },
      "code": "RMJpYgzz"
    }
  },
  "timestamp": 1694953120091
}
```

{% endtab %}
{% endtabs %}

***

## members.fakeUpdate

This webhook is fired every time someone's join become non fake (i.e when there is a role requirement fake parameter)

{% tabs %}
{% tab title="Content" %}

```typescript
{
   guild: {
      id: string;
      name: string;
      icon?: string;
    };
    member: {
      id: string;
      username: string;
      discriminator: string;
      avatar: string;
      bot: boolean;
      joinedAt: number;
      createdAt: number;
    };
    inviter: {
      type: "user" | "vanity" | "unknown" | "oauth2";
      user?: { // only if type = user
        id: string;
        username: string;
        discriminator: string;
        avatar?: string;
        bot?: boolean;
      };
       invites?: {
        total: number,
        leaves: number,
        fake: number,
        bonus: number,
        joins: number,
        rank?: number // might not be shown, do no rely on it
      },
      code?: string  // only if vanity or user
    }, 
    fakeData: {
      before: {
        isFake: boolean,
        code: number
      },
      after: {
        isFake: boolean,
        code: number
      }
    }
}
```

{% endtab %}

{% tab title="Example" %}

```json
{
  "botID": "637662603564417024",
  "type": "member.fakeUpdate",
  "data": {
    "guild": {
      "id": "759100646120751124",
      "name": "test invitelogger",
      "icon": null
    },
    "member": {
      "id": "525813997241630732",
      "username": "izzitox",
      "discriminator": "0",
      "avatar": "https://cdn.discordapp.com/avatars/525813997241630732/680097c6af2890418164a9d7bd3bd91b.webp?size=128",
      "bot": false,
      "joinedAt": 1694953136345,
      "createdAt": 1545434226094
    },
    "inviter": {
      "type": "user",
      "user": {
        "id": "417977361011572747",
        "username": "chaun14",
        "discriminator": "0",
        "avatar": "https://cdn.discordapp.com/avatars/417977361011572747/a_758f6228a02b2b714baeb10dde7f17c4.gif?size=128",
        "bot": false
      },
      "invites": {
        "total": 239,
        "leaves": 7,
        "fake": 4,
        "bonus": 240,
        "joins": 10
      }
    },
    "fakeData": {
      "before": {
        "isFake": true,
        "code": 16
      },
      "after": {
        "isFake": false,
        "code": 0
      }
    }
  },
  "timestamp": 1694953157824
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.invitelogger.me/webhooks/content/members.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
