Sign In

GET /v1/lookup/:query

Look up rich Discord-formatted metadata for a function, event, enum, or guide. [Requires Private API Key]

Private Endpoints Private API Key Required

Endpoint

https://api.botforge.org/v1/lookup/:query

Query Parameters

Name Type Required Description
type String No Choices: "function" (default), "event", "enum", "guide".
package String No Package filter.
branch String No Branch filter.

Examples

cURL

curl -X GET "https://api.botforge.org/v1/lookup/:query" \
  -H "X-API-Key: YOUR_API_KEY"

JavaScript / TypeScript

const res = await fetch("https://api.botforge.org/v1/lookup/:query", {
  headers: {
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await res.json();

Response Example

{
  "found": true,
  "type": "function",
  "name": "$sendMessage",
  "slug": "sendMessage",
  "package": "forgescript",
  "packageName": "ForgeScript",
  "branch": "main",
  "isDevBranch": false,
  "isDevOnly": false,
  "isDeprecated": false,
  "deprecatedWarning": "",
  "isExperimental": false,
  "experimentalWarning": "",
  "description": "Sends a message to a channel",
  "version": "1.0.0",
  "versionClean": "1_0_0",
  "pill_0_name": "v1_0_0_1",
  "pill_1_name": "v1_0_0_2",
  "pill_0_url": "https://api.botforge.org/v1/pill?v=1.0.0&part=0&slices=2",
  "pill_1_url": "https://api.botforge.org/v1/pill?v=1.0.0&part=1&slices=2",
  "signature": "$sendMessage[channel ID;content?;return message ID?]",
  "url": "https://docs.botforge.org/packages/forgescript/functions/sendMessage",
  "githubUrl": "https://github.com/tryforge/ForgeScript/blob/main/src/native/channel/sendMessage.ts",
  "hasGithubUrl": true,
  "hasArgs": true,
  "argsText": "**channel ID**<:required:1574267576417128539>(Channel, required)\n-# The channel to send this message to\n\n**content** (String, optional)\n-# The content for the message\n\n**return ...",
  "previewCount": 1,
  "previewUrls": [
    "https://docs.botforge.org/previews/forgescript/sendMessage.png"
  ],
  "previewUrlsJoined": "https://docs.botforge.org/previews/forgescript/sendMessage.png",
  "hasGuide": true,
  "guideTitle": "External channel dispatching with $sendMessage",
  "guideSectionsCount": 1,
  "guideSection_0_intro": "Use `$sendMessage` to send a message to a specific channel, thread, or direct message destination.",
  "guideSection_0_imageUrl": "https://docs.botforge.org/previews/forgescript/sendMessage.png",
  "guideSection_0_code": "$onlyIf[$message!=;Provide an alert message to send.]\n$let[msgId;$sendMessage[112233445566778899;Audit Alert: $message;true]]\nAlert dispatched to audit logs. Message ID: $get[ms...",
  "guideSection_0_lang": "forgescript",
  "guideOutro": "### Arguments\n\n1. **channel ID**: The target channel, thread, or DM ID to send the message to.\n2. **message**: The text content to send.\n3. **return ID**: Optional boolean. Set ...",
  "guideHasOutro": true
}

Was this page helpful?