mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
refactor: docs (#10126)
This commit is contained in:
@@ -52,10 +52,15 @@ try {
|
||||
await Promise.all(
|
||||
indices.map(async (index) => {
|
||||
console.log(`Uploading ${index.index}...`);
|
||||
let task;
|
||||
try {
|
||||
await client.createIndex(index.index);
|
||||
task = await client.createIndex(index.index);
|
||||
} catch {}
|
||||
|
||||
if (task) {
|
||||
await client.waitForTask(task.taskUid);
|
||||
}
|
||||
|
||||
await client.index(index.index).addDocuments(index.data);
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user