# Introduction

Bot Designer for Discord Data API

## BDFDData API

This Api is built to allow BDFD users to gain easier access to Discords Official API by bypassing BDFD's built-in DAPI Block! **We Are NOT affiliated with** [**Bot Designer For Discord (BDFD)**](https://botdesignerdiscord.com/)

<details>

<summary>BDFD Eval Function [DAPI vs BDFDDATA API]</summary>

<img src="https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FgT1RjSsVGeeabj8sPcrB%2Fimage.png?alt=media&amp;token=350403d6-2f63-4325-a046-ccf61cf1c444" alt="" data-size="original">&#x20;

![](https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FlCDSAqoOEC3yZHH2vgoz%2Fimage.png?alt=media\&token=4599b903-5e93-47b0-a360-fa7d03b8ac88)

</details>

{% hint style="danger" %}
**Some endpoints require a Bot Token to be passed via a header.** \
\
***It is extremely recommended you keep your Bot Token safe! We are not responsible for your actions!***
{% endhint %}

{% hint style="info" %}
We require API Keys! Grab yours in our [Support Server](https://dsc.gg/ddapi)!
{% endhint %}

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

### Using Our API (Discord.js / axios)

```javascript
const axios = require('axios')
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/user', {
headers: {
'user-id': 'ID OF THE USER TO FETCH'
'apikey': <Your-API-Key>
}
}).then(res=>JSON.stringify(res.data, null, 2))
})()

//Output *should* be similar to the image provided in "BDFD Eval Function"
```

### Using Our API (BDFD)

<pre class="language-bash"><code class="lang-bash">$httpAddHeader[apikey;&#x3C;Your-API-Key>]
$httpAddHeader[user-id;ID OF THE USER TO FETCH]
$httpGet[https://bdfddata.rickyjs.xyz/&#x3C;version>/user]
<strong>$jsonSet[details;$httpResult]
</strong>$jsonParse[$json[details]]

# Output *should* be similar to the image provided in "BDFD Eval Function"
</code></pre>

### Understanding What You're Sending

Discord will require certain parameters to correspond with certain requests. Our API will enforce this.\
All header information is listed with the corresponding endpoints in their own pages.\
You will notice some endpoints require a header and others don't.

### Need Further Assistance?

All questions, concerns, suggestions, and any other feedback can be discussed with our Support Team!

{% hint style="success" %}
**This API is owned and maintained by @ricky.js (formally Rickყ#2006) in the Support Server**
{% endhint %}

{% embed url="<https://dsc.gg/ddapi>" fullWidth="false" %}


# \[NEW] BDFD x Discord.js Eval

New way to access Discord.js within BDFD!

This evaler allows you to eval Discord.js code within BDFD!

{% embed url="<https://bdfddataevaler.rickyjs.xyz>" %}

## How does it work?

* Create an evaler
* Get your evaler link
* Send requests as you please!

## Setting Up Your Evaler:

1. Login with Discord \
   ![](https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2Fy66a5I4tNAYeSVv3o8gs%2Fimage.png?alt=media\&token=d59268f3-fbd9-4f28-be33-8d90dc99bb29)
2. Verify your identity by inputting your key\
   ![](https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FhzRc3e4JflugMq06iAAZ%2Fimage.png?alt=media\&token=1f0310b1-9cff-4f86-925e-f28a14aea248)
3. Input your bot token \
   ![](https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FaLszYclhre2169n9DskL%2Fimage.png?alt=media\&token=7caee2b1-7539-4e55-899a-57bbd8b609b7)
4. Input a secret auth key. **This can be whatever you want! Make it secure as this is how you will reach your evaler. Do not share the key with anyone else**\
   &#x20;![](https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FHCvQPymzeBBUIJ9cXxKt%2Fimage.png?alt=media\&token=05b9ef8f-1fea-4c5f-9877-5ac9f65d6687)
5. Select Intents. **Only select the intents you absolutely need. Privileged Intents (GuildMembers, GuildPresences, and MessageContent) must be activated in the Discord Developer Portal in order for the bot to start.**&#x20;

<figure><img src="https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2F7VyFxL2818ayML4D5ytB%2Fimage.png?alt=media&amp;token=01370db2-4295-4b98-994b-7d72e8ee39d2" alt=""><figcaption></figcaption></figure>

#### Once your evaler has been submitted, If successful, the bot should automatically start.

<figure><img src="https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2F2n5EXT4DdcxbJpLPhaWr%2Fimage.png?alt=media&amp;token=20e63f1f-e14f-4821-8687-f010a0d52065" alt=""><figcaption></figcaption></figure>

## How to Eval:

* Copy the link provided on the dashboard.
* Make a POST request to the link `$httpPost[<url>/eval;{"code": "your_code_here"}]`
  * Required Body Parameter: `code` The code to evaluate.
  * Required Header parameter: `auth` The auth token you created
* After sending the request, capture the result using `$httpResult`. This will contain the output from the evaluation process.
* Use `$httpStatus` to determine whether the API request was successful or encountered an error.
  * If the status is `400` (bad request), the API encountered an error. You can debug using `$httpResult[error]`.
  * If successful, the result will be available in `$httpResult[details]`.
* If the API call is successful, you can retrieve the current **API-to-Discord API ping** using `$httpResult[ping]`.

## Management Options:

* Configure - Reconfigure Evaler Settings <mark style="color:yellow;">\[THIS IS NOT READY YET]</mark>
* Delete - Delete the Evaler
* Restart - Restart the Evaler

### Have more questions or need help? Join the Support Server and we'll guide you through!

{% embed url="<https://dsc.gg/ddapi>" fullWidth="false" %}

## Privacy and Security

To run this evaler, we do save the inputted bot tokens in a secure database. The database is obfuscated so not even I can read it.&#x20;

#### We expect all users to adhere to not only Discords ToS, but our own rules as well so we can keep this running.

* The code is processed through malicious check before being executed, if your code flags the check. We will be alerted and may suspend your evaler without notice.
* We **kindly and sternly** ask that you do not abuse this project and ruin it for everyone, meaning I can simply take this down with a click of a button if even one user abuses this.
* Use common sense, treat others as you'd want to be treated.
  * Imagine if someone raided your server, that would hurt right? Don't raid other servers. (It is honestly sad this has to be said.)


# Your Privacy

Understand how your privacy is affected.

### What data is being collected?

There is absolutely no data being collected!\
All information we require is solely for the API to work, none of it is collected or saved. The data you send is sent, processed, sent back to you, and immediately removed.

### API Auth Keys

This API does require **Auth Keys**, The only data that is saved is listed below along with their reasons.

* Your Discord User ID - To verify who the key belongs to
* Any and All data saved under our **DB Endpoints**!

### Bot Tokens

Your bot tokens are required as **they are used for Discord Authorization!** These are not saved and are discarded immediately after execution.


# Exclude Header

Easily filter out unnecessary details from endpoint responses

We know Discord's API responses can sometimes be quite extensive. To simplify your results, our API includes an `exclude` parameter, allowing you to leave out any data you don't need for a cleaner and more concise response.

{% hint style="info" %}

## Not all endpoints support this feature. Refer to the documentation page of each endpoint to check its availability!

{% endhint %}

## How to use:

1. Header name: `exclude`
2. Header value: *object names to exclude from the result, separated by a comma*

* This basically tells the function to forget about that object and all of its nested objects

<details>

<summary>BDFD Example</summary>

{% code lineNumbers="true" fullWidth="false" %}

```bash
$httpAddHeader[exclude;that]
 $httpGet[https://someExampleURL.idk]
$jsonParse[
 {
   "objects": {
     "that": {
       "are": ""
     },
     "separated":"",
     "by": "",
     "commas": ""
   }
 }
]

   Result ⤵️ 

 {
   "objects": {
     "separated":"",
     "by": "",
     "commas": ""
   }
 }
```

{% endcode %}

</details>

<details>

<summary>Discord.js Example</summary>

<pre class="language-javascript" data-line-numbers><code class="lang-javascript">{
'headers': {
<strong>'exclude': 'names,separated,by,commas' 
</strong><strong>    }
</strong>}
</code></pre>

</details>


# Paginate Header

Automatic Pagination for easier results!

Handling large sets of data can be challenging, especially when you're only interested in a specific range of results. To make pagination easier, our API supports a `paginate` header, allowing you to retrieve a subset of data based on index positions

{% hint style="danger" %}
This is an experimental feature and is subject to change.\
\
Currently, only the [/client/emojis](/endpoints/client/emojis) endpoint supports this header!
---------------------------------------------------------------------------------------------

{% endhint %}

{% hint style="success" %}

## This header works with the [<mark style="color:blue;">exclude</mark>](https://dadocs.rickyjs.xyz/exclude-header) header!

{% endhint %}

## How to use:

1. Header name: `paginate`
2. Header value: `amount-page`&#x20;

* Example: `10-3` would retrieve up to 10 results on page 3

<details>

<summary>BDFD Example</summary>

```bash
$httpAddHeader[paginate;10-3]
```

</details>

<details>

<summary>Discord.js Example</summary>

<pre class="language-bash"><code class="lang-bash">{
'headers': {
<strong>'paginate': '10-3' 
</strong><strong>    }
</strong>}
</code></pre>

</details>


# /advanced

Complete multiple requests in one!

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Endpoint Body Parameters

* requests - All the requests to complete <mark style="color:orange;">**\[Array of Objects]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Request Object

* endpoint - Endpoint to request <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* headers - Headers to send <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:green;">**Optional**</mark>)
* body - Body parameters to send <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:green;">**Optional**</mark>)
* method - Method to use in request <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

{% hint style="info" %}
You do not need to resupply the `apikey` or `bot-token` on every request. Only add those headers to the initial request (this endpoint) and it will automatically resupply to each subsequential request. \
\
The bot token **is not required**, this was added for convience if you are requesting multiple endpoints that do require a token.
{% endhint %}

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/advanced` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/advanced;{
  "requests": [
    {
      "endpoint": "/release/encode",
      "body": {"text": "This message was encoded using BDFDDataAPI"},
      "method": "POST"
    },
    {
      "endpoint": "/release/user",
      "headers": {
        "user-id": "672215920558604332"
      },
      "method": "GET"   
    }
  ]
}]

$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/advanced` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/advanced', 
{
  "requests": [
  {
  "endpoint": "/release/encode",
    "body": {
    "text": "test"
    },
    "method": "POST"
  },
  {
  "endpoint": "/release/user",
  "headers": {
    "user-id": "672215920558604332"
    },
    "method": "GET"
}
]}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
    "status": 200,
    "details": [
     "l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l", 
     {
            "id": "672215920558604332",
            "username": "ricky.js",
            "avatar": "https://cdn.discordapp.com/avatars/672215920558604332/a_ad6aaf5ba45a62c73b9cf9f82f382206.gif",
            "discriminator": "0",
            "public_flags": ["HypeSquadOnlineHouse3", "ActiveDeveloper", "NitroSubscriber"],
            "premium_type": 2,
            "flags": 4194560,
            "banner": "https://cdn.discordapp.com/banners/672215920558604332/a_734707b0151143a8801f2767e1a23ecb.gif",
            "accent_color": 4879576,
            "global_name": "Ricky",
            "avatar_decoration_data": null,
            "banner_color": "4a74d8"
        }
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /client

Retrieves information of the client (bot) user

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/client` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/client]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/client` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/client', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: {
    id: '1064100501764968488',
    name: 'BDFDData',
    icon: 'https://cdn.discordapp.com/app-icons/935552538135117844/d1f71e02a626e73dcf73ceaf3775b03c.jpg',
    description: '',
    summary: ''
    ...
    ...
    ...
  >  'Read on `Application Objects` : https://discord.com/developers/docs/resources/application'
}  
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /emojis

Returns information from the applications emoji or emoji list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) and [Paginate](/paginate-header) headers.
{% endhint %}

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* app-id - ID of the Application <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* emoji - name, id, identifier or position *(integer)* of the emoji to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="warning" %}
If no `emoji` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/client/emojis` endpoint using BDFD

```bash
  $httpAddHeader[apikey;<YOUR-API-KEY>]
  $httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
  $httpAddHeader[app-id;1064100501764968488] 
  $httpAddHeader[emoji;coolemoji1] $c[Optional header]
 
 $httpGet[https://bdfddata.rickyjs.xyz/<version>/client/emojis]
 
 $httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/client/emojis` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
    return await axios.get('https://bdfddata.rickyjs.xyz/<version>/client/emojis', {
        headers: {
            "apikey": "<YOUR-API-KEY>",
            "bot-token": "<YOUR-BOT-TOKEN>",
            "app-id": "1064100501764968488",
            "emoji": "1064859897956663336" // Optional header
        }
    }).then(res => res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```json
{
  "status": 200,
  "details": {
    "items": [
      {
        "animated": true,
        "available": true,
        "id": "123456789",
        "managed": false,
        "name": "coolemoji1",
        "require_colons": true,
        "roles": []
      },
      {
        "animated": false,
        "available": true,
        "id": "987654321",
        "managed": false,
        "name": "eoolemoji2",
        "require_colons": true,
        "roles": []
      }
    ]
  }
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```json
[
  {
    "status": 200,
    "details": {
      "animated": true,
      "id": "123456789",
      "identifier": "<:coolemoji1:123456789>",
      "name": "coolemoji1"
    }
  },
  {
    "animated": false,
    "id": "987654321",
    "identifier": "<:coolemoji2:987654321>",
    "name": "coolemoji2"
  }
]
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```json
{
  status: 400
  error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```json
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

An emoji header was provided, but did not match any records.

```json
{
  status: 404,
  error: "Emoji not found"
}
```

</details>


# /set

Modify the current Application/User (Previously /setbot)

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

{% hint style="danger" %}
This endpoint is locked to Alpha testers for bug fixing.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:&#x20;

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* obj - Object of modifications (See Discord Docs [User](https://discord.com/developers/docs/resources/user#modify-current-user) | [Application](https://discord.com/developers/docs/resources/application#edit-current-application)) <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:red;">**Required**</mark>)
* type - What to modify <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)\
  \- user\
  \- app

Responds with various HTTP status codes to indicate success or failure of the request:

* **200 OK**: The request was successful, and the changes have been applied.
* **400 Bad Request**: The request could not be understood or was missing required parameters.
* **401 Unauthorized**: Authentication failed or user does not have permissions.
* **404 Not Found**: The requested resource could not be found.
* **500 Internal Server Error**: An error occurred on the server.

Ensure to handle these responses appropriately in your application to manage errors and confirmations.

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/client/set` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/client/set;{
'obj': {
'username': 'CoolBot1'
},
'type': 'user'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/client/set` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/client/set', {
'obj': {
'username': 'CoolBot1'
},
'type': 'user'
},
{ 
headers: {
'apikey': '<YOUR-API-KEY>'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: {
   "id": "1064100501764968488",
        "username": "BDFDData",
        "avatar": "9d119ef13aa1a6162543a0de7cc96af2",
        "discriminator": "6039",
        "public_flags": 65536,
        "flags": 65536,
        "bot": true,
        "banner": null,
        "accent_color": null,
        "avatar_decoration_data": null,
        "collectibles": null,
        "banner_color": null,
        "clan": null,
        "mfa_enabled": true,
        "locale": "en-US",
        "premium_type": 0,
        "verified": true
    },  }
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 404</summary>

Invalid bot token was provided.{

```javascript
  status: 404,
  error: 'User cannot be found'
}
```

</details>


# /db

Custom Database functionality for dashboards or other neat features!

### Introducing a Custom Database!

BDFD has a nice database, let's not lie! However, BDFD's Database is incompatible if you wanted to build a web dashboard or something similar. Thats why we made Custom Database Functions!

{% content-ref url="/pages/pOFtyOt6bGudv0JzONlc" %}
[/delete](/endpoints/db/delete)
{% endcontent-ref %}

{% content-ref url="/pages/nvA4kUFNhCd8Jge407OY" %}
[/deleteAll](/endpoints/db/deleteall)
{% endcontent-ref %}

{% content-ref url="/pages/hYzkzBCCH3DDpHLGhkGj" %}
[/get](/endpoints/db/get)
{% endcontent-ref %}

{% content-ref url="/pages/oQJJ8NR3lWG2T5vOR59E" %}
[/getAll](/endpoints/db/getall)
{% endcontent-ref %}

{% content-ref url="/pages/GOXyvRfZ9PlNL9Z9cnhL" %}
[/set](/endpoints/db/set)
{% endcontent-ref %}


# /delete

Delete a specified variable from your database

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters:

* name - Name of the variable to delete <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/db/delete` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/db/delete;{
"name": "variable-name"
}]


$httpResult OR $httpResult[entries]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/db/delete` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/db/delete', {
name: 'variable-name'
},
{
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: true // returns 'true' if successfully deleted, else returns 'false'
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 424</summary>

Origin Database Unavailable

```javascript
  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}
```

</details>


# /deleteAll

Delete all variables matching a query OR wipe your Datebase

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint URL Parameters

* query - Retrieves entries based off if the provided string is within their names <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/db/deleteAll` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/deleteAll]


$httpResult OR $httpResult[entries]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/deleteAll?query=<SEARCH-QUERY>]

$httpResult OR $httpResult[entries]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/db/deleteAll` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/db/deleteAll', {
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
```

OR

<pre class="language-javascript"><code class="lang-javascript"><strong>const axios = require('axios');
</strong>(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/&#x3C;version>/db/deleteAll?query=&#x3C;SEARCH-QUERY>', {
headers: {
"apikey": "&#x3C;YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
</code></pre>

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Query Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: true // returns 'true' if successfully deleted, else returns 'false'
 }   
```

</details>

<details>

<summary>Code 200 (Query Used)</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: [ { age: 'true' }, { 'age-1': 'true' } ],  // ?query=age
 // returns name of entries and 'true' if successfully deleted, else returns 'false'
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 424</summary>

Origin Database Unavailable

```javascript
  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}
```

</details>


# /get

Get a specified variable from your database

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters:

* name - Name of the variable to get <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/db/get` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/db/get;{
"name": "variable-name"
}]

$httpResult OR $httpResult[entries]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/db/get` endpoint using Discord.js

<pre class="language-javascript"><code class="lang-javascript"><strong>const axios = require('axios');
</strong>(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/&#x3C;version>/db/get', {
name: 'variable-name'
}, 
{
headers: {
"apikey": "&#x3C;YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
</code></pre>

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: // returns the value of the specified variable
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 424</summary>

Origin Database Unavailable

```javascript
  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}
```

</details>


# /getAll

Retrieve all variables in your database

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint URL Parameters

* query - Retrieves entries based off if the provided string is within their names <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/db/getAll` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/getAll]


$httpResult OR $httpResult[entries]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/getAll?query=<SEARCH-QUERY>]

$httpResult OR $httpResult[entries]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/db/getAll` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/db/getAll', {
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
```

OR

<pre class="language-javascript"><code class="lang-javascript"><strong>const axios = require('axios');
</strong>(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/&#x3C;version>/db/getAll?query=&#x3C;SEARCH-QUERY>', {
headers: {
"apikey": "&#x3C;YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
</code></pre>

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Query Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: //returns everything in your database
 }   
```

</details>

<details>

<summary>Code 200 (Query Used)</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: //returns variables from your database that match the query provided
 }  
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 424</summary>

Origin Database Unavailable

```javascript
  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}
```

</details>


# /set

Creates or edits a variable in your database

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters:

* name - Name of the variable to set <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* value - Value of the variable to set <mark style="color:orange;">**\[String | Array | Object]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/db/set` endpoint using BDFD

<pre class="language-bash"><code class="lang-bash">$httpAddHeader[apikey;&#x3C;YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/&#x3C;version>/db/set;{
<strong>"name": "variable-name", 
</strong>"value": "variable-value"
}]

$httpResult OR $httpResult[entries]
</code></pre>

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/db/set` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/db/set', {
"name": "variable-name",
"value": "variable-value"
},
{
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 entries: // returns the value of the new or edited variable
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 424</summary>

Origin Database Unavailable

```javascript
  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}
```

</details>


# /decode

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* text - Text to decode <mark style="color:orange;">**\[String OR Array of Strings]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/decode` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/decode;{
text: 'l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/decode` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/decode', 
{  text: 'l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: 'test'
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /emoji-info

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* emoji - Unicode Emoji to fetch <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/emoji-info` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/emoji-info;{
emoji: '👎'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/emoji-info` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/emoji-info', 
{  emoji: '👎'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: {
    input: '👎',
    unicodeHex: '1f44e-20',
    twemoji: 'https://twemoji.maxcdn.com/v/latest/72x72/1f44e-20.png'
  }
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /encode

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* text - Text to encode <mark style="color:orange;">**\[String OR Array of Strings]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/encode` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/encode;{
text: 'test'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/encode` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/encode', 
{  text: 'test'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: 'l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l'
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /font

Convert your text into different font.

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* font - Font to use <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* text - Text to convert <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

<details>

<summary>List of Available Fonts</summary>

arrow-below - A͎r͎r͎o͎w͎ B͎e͎l͎o͎w͎

asterisk - A͙s͙t͙e͙r͙i͙s͙k͙

binary - 01000010 01001001 01001110 01000001 01010010 01011001

brackets-bold - 【B】【r】【a】【c】【k】【e】【t】【s】 【B】【o】【l】【d】

brackets-outline - 『B』『r』『a』『c』『k』『e』『t』『s』 『O』『u』『t』『l』『i』『n』『e』

brackets - \[̲̅B]\[̲̅r]\[̲̅a]\[̲̅c]\[̲̅k]\[̲̅e]\[̲̅t]\[̲̅s]

bridge-above - B͆r͆i͆d͆g͆e͆ A͆b͆o͆v͆e͆

bridge-below - B̺r̺i̺d̺g̺e̺ B̺e̺l̺o̺w̺

checked - C᩶h᩶e᩶c᩶k᩶e᩶d᩶

circle-black - 🅒🅘🅡🅒🅛🅔 🅑🅛🅐🅒🅚

circle-white - Ⓒⓘⓡⓒⓛⓔ Ⓦⓗⓘⓣⓔ

clouds - C͡l͡o͡u͡d͡s͡

currency - ₵ɄⱤⱤɆ₦₵Ɏ

curvy - ᑕᑌᖇᐯY

devlish - ԃҽʋʅιʂԋ

dot-above - Ḋȯṫ Ȧḃȯv̇ė

fairy - ᎦᏗᎥᏒᎩ

fraktur-bold - 𝕱𝖗𝖆𝖐𝖙𝖚𝖗 𝕭𝖔𝖑𝖉

fraktur - 𝔉𝔯𝔞𝔨𝔱𝔲𝔯

full-width - Ｆｕｌｌ Ｗｉｄｔｈ

gothic-bold - 𝕲𝖔𝖙𝖍𝖎𝖈 𝕭𝖔𝖑𝖉

gothic - 𝔊𝔬𝔱𝔥𝔦𝔠

happy - H̐̈a̐̈p̐̈p̐̈y̐̈

leet - 1337

lightning - L͛i͛g͛h͛t͛n͛i͛n͛g͛

lines - ̿͟͞L̿͟͞i̿͟͞n̿͟͞e̿͟͞s̿͟͞

manga - 爪卂几Ꮆ卂

medieval - 𝕸𝖊𝖉𝖎𝖊𝖛𝖆𝖑

morse - -----.-.....

old-italic - Ꝋ𐌋𐌃 𐌉𐌕𐌀𐌋𐌉𐌂

outline - 𝕆𝕦𝕥𝕝𝕚𝕟𝕖

overline - O͞v͞e͞r͞l͞i͞n͞e͞

plus-below - P̟l̟u̟s̟ B̟e̟l̟o̟w̟

rings - R̥ͦi̥ͦn̥ͦg̥ͦs̥ͦ

sad - S̑̈ȃ̈d̑̈

script-bold - 𝓢𝓬𝓻𝓲𝓹𝓽 𝓑𝓸𝓵𝓭

script - 𝒮𝒸𝓇𝒾𝓅𝓉

serif-bold - 𝐒𝐞𝐫𝐢𝐟 𝐁𝐨𝐥𝐝

serif-italic - 𝑆𝑒𝑟𝑖𝑓 𝐼𝑡𝑎𝑙𝑖𝑐

slash - S̷l̷a̷s̷h̷

smooth - ʂɱσσƚԋ

square-black - 🆂🆀🆄🅰🆁🅴 🅱🅻🅰🅲🅺

square-white - 🅂🅀🅄🄰🅁🄴 🅆🄷🄸🅃🄴

squiggle - ꇙꆰ꒤꒐ꍌꍌ꒒ꏂ

swap - Ŝ̬ŵ̬â̬p̬̂

tiny - ᵀᶦⁿʸ

typewriter - 𝚃𝚢𝚙𝚎𝚠𝚛𝚒𝚝𝚎𝚛

underline - U͟n͟d͟e͟r͟l͟i͟n͟e͟

upsidedown - ∩dsıpǝpoʍu

wizard - աɨʐǟʀɖ

</details>

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/font` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/font;{
font: 'fraktur',
text: 'test'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/font` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/font', 
{  font: 'fraktur',
text: 'test'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 details: '𝔱𝔢𝔰𝔱'
  //result is based off your input and may not be what you're expecting
  // this result is based off the examples used above.
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /foreach

Does a ForEach loop on Arrays to retrieve certain data

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* array- Array to loop through <mark style="color:orange;">**\[Array]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* opt - Option to retrieve during loop <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/foreach` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/foreach;{
array: [],
opt: 'userId'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/foreach` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/foreach', 
{  array: [],
opt: 'userId'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: [
  //Array is based off your input and may not be what you're expecting
 ]
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /guild

Retrieves information of a given guild OR maps guilds

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

{% hint style="warning" %}
If no `guild-id` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463" // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: {
    id: '1064098700307218463',
    name: 'BDFDData API',
    icon: 'https://cdn.discordapp.com/icons/1064098700307218463/457e6084378e8c0c7666d805e339316d.jpg',
    ...
    ...
    ...
    ...
   >  'Read on `Guild Objects` : https://discord.com/developers/docs/resources/guild#guild-object'
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /auditlog

Returns up-to 100 recent events from the guild audit log

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* guild-id - GuildId to fetch <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/auditlog` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/auditlog]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/auditlog` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/auditlog', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>"
"guild-id": "1064098700307218463"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: {
        "audit_log_entries": [{
            "id": "1384835562552168521",
            "action_type": "MessagePin",
            "user_id": "600824086943367168",
            "target_id": "600824086943367168",
            "options": {
                "channel_id": "1071036587728711720",
                "message_id": "1384835548518158376"
            }
        }]
    }
    
    // Read more on Audit Log Objects: https://discord.com/developers/docs/resources/audit-log#audit-log-object
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /bans

Retrieves information of a given ban or ban list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* member - ID of the banned member to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `member` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/bans` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[member;672215920558604332] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/bans]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/bans` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/bans', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
"member": "672215920558604332" // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      "avatar": null,
      "communication_disabled_until": null,
      "flags": 0,
      "is_pending": false,
      "joined_at": "1673771300",
      "nick": null,
      "pending": false,
      "premium_since": null,

   >  'Read on `Member Objects` : https://discord.com/developers/docs/resources/guild#guild-member-object' 
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /boosters

Retrieves a list of boosters in a guild

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/boosters` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/boosters]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/boosters?simple=true]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/boosters` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/boosters', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463"
}
}).then(res=>res.data)
})()
```

OR

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/boosters?simple=true', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      "avatar": null,
      "communication_disabled_until": null,
      "flags": 0,
      "is_pending": false,
      "joined_at": "1673771300",
      "nick": null,
      "pending": false,
      "premium_since": null,

   >  'Read on `Member Objects` : https://discord.com/developers/docs/resources/guild#guild-member-object' 
    ]
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details:  {
        "boosters": [{
            "id": "516551416064770059",
            "premium_since": "1750169844"
        }],// array of userids and the timestamp of when boosting started
        "boostCount": 1 // total boost coint
    },
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /channels

Retrieves information of a given channel or channel list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* channel - ID of the channel to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="info" %}
If no `channel` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/channels` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[channel;1076739010849947748] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/channels]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$c[Header 'channel' cannot be used when simple = true!]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/channels?simple=true]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/channels` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/channels', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
"channel": "1076739010849947748" // Optional header
}
}).then(res=>res.data)
})()
```

OR

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/channels?simple=true', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
  {
      "id": "1064102244523458680",
      "last_message_id": "1072162544359329842",
      "type": "GuildText",
      "name": "🎩・tips",
      "position": 5,
   
    
  >  'Read on `Channel Objects` : https://discord.com/developers/docs/resources/channel#channels-resource'
  ]
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
status: 200,
details: {
  channels: { // returns channel IDs!
    GuildText: [],
    GuildVoice: [],
    GuildCategory: [],
    GuildAnnouncement: [],
    AnnouncementThread: [],
    PublicThread: [],
    PrivateThread: [],
    GuildStageVoice: [],
    GuildDirectory: [],
    GuildForum: [],
    GuildNews: [],
    GuildNewsThread: [],
    GuildPublicThread: [],
    GuildPrivateThread: []
    },
    count: { // Returns channel count!
      GuildText: '26',
      GuildVoice: '2',
      GuildCategory: '5',
      GuildAnnouncement: '0',
      AnnouncementThread: '0',
      PublicThread: '0',
      PrivateThread: '0',
      GuildStageVoice: '0',
      GuildDirectory: '0',
      GuildForum: '1',
      GuildNews: '2',
      GuildNewsThread: '0',
      GuildPublicThread: '0',
      GuildPrivateThread: '0'
    }
  },
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /emojis

Retrieves information of a given emoji or emoji list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* emoji - ID of the emoji to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="warning" %}
If no `emoji` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/emojis` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[emoji;1064859897956663336] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/emojis]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/emojis` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/emojis', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
"emoji": "1064859897956663336" // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      name: 'BDFDdata',
      roles: [],
      id: '1064105162295230574',
      require_colons: true,
      managed: false,
      animated: false,
      available: true,
      user: {
        id: '616258826466754570',
        username: 'Ugly cousin',
        avatar: 'https://cdn.discordapp.com/avatars/616258826466754570/c6e0fa63177c4894c70784c0b43c5179.jpg',
        avatar_decoration: null,
        discriminator: '7902',
        public_flags: [ 'VerifiedBot' ],
        bot: true
      }
    }
  ]
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
    details: {
     "emojis": {
      "<:BDFDdata:1064105162295230574>": {
        "name": "BDFDdata",
        "id": "1064105162295230574",
        "animated": false
      },
      "<a:cocky:1064859897956663336>": {
        "name": "cocky",
        "id": "1064859897956663336",
        "animated": true
      },
      "<a:updates:1071058187916161104>": {
        "name": "updates",
        "id": "1071058187916161104",
        "animated": true
      },
      ...
    },
    "count": 30
  }
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /emoji-delete

Deletes an emoji from the provided guild

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters:

* emoji- ID of Emoji to fetch <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)
* reason - reason for deletion <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/emoji-delete` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/emoji-delete;{
"emoji": "<EMOJI-ID>",
"reason": "Optional Reason for deletion"
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/emoji-delete` endpoint using Discord.js

<pre class="language-javascript"><code class="lang-javascript">const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/&#x3C;version>/guild/channels', {
<strong>"emoji": "&#x3C;EMOJI-ID>",
</strong>"reason": "Optional reason for deletion"
},
{
headers: {
"apikey": "&#x3C;YOUR-API-KEY>",
"bot-token": "&#x3C;YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
}
}).then(res=>res.data)
})()
</code></pre>

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200
 // if successful, nothing gets returned. else will say 'Unkown Emoji'
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /event

Retrieves information of a given event or event list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* event - ID of the event to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `event` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/event` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[event;1012409860407918463] $c[Optional Header] 
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/event]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/event` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/event', {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id: '1064098700307218463',
'event': '1012409860407918463' //Optional Header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details:
     {
      id: '1093716999017865326',
      guild_id: '1064098700307218463',
      channel_id: null,
      creator_id: '672215920558604332',
      name: 'Test Event - Ignore This!!!!!',
      description: 'We love you, this is a secret!',
      "pending": false,
      "premium_since": null,

   >  'Read on `Event Objects`: https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object' 
    
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /create

Create an event for a guild

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* channel\_id - the channel id of the scheduled event. <mark style="color:orange;">**\[Snowflake]**</mark> ([<mark style="color:yellow;">\*</mark>](#user-content-fn-1)[^1])&#x20;
* entity\_metadata - the entity metadata of the scheduled event <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:yellow;">\*\*</mark>)&#x20;
* name - the name of the scheduled event <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* privacy\_level - the privacy level of the scheduled event <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* scheduled\_start\_time - the time to schedule the event <mark style="color:orange;">**\[ISO8601 timestamp]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* scheduled\_end\_time - the time when the event is scheduled to end <mark style="color:orange;">**\[ISO8601 timestamp]**</mark> (<mark style="color:yellow;">\*\*</mark>)&#x20;
* description - the description of the scheduled event <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* entity\_type - the entity type of the scheduled event <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* image - the cover image of the scheduled event <mark style="color:orange;">**\[Image Data]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %} <mark style="color:yellow;">\* Optional for events with 'entity\_type': EXTERNAL</mark>

<mark style="color:yellow;">\*\* Required for events with'entity\_type': EXTERNAL</mark>\
\
**We suggest you read Discord's** [**Documentation on Event Creation**](https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event)
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/event/create` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/event/create;{
 "name": "Tainted Love",
      "description": "Star Wars Is Cool",
      "scheduled_start_time": 1683215100,
      "scheduled_end_time": 1683242100,
      "privacy_level": 1,
      "entity_type": 1,
      "entity_metadata": {
        "location": "Alabama"
      }
 }]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/event/create` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/event/create', {
 "name": "Tainted Love",
      "description": "Star Wars Is Cool",
      "scheduled_start_time": 1683215100,
      "scheduled_end_time": 1683242100,
      "privacy_level": 1,
      "entity_type": 1,
      "entity_metadata": {
        "location": "Alabama"
      }
}, {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id: '1064098700307218463',
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200
 {
  status: 200,
  details:
     {
      id: '1093716999017865326',
      guild_id: '1064098700307218463',
      channel_id: null,
      creator_id: '672215920558604332',
      name: 'Test Event - Ignore This!!!!!',
      description: 'We love you, this is a secret!',
      "pending": false,
      "premium_since": null,

   >  'Read on `Event Objects`: https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object' 
  }
} 
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>

[^1]:


# /delete

Delete a specific event from the guild

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* event - ID of the event to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/event/delete` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/event/delete;{
 "event": "1012409860407918463"
 }]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/event/delete` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/event/delete', {
      "event": "1012409860407918463"
}, {
headers: {
"apikey": <YOUR-API-KEY>,
"bot-token": <YOUR-BOT-TOKEN>,
"guild-id": "1064098700307218463",
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200
 // if successful, nothing gets returned. else will say 'Unkown Event'
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /users

List the users interested in the specified event

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* event - ID of the event to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* limit - number of users to return (up to maximum 100) <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* with\_member - include guild member data if it exists <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* before -consider only users before given user id <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* after - consider only users before given user id <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/event/users` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/event/users;{
 "event": "1012409860407918463"
 }]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/event/users` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/event/users', {
      "event": "1012409860407918463"
}, {
headers: {
"apikey": <YOUR-API-KEY>,
"bot-token": <YOUR-BOT-TOKEN>,
"guild-id": "1064098700307218463",
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200
 {
  status: 200,
  details: [ 
    {
      user: {
        id: '672215920558604332',
        username: 'Rickყ',
        global_name: null,
        display_name: null,
        avatar: 'https://cdn.discordapp.com/avatars/672215920558604332/99585a23004b9e5592b3842e24636ae3.jpg',

   >  'Read on `Event User Objects`: https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object' 
  }]
} 
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /modify

Modify a specific event from the guild

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* event - ID of the event to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* channel\_id - the channel id of the scheduled event. <mark style="color:orange;">**\[Snowflake]**</mark> ([<mark style="color:yellow;">\*</mark>](#user-content-fn-1)[^1])&#x20;
* entity\_metadata - the entity metadata of the scheduled event <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:yellow;">\*\*</mark>)&#x20;
* name - the name of the scheduled event <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* privacy\_level - the privacy level of the scheduled event <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* scheduled\_start\_time - the time to schedule the event <mark style="color:orange;">**\[ISO8601 timestamp]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* scheduled\_end\_time - the time when the event is scheduled to end <mark style="color:orange;">**\[ISO8601 timestamp]**</mark> (<mark style="color:yellow;">\*\*</mark>)&#x20;
* description - the description of the scheduled event <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* entity\_type - the entity type of the scheduled event <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* status - the status of the scheduled event <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* image - the cover image of the scheduled event <mark style="color:orange;">**\[Image Data]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %} <mark style="color:yellow;">\* Optional for events with 'entity\_type': EXTERNAL</mark>

<mark style="color:yellow;">\*\* Required for events with'entity\_type': EXTERNAL</mark>\
\
**We suggest you read Discord's** [**Documentation on Event Modify**](https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event)
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/event/modify` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/event/modify;{
      "name": "Tainted Love - 2",
      "description": "Star Wars Is REALLY Cool"
 }]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/event/modify` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/event/modify', {
      "name": "Tainted Love 2",
      "description": "Star Wars Is REALLY Cool"
}, {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id: '1064098700307218463',
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200
 {
  status: 200,
  details:
     {
      id: '1093716999017865326',
      guild_id: '1064098700307218463',
      channel_id: null,
      creator_id: '672215920558604332',
      name: 'Test Event - Ignore This!!!!!',
      description: 'We love you, this is a secret!',
      "pending": false,
      "premium_since": null,

   >  'Read on `Event Objects`: https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object' 
  }
} 
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>

[^1]:


# /invite

Retrieves information of a given invite or invite list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* invite - invite code to be fetched <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `invite` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/invite` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[invite;9s65BZDrbV] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/invite]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/invite` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/invite', {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id: '1064098700307218463',
'invite': '9s65BZDrbV' // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
  {
      code: '8ZCcAbXq',
      type: 0,
      expires_at: 1681887486,
      guild: {
        id: '1064098700307218463',
        name: 'BDFDData API Community Support',
   >  'Read on `Invite Objects` : https://discord.com/developers/docs/resources/invite#invite-object' 
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /members

Retrieves information of a given member or member list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* member - ID of the member to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="warning" %}
If no `member` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/members` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[member;672215920558604332] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/members]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$c[Header 'member' cannot be used when simple = true!]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/members?simple=true]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/members` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/members', {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'member': '672215920558604332' // Optional header
}
}).then(res=>res.data)
})()
```

OR

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/members?simple=true', {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      "avatar": null,
      "communication_disabled_until": null,
      "flags": 0,
      "is_pending": false,
      "joined_at": "1673771300",
      "nick": null,
      "pending": false,
      "premium_since": null,

   >  'Read on `Member Objects` : https://discord.com/developers/docs/resources/guild#guild-member-object' 
    ]
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
    details: {
    bots: [
      '372022813839851520',
      '422087909634736160',
      '616258826466754570',
      '865524120573181972',
      '1064100501764968488'
    ],
    users: [
      '1016689477802000505', '1029783690789802014', '1037352318213029929',
      '1040668271222988901', '1053983386445828097', '1068344905979662406',
      '1071707514904789063', ...
    ],
    count: { users: 67, bots: 5, total: 72 }
  }
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /massrole

Add/Remove role(s) from all members of a guild

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

{% hint style="warning" %}
Guilds with high member counts are subject to rate limits, response will be delayed based off member count.
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* channel-id - ID of the channel to send the final response in <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>) (*See*[ *Status 200*](#code-200) *for example!*)

### Endpoint Body Parameters

* add - Role(s) to add to members <mark style="color:orange;">**\[Array of Snowflakes]**</mark> (<mark style="color:green;">**Optional\***</mark>)
* remove - Role(s) to remove from members <mark style="color:orange;">**\[Array of Snowflakes]**</mark> (<mark style="color:green;">**Optional\***</mark>)

{% hint style="danger" %}
At least one role is required in either `add` or `remove.`&#x20;

It is **Not Required** to have both supplied simultaneously.&#x20;
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/massroll` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[channel-id;1064098702001721486] $c[Optional header]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/massrole;{
"add": ["1064410587293028413"],
"remove": ["1065288607352488017"]
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/massrole` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/massrole', {
"add": ["1064410587293028413"],
"remove": ["1065288607352488017"]
}, {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'channel-id': '1064098702001721486' // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.\
\
\
If a `channel-id` was provided, a follow-up response will be sent to that channel when the action has completed. \
The message will consist of completion data results like\
**-** Successful role toggles\
**-** Failed role toggles (*Could have failed for a number of reasons, usually going to be a permissions or role hierarchy error*)\
**-** Amount of time it took to fully complete the request\
\
As stated before, the time the request takes will fluctuate based of the member count and how many rate limits it may hit.

<figure><img src="https://399872290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUkkHLTe8sdZ6L5exg9f2%2Fuploads%2FWCErHh2UBFlWqd4rtDNC%2Fimage.png?alt=media&amp;token=5fd3b698-0a03-4f03-9f9b-18363b09f542" alt=""><figcaption></figcaption></figure>

{% code fullWidth="false" %}

```javascript
{
  status: 200,
    details: "Operation has started, this could take a while"
}
```

{% endcode %}

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /permissions

Returns array of permissions for either a Channel or Role resource

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* property - ID of the channel or role to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/permissions` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[property;1064098700307218463]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/permissions]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/permissions` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/permissions', { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'property': '1064098700307218463'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Channel)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [{
        "id": "1077976311240331344",
        "type": "role",
        "allow": ["AddReactions", "ViewChannel", "SendMessages", "EmbedLinks", "AttachFiles", "ReadMessageHistory", "MentionEveryone", "UseExternalEmojis", "UseApplicationCommands", "CreatePublicThreads", "UseExternalStickers", "SendMessagesInThreads", "UseEmbeddedActivities", "SendPolls", "UseExternalApps"],
        "deny": []
    }, {
        "id": "1064098700307218463",
        "type": "role",
        "allow": [],
        "deny": ["ViewChannel", "Connect"]
    }],
}
```

</details>

<details>

<summary>Code 200 (Role)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: ["CreateInstantInvite", "AddReactions", "Stream", "ViewChannel", "SendMessages", "EmbedLinks", "AttachFiles", "ReadMessageHistory", "UseExternalEmojis", "Connect", "Speak", "UseVAD", "UseExternalStickers", "SendMessagesInThreads"],

}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /prune

Prunes x amount of members from the provided guild

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters:

* days - number of days to prune (1-30) <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)
* count - whether `pruned` is returned, discouraged for large guilds <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)
* roles - role(s) to include <mark style="color:orange;">**\[Array of Snowflakes]**</mark> (<mark style="color:green;">**Optional**</mark>)
* reason - reason for the prune <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/prune` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/prune;{
days: 30,
reason: 'They dead lolz'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/prune` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/guild/prune', {
days: 30,
reason: 'They dead lolz'
}, {
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
 details: {pruned: x } // 'x' is replaced with the number of pruned members IF count is true
 }   
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /rolememberlist

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* role-id - ID of the role to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/rolememberlist` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[role-id;1064098700307218463]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/rolememberlist]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[role-id;1064098700307218463]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/rolememberlist?simple=true]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/rolememberlist` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/rolememberlist', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
"role-id": "1076739010849947748"
}
}).then(res=>res.data)
})()
```

OR

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/rolememberlist?simple=true', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463"
"role-id": "1076739010849947748"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [{
        "avatar": null,
        "banner": null,
        "communication_disabled_until": null,
        "flags": 0,
        "joined_at": "1745424337",
        "nick": null,
        "pending": false,
        "premium_since": null,
        "roles": ["1064410587293028413"],
        "unusual_dm_activity_until": null,
        "user": {
            "id": "123",
            "username": "user123",
            },
        "mute": false,
        "deaf": false
    }
  ]
  //gives array of full member objects
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
status: 200,
 "details": {
      "members": [{
            "id": "123",
            "username": "user123"
        }, {
            "id": "456",
            "username": "user456"
        }, {
            "id": "789",
            "username": "user789"
        }]
    }
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /roles

Retrieves information of a given role or role list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* role - ID of the role to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Endpoint URL Parameters

* simple - Retrieves a simpler set of data <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="warning" %}
If no `role` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/roles` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[role;1064098700307218463] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/roles]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$c[Header 'role' cannot be used when simple = true!]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/roles?simple=true]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/roles` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/roles', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463",
"role": "1076739010849947748" // Optional header
}
}).then(res=>res.data)
})()
```

OR

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/roles?simple=true', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "1064098700307218463"
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (Simple Not Used)</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      id: '1064101750463799326',
      name: 'Founders',
      description: null,
      permissions: [],
      position: 5,
      color: 3066993,
      hoist: true,
      managed: false,
      mentionable: false,
      icon: null,
      unicode_emoji: null,
      flags: 0
    }
  ]
}
```

</details>

<details>

<summary>Code 200 (Simple Used)</summary>

API succeeded and details were fetched.

```javascript
{
status: 200,
 "details": {
    "roles": { // returns role name and ids (This example is from the support server)
      "@everyone": "1064098700307218463",
      "*": "1064099060702781461",
      "MasterBot": "1064101589729693740",
      "Founders": "1064101750463799326",
      "iVerified": "1064410587293028413",
      "Ugly cousin": "1064443842222366805",
      "Bots": "1064443871595077705",
      "Ping.Updates()": "1065288502637510676",
      "Ping.Announcements()": "1065288515539177512",
      "Ping.Polls()": "1065288607352488017",
      "Status Notifier": "1066204188285091852",
      "AltDentifier": "1070747620831658096",
      "Top.gg": "1072809281646235703",
      "Support": "1076416601034862612",
      "Moderator": "1076417228603408475",
      "Staff": "1077976311240331344",
      "Server Booster": "1108799499104698418",
      "PassMan": "1135308478970331240",
      "PassMan BETA": "1153519405372817451"
    },
    "count": 19 // number of roles in the server
  }
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /slash

Retrieves information of a given slash cmd or slash cmd list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* app-id- Your bot ID <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* slash - ID of the guild slash command to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `slash` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/slash` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[slash;1064098700307218463] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/slash]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/slash` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/slash', { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'slash': '1064098700307218463' //Optiona Header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
      {
"application_id": "1017020942230241330",
"default_member_permissions": null,
"default_permission": true,
"description": "rickyjs awesome frickin' api",
"guild_id": "1064098700307218463",
      ...
      ...
      ...
         >  'Read on `Slash Objects` : https://discord.com/developers/docs/interactions/application-commands#application-command-object'
      }
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /stickers

Retrieves information of a given sticker or sticker list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* sticker - NAME OR ID of the sticker to be fetched <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `sticker` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/stickers` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[sticker;1064098700307218463] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/stickers]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/stickers` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/stickers', { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'sticker': '1064098700307218463' //Optiona Header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      id: '1027829706160078879',
      name: 'fcbc',
      tags: '100',
      type: 'Guild',
      ...
      ...
      ...
         >  'Read on `Sticker Objects` : https://discord.com/developers/docs/resources/sticker#sticker-object'
      }
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /voice/change

Modifies a user voice state in a guild voice channel

{% hint style="warning" %}
This endpoint may be renamed. It is uncertain at this point in time.
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* user-id - ID of the member to modify <mark style="color:orange;">**\[Snowflake]**</mark> <mark style="color:red;">(</mark><mark style="color:red;">**Required**</mark><mark style="color:red;">)</mark>
* channel-id - ID of the channel to move the member to. Leave null to disconnect the user. **\[Snowflake]** (<mark style="color:green;">**Optional**</mark>)
* mute - Whether to server mute the member <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)
* deaf - Whether to server deafen the member <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)
* time - How long the mute / deaf should last <mark style="color:orange;">**\[Timestamp (1s, 5m, 2h etc)]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/voice/change` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/voice/change, {
channel-id: "123456789",
mute: "true",
deaf: "true",
time: "5m"
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/members` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/voice/change', {
"channel-id": "123456789",
"mute": "true",
"deaf": "true",
"time": "5m"
},{
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched. (If successful, responds with member object)

```javascript
{
  status: 200,
  details: [
    {
      "avatar": null,
      "communication_disabled_until": null,
      "flags": 0,
      "is_pending": false,
      "joined_at": "1673771300",
      "nick": null,
      "pending": false,
      "premium_since": null,

   >  'Read on `Member Objects` : https://discord.com/developers/docs/resources/guild#guild-member-object' 
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /webhooks

Returns information on either all guild webhooks or webhook in a specified channel.

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* channel-id - ID of the channel to fetch webhooks from <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `channel-id` was specified, it will grab all webhooks in the guild.
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/guild/webhooks` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463] 
$httpAddHeader[channel-id;1064098700307218463] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/guild/webhooks]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/guild/webhooks` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/guild/webhooks', { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'channel-id': '1064098700307218463' //Optiona Header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details:[{
        "application_id": "865524120573181972",
        "avatar": "52485cc8a0cb9e4df97fc601771a09ec",
        "channel_id": "1066204100296974427",
        "guild_id": "1064098700307218463",
        "id": "1066204434419433493",
        "name": "Status Notifier",
        "type": 1,
        "user": {
            "id": "865524120573181972",
            "username": "Status Notifier",
            "avatar": "afdb2b0f63acaca8b2859f705020d991",
            "discriminator": "0143",
            "public_flags": 65536,
            "flags": 65536,
            "bot": true,
            "banner": null,
            "accent_color": null,
            "global_name": null,
            "avatar_decoration_data": null,
            "collectibles": null,
            "banner_color": null,
            "clan": null,
            "primary_guild": null
        }
    }]
    // Read more on Webhook Objects: https://discord.com/developers/docs/resources/webhook#webhook-resource
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>

<details>

<summary>Code 404</summary>

Guild was not found via DAPI

```javascript
{
  status: 404,
  details: { message: 'Unknown Guild', code: 10004 } (this can vary)
}
```

</details>


# /map

Maps through an array to find a certain identifier

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* array - Array to map through <mark style="color:orange;">**\[Array]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* id - Identifier to retrieve during map <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/map` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/map;{
array: [],
id: 'userId'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/map` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/map', 
{  array: [],
id: 'userId'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: [
  //Array is based off your input and may not be what you're expecting
 ]
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /messages

Retrieves information of a given message OR maps messages of a channel

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* chan-id - ID of the channel to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)
* msg-id - ID of the message to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* limit - Number of messages to fetch if no msg-id is provided <mark style="color:orange;">**\[Integer 1-100]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="warning" %}
If no `msg-id` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/messages` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[chan-id;433453456646243565]
$httpAddHeader[msg-id;1064098700307218463] $c[Optional header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/messages]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/messages` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/messages', {
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"chan-id": "9687459278405623556",
"msg-id": "64563453457782237788"  // Optional header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: {
    id: '1047848807775358976',
    type: 'Default',
    content: 'lol gn bro',
    channel_id: '1024040173345984562',
    ...
    ...
    ...
  >  'Read on `Message Objects` : https://discord.com/developers/docs/resources/channel#message-object'
}  
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /reaction

Retrieves all or a specific emoji reaction(s) from a message

{% hint style="info" %}
This endpoint will require a POST request when sending the `emoji` parameter.,&#x20;
{% endhint %}

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* chan-id - ID of the channel to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* msg-id - ID of the message to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* emoji - ID of the guild to be fetched <mark style="color:orange;">**\[Unicode Emoji OR String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
Default emojis must be sent as unicode

Custom Emojis must be sent as `name:id`
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/reaction` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[chan-id;1064098700307218463]
$httpAddHeader[msg-id;1064098700847210194]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/reaction]


$httpResult OR $httpResult[details]
```

OR

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[chan-id;1064098700307218463]
$httpAddHeader[msg-id;1064098700847210194]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/reaction;{
emoji: <EMOJI>}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/reaction` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/reaction', {emoji: <EMOJI>}{ 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'chan-id': '1064098700307218463',
'msg-id': '1064098700847210194'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 (All Emojis)</summary>

API succeeded and details were fetched.

(Retrieves emoji info of the reactions on the message)

```javascript
{
 status: 200,
  details: [
    {
      emoji: { id: '871452210012250182', name: 'lmao' },
      count: 1,
      count_details: { burst: 0, normal: 1 },
      burst_colors: [],
      me_burst: false,
      me: false
    }
  ]
}}
```

</details>

<details>

<summary>Code 200 (Specific Emoji)</summary>

API succeeded and details were fetched.

(Retrieves user-info of users who reacted with the specified emoji)

```javascript
{
 status: 200,
  details: [
    {
      id: '672215920558604332',
      username: 'Rickყ',
      global_name: null,
      display_name: null,
      avatar: '99585a23004b9e5592b3842e24636ae3',
      avatar_decoration: null,
      discriminator: '2006',
      public_flags: 4194560
    }
  ]
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /add

Adds a specific emoji reaction to a message

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* chan-id - ID of the channel to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* msg-id - ID of the message to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* emoji - The emoji to be fetched <mark style="color:orange;">**\[Array of Unicode Emoji(s) OR String(s)]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

{% hint style="warning" %}
Default emojis must be sent as unicode

Custom Emojis must be sent as `name:id`
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/reaction/add` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[chan-id;1064098700307218463]
$httpAddHeader[msg-id;1064098700847210194]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/reaction/add;{
emoji: [<EMOJI1>, <EMOJI2>, ...]
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/reaction/add` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/reaction/add', {
emoji: [<EMOJI1>, <EMOJI2>, ...]
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'chan-id': '1064098700307218463',
'msg-id': '1064098700847210194'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

(Retrieves emoji info of the reactions on the message)

```javascript
{
 status: 200,
 // if successful, nothing gets returned. else will say 'Unkown Emoji'
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /delete

Deletes all or a specific emoji reaction(s) from a message

{% hint style="info" %}
This endpoint requires a POST request!
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* chan-id - ID of the channel to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* msg-id - ID of the message to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* emoji - The emoji to be fetched <mark style="color:orange;">**\[Unicode Emoji OR String]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;
* user-id - Delete specific users' reactions <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

{% hint style="info" %}
If no `emoji` was specified, it will delete all reactions otherwise it will delete the one emoji specified. <br>

If no `user-id` was specified, it will delete all reactions otherwise it will delete the one from the user specified.&#x20;
{% endhint %}

{% hint style="warning" %}
Default emojis must be sent as unicode

Custom Emojis must be sent as `name:id`
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/reaction/delete` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[chan-id;1064098700307218463]
$httpAddHeader[msg-id;1064098700847210194]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/reaction/delete;{
'emoji': <EMOJI>,
'user-id': '672215920558604332'
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/reaction/delete` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/reaction/delete', {
'emoji': <EMOJI>,
'user-id': '672215920558604332'
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'guild-id': '1064098700307218463',
'chan-id': '1064098700307218463',
'msg-id': '1064098700847210194'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

(Retrieves emoji info of the reactions on the message)

```javascript
{
 status: 200,
 // if successful, nothing gets returned. else will say 'Unkown Emoji'
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 406</summary>

Body parameters were sent incoherently and could not be computed.

```
{ 
status: 406, 
error: 'Invalid formation of body paramaters.' 
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /poll

{% content-ref url="/pages/fmX33snua0ABvD41QyJH" %}
[/create](/endpoints/poll/create)
{% endcontent-ref %}


# /create

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* guild-id - ID of the guild to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* channel-id - ID of the channel to send the poll in <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Endpoint Body Parameters

* question - The question to ask <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* answers - Array of answer objects to choose from <mark style="color:orange;">**\[Array]**</mark> (<mark style="color:red;">**Required**</mark>) *(See below)*
* duration - How long, in hours, the poll runs for, default 24 <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:green;">**Optional**</mark>)
* multiselect - Allow users to select multiple answers, default false <mark style="color:orange;">**\[Boolean]**</mark> (<mark style="color:green;">**Optional**</mark>)
* content - Message content outside the poll to send <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Answer Objects

The `answers` array will consist of an object for each choice

* text - The actual content of the answer choice <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* emoji - An emoji object to display on the answer choice <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Emoji Objects

Within the answer objects, is also an emoji object

* name - Name of emoji, only use for default discord emojis <mark style="color:orange;">**\[Unicode Emoji]**</mark> (<mark style="color:green;">**Optional**</mark>)\*
* id - Id of emoji, only use for custom emojis <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)\*

{% hint style="warning" %}
&#x20;\* If using an emoji in an answer, at least one field is required.
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/poll/create` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064100501764968492] 
$httpAddHeader[channel-id;106410057927968435] 
$httpPost[https://bdfddata.rickyjs.xyz/<version>/poll/create;{
"question": "How are you today",
 "answers": [
   {
     "text": "I'm doing alright",
   	"emoji": {"name": "👍"}
   },
   {
   "text": "I'm not okay.",
    "emoji": {"name": "👎"}
   }
 ],
  "duration": 24, $c[24 hours]
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/poll/create` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/poll/create', {
"question": "How are you today",
 "answers": [
   {
     "text": "I'm doing alright",
   	"emoji": {"name": "👍"}
   },
   {
   "text": "I'm not okay.",
    "emoji": {"name": "👎"}
   }
 ],
  "duration": 24, //24 hours
},{
headers: {
"apikey": "<YOUR-API-KEY>",
"bot-token": "<YOUR-BOT-TOKEN>",
"guild-id": "16938230564996837",
"channel-id": "95727989795685839" 
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
    details:  {
    // will return full message object, but here is how the poll looks
        "poll": {
            "question": {
                "text": "?"
            },
            "answers": [{
                "answer_id": 1,
                "poll_media": {
                    "text": "Do it!",
                    "emoji": {
                        "id": null,
                        "name": "👍"
                    }
                }
            }, {
                "answer_id": 2,
                "poll_media": {
                    "text": "It's not necessary",
                    "emoji": {
                        "id": null,
                        "name": "👎"
                    }
                }
            }],
            "expiry": "2025-06-18T13:38:36.734927+00:00",
            "allow_multiselect": true,
            "layout_type": 1,
            "results": {
                "answer_counts": [],
                "is_finalized": false
            }
        }
    }
    
    // Read more on Message Object: https://discord.com/developers/docs/resources/message#messages-resource
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 401</summary>

Invalid bot token was provided.

```javascript
{
  status: 401,
  details: { message: '401: Unauthorized', code: 0 }
}
```

</details>


# /repeat

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Endpoint Body Parameters

* code - code to repeat <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* times - amount of times to repeat <mark style="color:orange;">**\[Integer]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/repeat` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/repeat;{
code: 'test',
times: 10
}]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/repeat` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/repeat', 
{  code: 'test',
times: 10
}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
 status: 200,
  details: 'testtesttesttesttesttesttesttesttesttest'
}}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


# /slash

Retrieves information of global slash cmd or cmd list

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* app-id- Your Bot ID <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* slash - ID of slash command <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:green;">**Optional**</mark>)&#x20;

{% hint style="warning" %}
If no `slash` was specified, it will grab all data and retrieve an **Array**, otherwise it will grab the one specified and retrieve an **Object**.&#x20;

<mark style="color:red;background-color:yellow;">**This will affect how to grab your data!**</mark>
{% endhint %}

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/slash` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[app-id;1064100501764968488]
$httpAddHeader[slash;1064098700307218463] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/slash]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/slash` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/slash', { 
headers: {
'apikey': <YOUR-API-KEY>,
'bot-token': <YOUR-BOT-TOKEN>,
'app-id': '1064100501764968488',
'slash': '1064098700307218463' //Optiona Header
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: [
    {
      id: '1064417354504753203',
      application_id: '1064100501764968488',
      version: '1064417354504753204',
      default_permission: true,
      default_member_permissions: null,
      type: 'CHAT_INPUT',
      nsfw: false,
    ...
    ...
    ...
  >  'Read on `Slash Objects` : https://discord.com/developers/docs/interactions/application-commands#application-command-object'
} 
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 404</summary>

Invalid bot token was provided.{

```javascript
  status: 404,
  error: 'User cannot be found'
}
```

</details>


# /user

Retrieves information of a given user

{% hint style="info" %}
This endpoint supports the [Exclude](/exclude-header) header
{% endhint %}

### Endpoint Headers:

* user-id - ID of the user to be fetched <mark style="color:orange;">**\[Snowflake]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;
* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

### Examples:

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/user` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[user-id;672215920558604332] $c[Optional Header]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/user]


$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/user` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/user', { 
headers: {
'user-id': '672215920558604332'
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200</summary>

API succeeded and details were fetched.

```javascript
{
  status: 200,
  details: {
    id: '672215920558604332',
    username: 'Rickყ',
    avatar: 'https://cdn.discordapp.com/avatars/672215920558604332/a_c523e3eea9c69f64e8eca89e07069bd5.gif',
    avatar_decoration: 'https://cdn.discordapp.com/avatar-decorations/672215920558604332/a_ec7e6bb6c0c96acf4eb1ce04bc4ce727',
    discriminator: '2006',
    public_flags: [ 'HypeSquadOnlineHouse3', 'ActiveDeveloper', 'NitroSubscriber' ],
    banner: 'https://cdn.discordapp.com/banners/672215920558604332/a_b5f4570a74c801aa3b39f35e07fe93fd.gif',
    banner_color: '4a74d8',
    accent_color: 4879576,
    tag: 'Rickყ#2006'
  }
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>

<details>

<summary>Code 404</summary>

Invalid bot token was provided.{

```javascript
  status: 404,
  error: 'User cannot be found'
}
```

</details>


