$aiWithCtx

Premium

Prompts AI with your message alongside the Discord message context (author, channel, server, mentions, attachments, reactions, and replied-to message).

Syntax

$aiWithCtx[Prompt;(System prompt;Response token limit)]

Parameters

  • Prompt (Type: String || Flag: Required): Prompt to the AI, for example: “Summarize the message above”.
  • System prompt (Type: String || Flag: Optional): Additional system prompt appended after the message context.
  • Response token limit (Type: Integer || Flag: Optional): Limit length of the response generated by AI.

Context provided to AI

The following information from the triggering Discord message is automatically included:

FieldDescription
AuthorUsername and user ID
Author nicknameServer nickname, if set
ChannelChannel name
ServerServer name
TimestampMessage sent time
Edited atEdit time, if the message was edited
Mentions everyoneWhether @everyone was used
MentionsUsernames and IDs of mentioned users
AttachmentsFilenames of attached files
ReactionsEmoji name and reaction count
Reply toAuthor and content (up to 200 characters) of the replied-to message

Example

$nomention
$aiWithCtx[$message;Be friendly and casual]
!example Hello, how's it going? Hey Rainbow! All good here, thanks for asking! Hope you're doing great too 😊

Tip

Use $ai[] if you want to supply the content manually without automatic message context.