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.
- package/.tsbuildinfo +1 -1
- package/README.md +15 -14
- package/dist/discord/builder/components/Menus.d.ts +1 -1
- package/dist/discord/events-handler/events.js +6 -6
- package/dist/discord/events-handler/events.js.map +1 -1
- package/dist/discord/events-handler/login.d.ts +2 -2
- package/dist/discord/events-handler/login.d.ts.map +1 -1
- package/dist/discord/events-handler/login.js +64 -50
- package/dist/discord/events-handler/login.js.map +1 -1
- package/dist/discord/events-handler/prefix-register.d.ts +0 -1
- package/dist/discord/events-handler/prefix-register.d.ts.map +1 -1
- package/dist/discord/events-handler/prefix-register.js +4 -4
- package/dist/discord/events-handler/prefix-register.js.map +1 -1
- package/dist/discord/events-handler/prefix-responder.js +1 -1
- package/dist/discord/events-handler/prefix-responder.js.map +1 -1
- package/dist/discord/events-handler/slash-register.js +4 -4
- package/dist/discord/events-handler/slash-register.js.map +1 -1
- package/dist/discord/events-handler/starter.d.ts.map +1 -1
- package/dist/discord/events-handler/starter.js +7 -19
- package/dist/discord/events-handler/starter.js.map +1 -1
- package/dist/discord/functions/anticrash.d.ts +2 -1
- package/dist/discord/functions/anticrash.d.ts.map +1 -1
- package/dist/discord/functions/anticrash.js +5 -4
- package/dist/discord/functions/anticrash.js.map +1 -1
- package/dist/discord/functions/devLogs.d.ts.map +1 -1
- package/dist/discord/functions/devLogs.js +29 -23
- package/dist/discord/functions/devLogs.js.map +1 -1
- package/dist/discord/types/starter.d.ts +0 -3
- package/dist/discord/types/starter.d.ts.map +1 -1
- package/lib/discord/events-handler/events.ts +11 -11
- package/lib/discord/events-handler/login.ts +66 -50
- package/lib/discord/events-handler/prefix-register.ts +8 -8
- package/lib/discord/events-handler/prefix-responder.ts +2 -2
- package/lib/discord/events-handler/slash-register.ts +10 -10
- package/lib/discord/events-handler/slash-responder.ts +4 -4
- package/lib/discord/events-handler/starter.ts +3 -16
- package/lib/discord/functions/anticrash.ts +16 -15
- package/lib/discord/functions/devLogs.ts +31 -26
- package/lib/discord/functions/terminal.ts +10 -10
- package/lib/discord/types/starter.ts +0 -3
- 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
|
-
[
|
|
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([
|
|
65
|
+
botInfoTable.push([yellow('Status'), client.presence.Status]);
|
|
66
66
|
}
|
|
67
67
|
if (bot.Status?.activities && bot.Status.activities.length > 0) {
|
|
68
|
-
botInfoTable.push([
|
|
68
|
+
botInfoTable.push([white('Activity'), bot.Status.activities[0]]);
|
|
69
69
|
}
|
|
70
70
|
if (bot.BotInfo?.botInvite) {
|
|
71
|
-
botInfoTable.push([
|
|
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([
|
|
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([
|
|
82
|
+
botInfoTable.push([redBright('Bot Size'), `${(projectSize / (1024 * 1024)).toFixed(2)} MB`]);
|
|
83
83
|
if (client.user?.displayAvatarURL()) {
|
|
84
|
-
botInfoTable.push([
|
|
84
|
+
botInfoTable.push([greenBright('AvatarURL'), client.user.displayAvatarURL()]);
|
|
85
85
|
}
|
|
86
86
|
if (bot.BotInfo?.ownerId) {
|
|
87
|
-
botInfoTable.push([
|
|
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([
|
|
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[];
|