Discord
DiscordReader #
Bases: BasePydanticReader
Discord reader.
Reads conversations from channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
discord_token
|
Optional[str]
|
Discord token. If not provided, we
assume the environment variable |
None
|
Source code in llama-index-integrations/readers/llama-index-readers-discord/llama_index/readers/discord/base.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
class_name
classmethod
#
class_name() -> str
Get the name identifier of the class.
Source code in llama-index-integrations/readers/llama-index-readers-discord/llama_index/readers/discord/base.py
120 121 122 123 |
|
load_data #
load_data(channel_ids: List[int], limit: Optional[int] = None, oldest_first: bool = True) -> List[Document]
Load data from the input directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel_ids
|
List[int]
|
List of channel ids to read. |
required |
limit
|
Optional[int]
|
Maximum number of messages to read. |
None
|
oldest_first
|
bool
|
Whether to read oldest messages first.
Defaults to |
True
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: List of documents. |
Source code in llama-index-integrations/readers/llama-index-readers-discord/llama_index/readers/discord/base.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|