djs-builder 0.6.0 → 0.6.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
@@ -29,67 +29,52 @@ Starter provides functionality for initializing and starting a Discord bot 🤖.
29
29
  <summary>Starter ⚙️</summary>
30
30
 
31
31
  ```js
32
- const { Starter } = require('djs-builder');
33
-
34
- const { Client, GatewayIntentBits, Partials } = require('discord.js');
35
- const client = new Client({
36
- intents: Object.keys(GatewayIntentBits).map((a) => {
37
- return GatewayIntentBits[a];
38
- }),
39
- });
40
-
41
-
42
- const intentsArray = Object.keys(GatewayIntentBits)
43
- .map((a) => GatewayIntentBits[a as keyof typeof GatewayIntentBits]);
44
- const intents = intentsArray.reduce((acc, curr) => acc | curr, 0);
45
-
46
- const client = new Client({
47
- intents,
48
- partials: Object.values(Partials) as Partials[],
49
- });
50
-
51
- // Define starter options
52
- const starterOptions = {
53
-
54
-
55
-
56
- bot: {
57
- token: 'YOUR_BOT_TOKEN', // [OPTIONAL] Discord bot token
58
- ownerId : "YOUR_USER_ID"
59
- },
60
- terminal: true
61
- Status: {
62
- status: 'online', // Required: Bot presence state ['online', 'offline', 'dnd', 'idle', 'Streaming']
63
- activities: ['Game 1', 'Game 2'], // [OPTIONAL] Bot activities
64
- type: 0, // [OPTIONAL] Bot activity type
65
- time: 60000 // [OPTIONAL] Activity rotation delay in milliseconds
66
- },
67
- database: {
68
- url : 'mongodb://localhost:27017', // Required: MongoDB connection URI
69
-
70
-
71
- },
72
-
73
- slash: {
74
- path: './path/to/slash_commands', // Required: Path to slash commands
75
- log : "" // id of log channel
76
-
77
- },
78
- prefix: {
79
- path: './path/to/prefixes', // Required: Path to prefix settings
80
- prefix: '!', // Required: Default bot prefix
81
- log : "" // id of log channel
82
- },
83
- events: {
84
- path: './path/to/events', // Required: Path to event handlers
85
- },
86
- anticrash: {
87
- url: 'https://your.crash.webhook.url', // Required: Webhook URL for crash alerts
88
- mention_id: "YOUR_USER_ID" // [OPTIONAL] User ID to mention in crash alerts
89
- }
32
+ const { starter } = require("djs-builder");
33
+
34
+ const { Client, GatewayIntentBits } = require("discord.js");
35
+ const client = new Client({
36
+ intents: Object.keys(GatewayIntentBits).map((a) => {
37
+ return GatewayIntentBits[a];
38
+ }),
39
+ });
40
+
41
+ // Define starter options
42
+ const starterOptions = {
43
+ bot: {
44
+ token: "YOUR_BOT_TOKEN", // [OPTIONAL] Discord bot token
45
+ ownerId: "YOUR_USER_ID",
46
+ },
47
+ terminal: true,
48
+ Status: {
49
+ status: "online", // Required: Bot presence state ['online', 'offline', 'dnd', 'idle', 'Streaming']
50
+ activities: ["Game 1", "Game 2"], // [OPTIONAL] Bot activities
51
+ type: 0, // [OPTIONAL] Bot activity type
52
+ time: 60000, // [OPTIONAL] Activity rotation delay in milliseconds
53
+ },
54
+ database: {
55
+ url: "mongodb://localhost:27017", // Required: MongoDB connection URI
56
+ },
57
+
58
+ slash: {
59
+ path: "./path/to/slash_commands", // Required: Path to slash commands
60
+ log: "", // id of log channel
61
+ },
62
+ prefix: {
63
+ path: "./path/to/prefixes", // Required: Path to prefix settings
64
+ prefix: "!", // Required: Default bot prefix
65
+ log: "", // id of log channel
66
+ },
67
+ events: {
68
+ path: "./path/to/events", // Required: Path to event handlers
69
+ },
70
+ anticrash: {
71
+ url: "https://your.crash.webhook.url", // Required: Webhook URL for crash alerts
72
+ mention_id: "YOUR_USER_ID", // [OPTIONAL] User ID to mention in crash alerts
73
+ },
90
74
  };
91
75
 
92
76
  await starter(client, starterOptions);
77
+
93
78
  ```
94
79
 
95
80
  </details>
@@ -146,7 +146,7 @@ async function starter(client, options) {
146
146
  //////////////////////////////////////////* prefix run !////////////////////////////////////////////////////////
147
147
 
148
148
  client.on("messageCreate", async (message) => {
149
- if(!prefix) return
149
+
150
150
  if (message.author.bot) return;
151
151
 
152
152
  const content = message.content.trim();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "djs-builder",
4
- "version": "0.6.0",
4
+ "version": "0.6.2",
5
5
  "description": "Discord.js bot builder. Supports Ts and Js.",
6
6
  "main": "handler/starter.js",
7
7
  "dependencies": {