# Get bot's information

## Log bot's username when ready.

```javascript
client.on('ready', ()=> {
   console.log('Logged as', client.user.username);
});
```

## Log every information about the logged bot.

```javascript
client.on('ready', ()=> {
   console.log(client.user);
});
```

Output (example):

<pre class="language-json"><code class="lang-json"><strong>UserClient {
</strong>  _client: Client,
  id: "AQbXpB84",
  botID: "c06b6d42-05db-4af7-8a28-faae65b53e7a",
  type: "bot",
  username: "touchguild testing bot",
  _createdAt: 1666429419806,
  createdBy: "4kR9QRVA"
}
</code></pre>

You can use the information like the one above to do whatever you want with it.


---

# 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://legacy.docs.touchguild.com/documentation/select-version/v.0.1.7/examples/get-bots-information.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.
