> For the complete documentation index, see [llms.txt](https://tdhandler.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tdhandler.js.org/get-started.md).

# Get Started

## Requirements

1. At least Node.JS v.16
2. Discord.JS v.13
3. Latest version of TDHandler
4. A Discord Bot and its Token

## Create a start Instance

To start a new Instance, you need to create a new Object first (the options can be found [here](/classes/tdinstance.md)):

```javascript
// Frist import the class
const { TDInstance } = require("tdhandler");

// then call the constructor
// the options can be found in the description of TDInstance class
new TDInstance(your options);
```

Then you need to log in with your Discord.JS Client and initialize the TDInstance:

```javascript
// Create the client object
const { Client } = require("discord.js");

const client = new Client({
    intents: ["GUILDS", "GUILD_MESSAGES"],
});

client.on('ready', async () => {
    await tdhandler.init(client);
    console.log(`Logged in as ${client.user.username}`);
});

client.login(your bot token);
```


---

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

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

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

```
GET https://tdhandler.js.org/get-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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