# Intellisense

## Examples

{% tabs %}
{% tab title="JavaScript" %}

```javascript
// File Name - ping.js

const { MessageEmbed } = require("discord.js");
const { Command } = require("cdhandler");

module.exports = new Command({
  name: "ping",
  aliases: ["Pong"],
  description: "Replies with Pong!",
  cooldown: "5s",
  cooldownMessage: "Wait {REMAINING} more to execute this command again!",
  //usage: "", it's not needed on this command
  //example: "", it's not needed on this command
  minArgs: 0,
  maxArgs: 0,
  argsMessage:
    "Incorrect Arguments! There are no arguments required for this command!",
  dev: true,
  devMessage: "You must be a developer to run this command!",
  nsfw: true,
  nsfwMessage: "You cannot run this command in SFW channels!",
  permissions: ["KICK_MEMBERS"],
  permissionsMessage:
    "You must have the 'Kick Members' permission to run this command!",
  botPermissions: ["EMBED_LINKS"],
  botPermissionsMessage:
    "I cannot run this command without the 'Embed Links' permission!",
  category: "Misc",
  locked: true,
  lockedMessage: "This command is locked at the moment!",
  hidden: true,
  hidden2: true,
  servers: ["769710808435261490"],
  serversMessage: "Use this command in CDHandler support server!",
  run: ({ message, args, client, handler }) => {

    const embed = new MessageEmbed()
    .setColor("#00DCFF")
    .setTitle("Pong!");

    message.channel.send(embed);

    handler.cooldown(message, "5s"); // this creates a cooldown
  },
});
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
// File Name - ping.ts

import { MessageEmbed } from "discord.js";
import { Command, CommandOptions } from "cdhandler";

export default new Command({
  name: "ping",
  aliases: ["Pong"],
  description: "Replies with Pong!",
  cooldown: "5s",
  cooldownMessage: "Wait {REMAINING} more to execute this command again!",
  //usage: "", it's not needed on this command
  //example: "", it's not needed on this command
  minArgs: 0,
  maxArgs: 0,
  argsMessage:
    "Incorrect Arguments! There are no arguments required for this command!",
  dev: true,
  devMessage: "You must be a developer to run this command!",
  nsfw: true,
  nsfwMessage: "You cannot run this command in SFW channels!",
  permissions: ["KICK_MEMBERS"],
  permissionsMessage:
    "You must have the 'Kick Members' permission to run this command!",
  botPermissions: ["EMBED_LINKS"],
  botPermissionsMessage:
    "I cannot run this command without the 'Embed Links' permission!",
  category: "Misc",
  locked: true,
  lockedMessage: "This command is locked at the moment!",
  hidden: true,
  hidden2: true,
    servers: ["769710808435261490"],
  serversMessage: "Use this command in CDHandler support server!",
  run: ({ message, args, client, handler }: any) => {
    
    const embed = new MessageEmbed()
    .setColor("#00DCFF")
    .setTitle("Pong!");

    message.channel.send(embed);

    handler.cooldown(message, "5s"); // this creates a cooldown
  },
} as CommandOptions);
```

{% endtab %}
{% endtabs %}


---

# 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://creativedevelopments.gitbook.io/cdhandler/using-cdhandler/intellisense.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.
