Skip to content
AI aiWithCtx

$aiWithCtx — Like $ai, with the context of the message that triggered the command. Uses your AI credits.

Like `$ai`, with the context of the message that triggered the command. Uses your AI credits.

Syntax

$aiWithCtx[prompt;(system prompt);(response token limit)]

Parameters

  • prompt (text, required) — For example Summarize the message above.
  • system prompt (text, optional) — Extra instructions, added after the message context.
  • response token limit (number, optional) — Caps the length of the answer.

Return Value

  • The AI answer, trimmed. Empty when the call failed.

Usage

$aiWithCtx[$message;Be friendly and casual]

Important Notes

  • The AI receives the author (name and ID), channel, server, message content and the quoted message (200 characters at most).
  • Same credits, limits and availability as $ai.

Example

$nomention
$aiWithCtx[$message;Be friendly and casual]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.