Skip to content

DiscordReader

Defined in: .build/typescript/packages/providers/discord/src/reader.ts:10

Represents a reader for Discord messages using @discordjs/rest See https://github.com/discordjs/discord.js/tree/main/packages/rest

  • BaseReader

new DiscordReader(discordToken?, requestHandler?): DiscordReader

Defined in: .build/typescript/packages/providers/discord/src/reader.ts:13

string

(url, init) => Promise<ResponseLike>

DiscordReader

loadData(channelIds, limit?, additionalInfo?, oldestFirst?): Promise<Document<Metadata>[]>

Defined in: .build/typescript/packages/providers/discord/src/reader.ts:116

Loads messages from multiple discord channels and returns an array of Document Objects.

string[]

An array of channel IDs from which to load data.

number

An optional limit on the number of messages to load per channel.

boolean

An optional flag to include content from embedded messages and attachments urls as text.

boolean

An optional flag to load oldest messages first.

Promise<Document<Metadata>[]>

A promise that resolves to an array of loaded documents.

BaseReader.loadData