# Getting Started

Before we get started, I'm making the assumption you already have node.js and such installed, and that you know how to use discord.js basically.

If you don't, go read [this](https://discordjs.guide), as that goes outside the scope of this guide.

### "The basics"

Alright, skipping the `npm i discord.js` and such, here's the quick, base code we'll be using to develop this reaction guide bot off:

```javascript
const Discord = require('discord.js');
const config = require('./config.json');

const client = new Discord.Client();

// pages

// the reaction logic will be here

client.on('ready', () => {
    console.log(`Logged in as ${client.user.tag} (ID ${client.user.id})`);
});

client.on('message', async (msg) => {
    if (!msg.content.toLowerCase().startsWith(config.prefix) || msg.author.bot) return;

    const args = msg.content.slice(prefix.length).split(/ +/g);
    const command = args.shift().toLowerCase();
    
    if (command == 'help') {
        // our help command will be here
    }
});

client.login(config.token);
```

And for the `config.json`..

```javascript
{
    "token": "your amazing token here",
    "prefix": "!"
}
```

Great. The three comments left will be where we create the logic and start for our command, but this will be split into a couple sections for readability.

Now, let's go to the next part, making the command.


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://tonybo981.gitbook.io/reaction-help-guide/stable/getting-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.
