@constatic/base 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # template
1
+ # Constatic Base
2
2
 
3
- To install dependencies:
3
+ Library with structures and functions for creating modern Discord applications.
4
4
 
5
- ```bash
6
- bun install
7
- ```
5
+ It all starts with the bootstrap function.
8
6
 
9
- To run:
7
+ ```ts
8
+ import { bootstrap } from "@constatic/base";
10
9
 
11
- ```bash
12
- bun run ./src/index.ts
10
+ await bootstrap({ meta: import.meta });
13
11
  ```
14
12
 
15
- This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
13
+ ⚠️ It is recommended to use the [Constant CLI](https://constatic-docs.vercel.app/pt/docs/discord/start) to generate a project instead of doing it manually.
14
+
15
+ [📚 Read the full documentation here](https://constatic-docs.vercel.app/pt/docs)
package/dist/client.js CHANGED
@@ -1,13 +1,15 @@
1
1
  // src/client.ts
2
- import { Client } from "discord.js";
2
+ import { Client, IntentsBitField, Partials } from "discord.js";
3
3
  import { styleText } from "node:util";
4
4
  import { ConstaticApp } from "./app.js";
5
+ var defaultIntents = Object.values(IntentsBitField.Flags).filter((t) => typeof t !== "string");
6
+ var defaultPartials = Object.values(Partials).filter((t) => typeof t !== "string");
5
7
  function createClient(token, options) {
6
8
  const app = ConstaticApp.getInstance();
7
9
  const client = new Client({
8
10
  ...options,
9
- intents: options.intents ?? [],
10
- partials: options.partials ?? [],
11
+ intents: options.intents ?? defaultIntents,
12
+ partials: options.partials ?? defaultPartials,
11
13
  failIfNotExists: options.failIfNotExists ?? false
12
14
  });
13
15
  client.token = token;
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "1.0.0";
2
+ var version = "0.0.2";
3
3
  export {
4
4
  version
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constatic/base",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Library with structures and functions for creating modern Discord applications.",
5
5
  "license": "MIT",
6
6
  "type": "module",