@ezzi/base 2.0.0 → 2.0.1

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/dist/client.js CHANGED
@@ -15,13 +15,9 @@ function createClient(token, options) {
15
15
  client.once("clientReady", async (readyClient) => {
16
16
  console.log("%s %s %s", styleText("green", "●"), styleText(["greenBright", "underline"], readyClient.user.username), styleText("green", "application is ready!"));
17
17
  await app.commands.register(readyClient);
18
- if (typeof app.events.runReady === "function") {
19
- await app.events.runReady(readyClient);
20
- }
18
+ await app.events.runReady(readyClient);
21
19
  });
22
20
  client.on("messageCreate", async (message) => {
23
- if (message.author.bot)
24
- return;
25
21
  await app.commands.onPrefixCommand(message);
26
22
  });
27
23
  client.on("interactionCreate", async (interaction) => {
@@ -54,7 +54,7 @@ class EventManager extends BaseManager {
54
54
  }
55
55
  }
56
56
  register(client) {
57
- const collection = this.collection.filter((_, key) => key !== "clientReady" && key !== "messageCreate");
57
+ const collection = this.collection.filter((_, key) => key !== "clientReady");
58
58
  for (const [key, events] of collection.entries()) {
59
59
  client.on(key, (...args) => {
60
60
  Promise.all(Array.from(events.values()).map((event) => this.onEvent(event, args)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezzi/base",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Library with structures and functions for creating modern Discord applications.",
5
5
  "license": "MIT",
6
6
  "type": "module",