> For the complete documentation index, see [llms.txt](https://dadocs.rickyjs.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dadocs.rickyjs.xyz/djsenv.md).

# \[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.)
