1 | import { createSocket } from "./socket.js";
|
2 | import { Connection } from "./connection.js";
|
3 | export * from "./auth.js";
|
4 | export * from "./collection.js";
|
5 | export * from "./connection.js";
|
6 | export * from "./config.js";
|
7 | export * from "./services.js";
|
8 | export * from "./entities.js";
|
9 | export * from "./errors.js";
|
10 | export * from "./socket.js";
|
11 | export * from "./commands.js";
|
12 | export async function createConnection(options) {
|
13 | const connOptions = Object.assign({ setupRetry: 0, createSocket }, options);
|
14 | const socket = await connOptions.createSocket(connOptions);
|
15 | const conn = new Connection(socket, connOptions);
|
16 | return conn;
|
17 | }
|