# Discord Sync API

The INFINITYCORE framework uses the Discord API to receive real-time player presence in rich presence on your Discord or on a third-party Discord.

It also allows you to detect the role used on your Discord server in addition to the game server, so you can link a specific role with your server (e.g. admin, VIP, member, police officer, etc.).

This feature also allows for granting special permissions in the game, as well as being able to speak in OOC with your Discord role tag!

Webhooks are also available to transmit real-time chat on your Discord.

Example: <br>

```lua
    RoleList = { 
        {0,  "🤠^0Player |^0"},
        {1028727011985854525,  "⭕^1CoreTeam |^0"},
        {1041442964381126737,  "⭕^1CoreDev  |^0"},
    },
```


---

# Agent Instructions: 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:

```
GET https://altitude-dev.gitbook.io/doc/global-functions/discord-sync-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
