UNPKG

631 BJavaScriptView Raw
1import { createSocket } from "./socket.js";
2import { Connection } from "./connection.js";
3export * from "./auth.js";
4export * from "./collection.js";
5export * from "./connection.js";
6export * from "./config.js";
7export * from "./services.js";
8export * from "./entities.js";
9export * from "./errors.js";
10export * from "./socket.js";
11export * from "./commands.js";
12export 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}