Class: DiscordReader
Represents a reader for Discord messages using @discordjs/rest See https://github.com/discordjs/discord.js/tree/main/packages/rest
Constructors
new DiscordReader()
new DiscordReader(
discordToken
?,requestHandler
?):DiscordReader
Parameters
• discordToken?: string
• requestHandler?
Returns
Defined in
packages/llamaindex/src/readers/DiscordReader.ts:13
Methods
loadData()
loadData(
channelIds
,limit
?,additionalInfo
?,oldestFirst
?):Promise
<Document
<Metadata
>[]>
Loads messages from multiple discord channels and returns an array of Document Objects.
Parameters
• channelIds: string
[]
An array of channel IDs from which to load data.
• limit?: number
An optional limit on the number of messages to load per channel.
• additionalInfo?: boolean
An optional flag to include content from embedded messages and attachments urls as text.
• oldestFirst?: boolean
An optional flag to load oldest messages first.
Returns
A promise that resolves to an array of loaded documents.