djs-builder 0.1.5 → 0.2.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.
Files changed (41) hide show
  1. package/.tsbuildinfo +1 -1
  2. package/README.md +15 -14
  3. package/dist/discord/builder/components/Menus.d.ts +1 -1
  4. package/dist/discord/events-handler/events.js +6 -6
  5. package/dist/discord/events-handler/events.js.map +1 -1
  6. package/dist/discord/events-handler/login.d.ts +2 -2
  7. package/dist/discord/events-handler/login.d.ts.map +1 -1
  8. package/dist/discord/events-handler/login.js +64 -50
  9. package/dist/discord/events-handler/login.js.map +1 -1
  10. package/dist/discord/events-handler/prefix-register.d.ts +0 -1
  11. package/dist/discord/events-handler/prefix-register.d.ts.map +1 -1
  12. package/dist/discord/events-handler/prefix-register.js +4 -4
  13. package/dist/discord/events-handler/prefix-register.js.map +1 -1
  14. package/dist/discord/events-handler/prefix-responder.js +1 -1
  15. package/dist/discord/events-handler/prefix-responder.js.map +1 -1
  16. package/dist/discord/events-handler/slash-register.js +4 -4
  17. package/dist/discord/events-handler/slash-register.js.map +1 -1
  18. package/dist/discord/events-handler/starter.d.ts.map +1 -1
  19. package/dist/discord/events-handler/starter.js +7 -19
  20. package/dist/discord/events-handler/starter.js.map +1 -1
  21. package/dist/discord/functions/anticrash.d.ts +2 -1
  22. package/dist/discord/functions/anticrash.d.ts.map +1 -1
  23. package/dist/discord/functions/anticrash.js +5 -4
  24. package/dist/discord/functions/anticrash.js.map +1 -1
  25. package/dist/discord/functions/devLogs.d.ts.map +1 -1
  26. package/dist/discord/functions/devLogs.js +29 -23
  27. package/dist/discord/functions/devLogs.js.map +1 -1
  28. package/dist/discord/types/starter.d.ts +0 -3
  29. package/dist/discord/types/starter.d.ts.map +1 -1
  30. package/lib/discord/events-handler/events.ts +11 -11
  31. package/lib/discord/events-handler/login.ts +66 -50
  32. package/lib/discord/events-handler/prefix-register.ts +8 -8
  33. package/lib/discord/events-handler/prefix-responder.ts +2 -2
  34. package/lib/discord/events-handler/slash-register.ts +10 -10
  35. package/lib/discord/events-handler/slash-responder.ts +4 -4
  36. package/lib/discord/events-handler/starter.ts +3 -16
  37. package/lib/discord/functions/anticrash.ts +16 -15
  38. package/lib/discord/functions/devLogs.ts +31 -26
  39. package/lib/discord/functions/terminal.ts +10 -10
  40. package/lib/discord/types/starter.ts +0 -3
  41. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { blue, cyan, green, magenta, red } from 'colorette';
1
+ import { blue, cyan, green, magenta, red, black, yellow, white, cyanBright, gray, redBright, greenBright, yellowBright } from 'colorette';
2
2
  import { BotOptions } from '../types/starter';
3
3
  import Table from 'cli-table';
4
4
  import fs from 'fs';
@@ -54,7 +54,7 @@ export async function terminalLogs(client: any, bot: BotOptions): Promise<void>
54
54
  [green('Prefix Count'), prefixSize],
55
55
  [red('Slash Command Count'), slashSize],
56
56
  [cyan('Total Commands'), totalCommands],
57
- [magenta('Event Count'), eventSize]
57
+ [black('Event Count'), eventSize]
58
58
  );
59
59
 
60
60
  const botInfoTable = new Table({
@@ -62,33 +62,33 @@ export async function terminalLogs(client: any, bot: BotOptions): Promise<void>
62
62
  colWidths: [30, 25]
63
63
  });
64
64
  if (client.presence?.Status) {
65
- botInfoTable.push([magenta('Status'), client.presence.Status]);
65
+ botInfoTable.push([yellow('Status'), client.presence.Status]);
66
66
  }
67
67
  if (bot.Status?.activities && bot.Status.activities.length > 0) {
68
- botInfoTable.push([green('Activity'), bot.Status.activities[0]]);
68
+ botInfoTable.push([white('Activity'), bot.Status.activities[0]]);
69
69
  }
70
70
  if (bot.BotInfo?.botInvite) {
71
- botInfoTable.push([magenta('Bot Invite'), bot.BotInfo.botInvite]);
71
+ botInfoTable.push([cyanBright('Bot Invite'), bot.BotInfo.botInvite]);
72
72
  }
73
73
  botInfoTable.push(
74
74
  [red('Guilds Count'), totalGuilds],
75
75
  [cyan('Members Count'), totalMembers]
76
76
  );
77
77
  if (bot.Database?.verse) {
78
- botInfoTable.push([magenta('Bot Database'), 'VerseDb']);
78
+ botInfoTable.push([gray('Bot Database'), 'VerseDb']);
79
79
  } else if (bot.Database?.mongo) {
80
80
  botInfoTable.push([magenta('Bot Database'), 'MongoDb']);
81
81
  }
82
- botInfoTable.push([magenta('Bot Size'), `${(projectSize / (1024 * 1024)).toFixed(2)} MB`]);
82
+ botInfoTable.push([redBright('Bot Size'), `${(projectSize / (1024 * 1024)).toFixed(2)} MB`]);
83
83
  if (client.user?.displayAvatarURL()) {
84
- botInfoTable.push([magenta('AvatarURL'), client.user.displayAvatarURL()]);
84
+ botInfoTable.push([greenBright('AvatarURL'), client.user.displayAvatarURL()]);
85
85
  }
86
86
  if (bot.BotInfo?.ownerId) {
87
- botInfoTable.push([magenta('Owner'), bot.BotInfo.ownerId]);
87
+ botInfoTable.push([cyan('Owner'), bot.BotInfo.ownerId]);
88
88
  }
89
89
  if (client.readyTimestamp) {
90
90
  const loggedInAt = new Date(client.readyTimestamp).toLocaleString();
91
- botInfoTable.push([magenta('Logged In At'), loggedInAt]);
91
+ botInfoTable.push([yellowBright('Logged In At'), loggedInAt]);
92
92
  }
93
93
  console.log(botStatesTable.toString());
94
94
  console.log(botInfoTable.toString());
@@ -36,7 +36,6 @@ export interface BotOptions {
36
36
 
37
37
  export interface SlashOptions {
38
38
  path: string;
39
- baseDir: any;
40
39
  global?: boolean;
41
40
  serverId?: string;
42
41
  logsId?: string;
@@ -44,7 +43,6 @@ export interface SlashOptions {
44
43
 
45
44
  export interface PrefixOptions {
46
45
  path: string;
47
- baseDir: any;
48
46
  prefix: string;
49
47
  global?: boolean;
50
48
  serverIds?: string[];
@@ -74,7 +72,6 @@ export interface AntiCrash{
74
72
 
75
73
  export interface EventsOptions {
76
74
  path: string;
77
- baseDir: any;
78
75
  logsId?: string;
79
76
  recursive?: boolean;
80
77
  eventBlacklist?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djs-builder",
3
- "version": "0.1.5",
3
+ "version": "0.2.1",
4
4
  "description": "Discord.js bot builder. Supports Ts and Js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",