Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Effect-TS/discord-bot/llms.txt

Use this file to discover all available pages before exploring further.

The Documentation Lookup feature registers two slash commands that let you search the Effect API reference without leaving Discord.

/docs

Searches the Effect v3 documentation.

/docs-v4

Searches the Effect v4 (effect-smol) documentation.

How it works

1

Start typing a query

Begin typing after /docs or /docs-v4. Discord’s autocomplete triggers once you have entered at least 3 characters.
2

Pick a result

The bot performs a fuzzy search (powered by fuzzysort) across all module/function names and returns up to 25 suggestions.
3

Choose visibility

Set the public option to true to post the embed visibly in the channel, or false to receive an ephemeral response only you can see.
4

View the embed

The bot responds with a rich embed containing the type signature, description, examples, and a link to the source.

Data source

Documentation entries are fetched from the tim-smart/effect-io-ai JSON files on GitHub and cached with Resource.auto. The cache is refreshed every 3 hours.
DocsLookup.ts
const docs = yield* Resource.auto(
  Effect.forEach(options.docUrls, loadDocs, {
    concurrency: docUrls.length,
  }).pipe(
    Effect.map((_) =>
      _.flat().reduce(
        (acc, entry) => {
          acc[entry.searchTerm] = entry
          return acc
        },
        {} as Record<string, DocEntry>,
      ),
    ),
    // ...
  ),
  Schedule.spaced(Duration.hours(3)),
)

DocEntry schema

Each documentation entry is decoded from JSON using the following schema:
DocsLookup.ts
class DocEntry extends Schema.Class<DocEntry>("DocEntry")({ 
  _tag: Schema.String,
  module: Schema.Struct({
    name: Schema.String,
  }),
  project: Schema.String,
  name: Schema.String,
  description: Schema.OptionFromOptional(Schema.String),
  deprecated: Schema.Boolean,
  examples: Schema.Array(Schema.String),
  since: Schema.String,
  category: Schema.OptionFromOptional(Schema.String),
  signature: Schema.OptionFromOptional(Schema.String),
  sourceUrl: Schema.String,
})

Embed contents

When a result is selected, the bot builds a Discord embed with:
  • Author — package name (e.g. effect, @effect/platform)
  • TitleModule.functionName with a link to the docs page
  • Color — Effect purple (#882ECB)
  • Description — prose description, followed by the type signature formatted with Prettier in a TypeScript code block, then any provided examples
  • View source field — direct link to the source file
  • Footer — added-in version (e.g. Added in v2.0.0)
If a query is fewer than 3 characters the autocomplete returns no choices and the bot stays silent. Submit a longer query to see results.

Build docs developers (and LLMs) love