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
Implements
Section titled “Implements”BaseReader
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DiscordReader(
discordToken?
,requestHandler?
):DiscordReader
Defined in: .build/typescript/packages/providers/discord/src/reader.ts:13
Parameters
Section titled “Parameters”discordToken?
Section titled “discordToken?”string
requestHandler?
Section titled “requestHandler?”(url
, init
) => Promise
<ResponseLike
>
Returns
Section titled “Returns”DiscordReader
Methods
Section titled “Methods”loadData()
Section titled “loadData()”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.
Parameters
Section titled “Parameters”channelIds
Section titled “channelIds”string
[]
An array of channel IDs from which to load data.
limit?
Section titled “limit?”number
An optional limit on the number of messages to load per channel.
additionalInfo?
Section titled “additionalInfo?”boolean
An optional flag to include content from embedded messages and attachments urls as text.
oldestFirst?
Section titled “oldestFirst?”boolean
An optional flag to load oldest messages first.
Returns
Section titled “Returns”Promise
<Document
<Metadata
>[]>
A promise that resolves to an array of loaded documents.
Implementation of
Section titled “Implementation of”BaseReader.loadData