├── .github
└── workflows
│ └── publish.yml
├── .gitignore
├── LICENSE
├── README.md
├── index.d.ts
├── index.js
├── index.ts
├── package-lock.json
├── package.json
├── tsconfig.json
└── tslint.json
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish Package to npm
2 |
3 | on:
4 | push:
5 | tags:
6 | - "v*.*.*" # Trigger on version tags, e.g., v5.0.0
7 |
8 | jobs:
9 | publish:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - name: Checkout Code
14 | uses: actions/checkout@v3
15 |
16 | - name: Setup Node.js Environment
17 | uses: actions/setup-node@v3
18 | with:
19 | node-version: "22" # Specify your preferred Node.js version
20 | registry-url: "https://registry.npmjs.org"
21 | cache: "npm"
22 |
23 | - name: Install Dependencies
24 | run: npm install
25 |
26 | # Uncomment if your package requires a build step
27 | - name: Build Package
28 | run: npx tsc
29 |
30 | - name: Publish to npm
31 | run: npm publish --access public
32 | env:
33 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build and Release Folders
2 | bin-debug/
3 | bin-release/
4 | [Oo]bj/
5 | [Bb]in/
6 | node_modules/
7 | # Other files and folders
8 | .settings/
9 |
10 | # Executables
11 | *.swf
12 | *.air
13 | *.ipa
14 | *.apk
15 | src/
16 | test.*
17 |
18 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
19 | # should NOT be excluded as they contain compiler settings and other important
20 | # information for Eclipse / Flash Builder.
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | # discordjs-logger v5
10 |
11 | A lightweight logger for Discord.js events – now with a new generic API for flexible event registration!
12 |
13 | ---
14 |
15 | ## Overview
16 |
17 | Version 5 of discordjs-logger introduces a simplified and flexible API. Rather than having separate methods for every event (as in v4), you now register events via a generic interface. You can:
18 |
19 | - **Register a single event** with a custom handler using `on()`.
20 | - **Bulk-register events** with default logging or custom handlers via `registerEvents()`.
21 | - **Log all available events** from Discord.js with a single call using `logAllEvents()`.
22 |
23 | This approach reduces boilerplate and makes your code easier to maintain.
24 |
25 | ---
26 |
27 | ## Installation
28 |
29 | To install discordjs-logger v5, update your package.json to use version 5:
30 |
31 | ```sh
32 | npm i discordjs-logger@^5.0.0
33 | ```
34 | ### or
35 | ```sh
36 | yarn add discordjs-logger@^5.0.0
37 | ```
38 |
39 | _Note: If you’re still on v4, your package-lock or yarn.lock will prevent automatic upgrade. Please refer to the [Migration Guide](#migration-guide) below._
40 |
41 | ---
42 |
43 | ## Usage Instructions (v5)
44 |
45 | Below are some examples demonstrating the new API.
46 |
47 | ### Basic Setup
48 |
49 | ```typescript
50 | import { Client, GatewayIntentBits, Events } from "discord.js";
51 | import DiscordEventHandler from "discordjs-logger";
52 |
53 | const client = new Client({
54 | intents: [
55 | GatewayIntentBits.Guilds,
56 | GatewayIntentBits.GuildMessages,
57 | // Add other intents as needed...
58 | ],
59 | });
60 |
61 | const eventHandler = new DiscordEventHandler(client);
62 |
63 | // Register a few events with the default handler.
64 | // The default handler logs the event name and its arguments.
65 | eventHandler.registerEvents([
66 | Events.MessageCreate,
67 | Events.GuildCreate,
68 | Events.ClientReady, // equivalent to 'ready'
69 | ]);
70 |
71 | // Alternatively, register specific events with custom handlers:
72 | eventHandler.registerEvents([
73 | [
74 | Events.MessageCreate,
75 | (message) => {
76 | console.log("Custom handler for MessageCreate:", message.content);
77 | },
78 | ],
79 | ]);
80 |
81 | // To log all available events from Discord.js:
82 | eventHandler.logAllEvents();
83 |
84 | client.login("YOUR_DISCORD_APP_TOKEN");
85 | ```
86 |
87 | ### API Methods
88 |
89 | #### `on(event, handler)`
90 |
91 | Registers a specific event with your custom handler.
92 | Example:
93 |
94 | ```typescript
95 | eventHandler.on(Events.GuildCreate, (guild) => {
96 | console.log("Guild created:", guild.name);
97 | });
98 | ```
99 |
100 | #### `registerEvents(arg)`
101 |
102 | Overloaded to support two usages:
103 |
104 | 1. **Default handler:**
105 | Pass an array of events (from the Discord.js `Events` enum) to register them with a default logger.
106 | ```typescript
107 | eventHandler.registerEvents([Events.MessageCreate, Events.GuildCreate]);
108 | ```
109 | 2. **Custom handlers:**
110 | Pass an array of tuples `[event, handler]` to register each event with a custom handler.
111 | ```typescript
112 | eventHandler.registerEvents([
113 | [
114 | Events.MessageCreate,
115 | (message) => {
116 | console.log("Custom MessageCreate:", message.content);
117 | },
118 | ],
119 | ]);
120 | ```
121 |
122 | #### `logAllEvents()`
123 |
124 | Registers all available events (retrieved from the Discord.js `Events` enum) with the default logging handler.
125 |
126 | ```typescript
127 | eventHandler.logAllEvents();
128 | ```
129 |
130 | ---
131 |
132 | ## Migration Guide: Upgrading from Version 4 to Version 5
133 |
134 | ### Breaking Changes
135 |
136 | 1. **New API Structure:**
137 |
138 | - **v4:** Provided individual methods for each event (e.g. `channelCreate()`, `guildCreate()`, etc.).
139 | - **v5:** Uses a generic API: `on()`, `registerEvents()`, and `logAllEvents()`.
140 | - **Impact:** If your code directly calls methods like `channelCreate()`, you will need to refactor them to use the new API.
141 |
142 | 2. **Event Registration:**
143 | - **v4:** Separate event listener methods.
144 | - **v5:** Bulk registration is now available through `registerEvents()`, and a default logging handler is provided.
145 | - **Impact:** You must update your event registration logic to match the new format.
146 |
147 | ### How to Migrate
148 |
149 | 1. **Update your dependency:**
150 |
151 | - Change your `package.json` to use discordjs-logger v5 (`^5.0.0`).
152 | - With semver, users locked to `"^4.x.x"` will not automatically update to v5.
153 |
154 | 2. **Refactor event registration:**
155 | - **From v4 Example:**
156 | ```typescript
157 | // v4 approach:
158 | const logger = new CDiscordEvent(client);
159 | logger.channelCreate();
160 | logger.guildCreate();
161 | // etc.
162 | ```
163 | - **To v5 Approach:**
164 |
165 | ```typescript
166 | import { Events } from "discord.js";
167 | import DiscordEventHandler from "discordjs-logger";
168 |
169 | const eventHandler = new DiscordEventHandler(client);
170 |
171 | // Register specific events with default logging:
172 | eventHandler.registerEvents([Events.ChannelCreate, Events.GuildCreate]);
173 |
174 | // Or use custom handlers:
175 | eventHandler.registerEvents([
176 | [
177 | Events.MessageCreate,
178 | (message) => {
179 | console.log("Custom handler for MessageCreate:", message.content);
180 | },
181 | ],
182 | ]);
183 | ```
184 | 3. **Review your logging behavior:**
185 |
186 | - v5’s default handlers log every event triggered. If this is too verbose for production, consider using custom handlers to control logging output.
187 |
188 | 4. **Testing:**
189 | - Thoroughly test your bot with the new version in a development environment to ensure all events are logged and handled as expected.
190 |
191 | ---
192 |
193 | ## Compatibility Notes
194 |
195 | - **Version 5:** Designed for use with Discord.js v14 or greater.
196 | - **Version 4:** Continue to use for Discord.js v13 or lower.
197 | (Please refer to the previous documentation for v4 if needed.)
198 |
199 | ---
200 |
201 | ## Additional Resources
202 |
203 | - **Discord.js Documentation:** [https://discord.js.org/#/docs/main/stable/class/Client](https://discord.js.org/#/docs/main/stable/class/Client)
204 |
205 | ---
206 |
207 | ##### If you have any questions or run into issues during migration, please check our GitHub issues.
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | import { Client, ClientEvents, Events } from "discord.js";
2 | /**
3 | * Type definition for an event handler based on ClientEvents.
4 | * The generic type "T extends keyof ClientEvents" ensures that the handler receives
5 | * the correct parameters for the specific event emitted by discord.js.
6 | */
7 | type EventHandler = (...args: ClientEvents[T]) => void;
8 | declare class DiscordEventHandler {
9 | private readonly client;
10 | /**
11 | * Constructs the DiscordEventHandler instance.
12 | * @param client - An instance of the Discord Client.
13 | */
14 | constructor(client: Client);
15 | /**
16 | * Registers a specific event with a custom handler.
17 | *
18 | * @param event - The event name (a key from ClientEvents) you want to listen to.
19 | * @param handler - The function to call when the event is emitted.
20 | *
21 | * The handler is wrapped in a try-catch block to log errors without crashing the bot.
22 | */
23 | on(event: T, handler: EventHandler): void;
24 | /**
25 | * Overloaded method to register multiple events.
26 | *
27 | * Usage 1: Pass an array of events (of type Events) to register them with a default handler.
28 | * Usage 2: Pass an array of tuples [event, handler] to register custom handlers for each event.
29 | *
30 | * @param arg - Either an array of Events or an array of [event, handler] tuples.
31 | */
32 | registerEvents(events: Events[]): void;
33 | registerEvents(eventHandlers: [T, EventHandler][]): void;
34 | /**
35 | * Registers all available events using the default handler which logs the event name and its arguments.
36 | *
37 | * How it works:
38 | * - Retrieves all values from the discord.js Events enum using Object.values().
39 | * - Filters out values to ensure only strings (valid events) are used.
40 | * - Calls registerEvents() with the array of events.
41 | */
42 | logAllEvents(): void;
43 | }
44 | export default DiscordEventHandler;
45 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const discord_js_1 = require("discord.js");
4 | class DiscordEventHandler {
5 | client;
6 | /**
7 | * Constructs the DiscordEventHandler instance.
8 | * @param client - An instance of the Discord Client.
9 | */
10 | constructor(client) {
11 | this.client = client;
12 | }
13 | /**
14 | * Registers a specific event with a custom handler.
15 | *
16 | * @param event - The event name (a key from ClientEvents) you want to listen to.
17 | * @param handler - The function to call when the event is emitted.
18 | *
19 | * The handler is wrapped in a try-catch block to log errors without crashing the bot.
20 | */
21 | on(event, handler) {
22 | this.client.on(event, (...args) => {
23 | try {
24 | handler(...args);
25 | }
26 | catch (error) {
27 | console.error(`Error in event ${event}:`, error);
28 | }
29 | });
30 | }
31 | registerEvents(arg) {
32 | // Return if the provided array is empty.
33 | if (arg.length === 0)
34 | return;
35 | // If the first element is a string, we assume an array of events (default handler).
36 | if (typeof arg[0] === "string") {
37 | const events = arg;
38 | events.forEach((event) => {
39 | // Cast the event as a key of ClientEvents for type compatibility.
40 | this.client.on(event, (...args) => {
41 | console.log(`[Default Logger] Event ${event} triggered with arguments:`, ...args);
42 | });
43 | });
44 | }
45 | // If the first element is an array, we assume an array of tuples [event, handler] (custom handler).
46 | else if (Array.isArray(arg[0])) {
47 | const eventHandlers = arg;
48 | eventHandlers.forEach(([event, handler]) => {
49 | this.on(event, handler);
50 | });
51 | }
52 | }
53 | /**
54 | * Registers all available events using the default handler which logs the event name and its arguments.
55 | *
56 | * How it works:
57 | * - Retrieves all values from the discord.js Events enum using Object.values().
58 | * - Filters out values to ensure only strings (valid events) are used.
59 | * - Calls registerEvents() with the array of events.
60 | */
61 | logAllEvents() {
62 | const allEvents = Object.values(discord_js_1.Events).filter((e) => typeof e === "string");
63 | this.registerEvents(allEvents);
64 | }
65 | }
66 | exports.default = DiscordEventHandler;
67 |
--------------------------------------------------------------------------------
/index.ts:
--------------------------------------------------------------------------------
1 | import { Client, ClientEvents, Events } from "discord.js";
2 |
3 | /**
4 | * Type definition for an event handler based on ClientEvents.
5 | * The generic type "T extends keyof ClientEvents" ensures that the handler receives
6 | * the correct parameters for the specific event emitted by discord.js.
7 | */
8 | type EventHandler = (
9 | ...args: ClientEvents[T]
10 | ) => void;
11 |
12 | class DiscordEventHandler {
13 | /**
14 | * Constructs the DiscordEventHandler instance.
15 | * @param client - An instance of the Discord Client.
16 | */
17 | constructor(private readonly client: Client) {}
18 |
19 | /**
20 | * Registers a specific event with a custom handler.
21 | *
22 | * @param event - The event name (a key from ClientEvents) you want to listen to.
23 | * @param handler - The function to call when the event is emitted.
24 | *
25 | * The handler is wrapped in a try-catch block to log errors without crashing the bot.
26 | */
27 | public on(
28 | event: T,
29 | handler: EventHandler
30 | ): void {
31 | this.client.on(event, (...args: ClientEvents[T]) => {
32 | try {
33 | handler(...args);
34 | } catch (error) {
35 | console.error(`Error in event ${event}:`, error);
36 | }
37 | });
38 | }
39 |
40 | /**
41 | * Overloaded method to register multiple events.
42 | *
43 | * Usage 1: Pass an array of events (of type Events) to register them with a default handler.
44 | * Usage 2: Pass an array of tuples [event, handler] to register custom handlers for each event.
45 | *
46 | * @param arg - Either an array of Events or an array of [event, handler] tuples.
47 | */
48 | public registerEvents(events: Events[]): void;
49 | public registerEvents(
50 | eventHandlers: [T, EventHandler][]
51 | ): void;
52 | public registerEvents(arg: any[]): void {
53 | // Return if the provided array is empty.
54 | if (arg.length === 0) return;
55 |
56 | // If the first element is a string, we assume an array of events (default handler).
57 | if (typeof arg[0] === "string") {
58 | const events = arg as Events[];
59 | events.forEach((event) => {
60 | // Cast the event as a key of ClientEvents for type compatibility.
61 | this.client.on(event as keyof ClientEvents, (...args: any[]) => {
62 | console.log(
63 | `[Default Logger] Event ${event} triggered with arguments:`,
64 | ...args
65 | );
66 | });
67 | });
68 | }
69 | // If the first element is an array, we assume an array of tuples [event, handler] (custom handler).
70 | else if (Array.isArray(arg[0])) {
71 | const eventHandlers = arg as [keyof ClientEvents, EventHandler][];
72 | eventHandlers.forEach(([event, handler]) => {
73 | this.on(event, handler);
74 | });
75 | }
76 | }
77 |
78 | /**
79 | * Registers all available events using the default handler which logs the event name and its arguments.
80 | *
81 | * How it works:
82 | * - Retrieves all values from the discord.js Events enum using Object.values().
83 | * - Filters out values to ensure only strings (valid events) are used.
84 | * - Calls registerEvents() with the array of events.
85 | */
86 | public logAllEvents(): void {
87 | const allEvents = Object.values(Events).filter(
88 | (e) => typeof e === "string"
89 | ) as Events[];
90 | this.registerEvents(allEvents);
91 | }
92 | }
93 |
94 | export default DiscordEventHandler;
95 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "discordjs-logger",
3 | "version": "5.0.1",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "discordjs-logger",
9 | "version": "5.0.1",
10 | "license": "MIT",
11 | "dependencies": {
12 | "discord.js": "^14.0.3"
13 | },
14 | "devDependencies": {
15 | "typescript": "^5.8.2"
16 | }
17 | },
18 | "node_modules/@discordjs/builders": {
19 | "version": "1.0.0",
20 | "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz",
21 | "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==",
22 | "dependencies": {
23 | "@sapphire/shapeshift": "^3.5.1",
24 | "discord-api-types": "^0.36.2",
25 | "fast-deep-equal": "^3.1.3",
26 | "ts-mixer": "^6.0.1",
27 | "tslib": "^2.4.0"
28 | },
29 | "engines": {
30 | "node": ">=16.9.0"
31 | }
32 | },
33 | "node_modules/@discordjs/collection": {
34 | "version": "1.0.0",
35 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz",
36 | "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q==",
37 | "engines": {
38 | "node": ">=16.9.0"
39 | }
40 | },
41 | "node_modules/@discordjs/rest": {
42 | "version": "1.0.0",
43 | "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz",
44 | "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==",
45 | "dependencies": {
46 | "@discordjs/collection": "^1.0.0",
47 | "@sapphire/async-queue": "^1.3.2",
48 | "@sapphire/snowflake": "^3.2.2",
49 | "discord-api-types": "^0.36.2",
50 | "file-type": "^17.1.2",
51 | "tslib": "^2.4.0",
52 | "undici": "^5.7.0"
53 | },
54 | "engines": {
55 | "node": ">=16.9.0"
56 | }
57 | },
58 | "node_modules/@fastify/busboy": {
59 | "version": "2.1.1",
60 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
61 | "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
62 | "engines": {
63 | "node": ">=14"
64 | }
65 | },
66 | "node_modules/@sapphire/async-queue": {
67 | "version": "1.3.2",
68 | "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz",
69 | "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==",
70 | "engines": {
71 | "node": ">=v14.0.0",
72 | "npm": ">=7.0.0"
73 | }
74 | },
75 | "node_modules/@sapphire/shapeshift": {
76 | "version": "3.5.1",
77 | "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz",
78 | "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==",
79 | "dependencies": {
80 | "fast-deep-equal": "^3.1.3",
81 | "lodash.uniqwith": "^4.5.0"
82 | },
83 | "engines": {
84 | "node": ">=v14.0.0",
85 | "npm": ">=7.0.0"
86 | }
87 | },
88 | "node_modules/@sapphire/snowflake": {
89 | "version": "3.2.2",
90 | "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz",
91 | "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==",
92 | "engines": {
93 | "node": ">=v14.0.0",
94 | "npm": ">=7.0.0"
95 | }
96 | },
97 | "node_modules/@tokenizer/token": {
98 | "version": "0.3.0",
99 | "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
100 | "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
101 | },
102 | "node_modules/@types/node": {
103 | "version": "18.0.6",
104 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz",
105 | "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw=="
106 | },
107 | "node_modules/@types/ws": {
108 | "version": "8.5.3",
109 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
110 | "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
111 | "dependencies": {
112 | "@types/node": "*"
113 | }
114 | },
115 | "node_modules/discord-api-types": {
116 | "version": "0.36.2",
117 | "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.2.tgz",
118 | "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q=="
119 | },
120 | "node_modules/discord.js": {
121 | "version": "14.0.3",
122 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz",
123 | "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==",
124 | "dependencies": {
125 | "@discordjs/builders": "^1.0.0",
126 | "@discordjs/collection": "^1.0.0",
127 | "@discordjs/rest": "^1.0.0",
128 | "@sapphire/snowflake": "^3.2.2",
129 | "@types/ws": "^8.5.3",
130 | "discord-api-types": "^0.36.2",
131 | "fast-deep-equal": "^3.1.3",
132 | "lodash.snakecase": "^4.1.1",
133 | "tslib": "^2.4.0",
134 | "undici": "^5.8.0",
135 | "ws": "^8.8.1"
136 | },
137 | "engines": {
138 | "node": ">=16.9.0"
139 | }
140 | },
141 | "node_modules/fast-deep-equal": {
142 | "version": "3.1.3",
143 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
144 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
145 | },
146 | "node_modules/file-type": {
147 | "version": "17.1.3",
148 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz",
149 | "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==",
150 | "dependencies": {
151 | "readable-web-to-node-stream": "^3.0.2",
152 | "strtok3": "^7.0.0-alpha.7",
153 | "token-types": "^5.0.0-alpha.2"
154 | },
155 | "engines": {
156 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
157 | },
158 | "funding": {
159 | "url": "https://github.com/sindresorhus/file-type?sponsor=1"
160 | }
161 | },
162 | "node_modules/ieee754": {
163 | "version": "1.2.1",
164 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
165 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
166 | "funding": [
167 | {
168 | "type": "github",
169 | "url": "https://github.com/sponsors/feross"
170 | },
171 | {
172 | "type": "patreon",
173 | "url": "https://www.patreon.com/feross"
174 | },
175 | {
176 | "type": "consulting",
177 | "url": "https://feross.org/support"
178 | }
179 | ]
180 | },
181 | "node_modules/inherits": {
182 | "version": "2.0.4",
183 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
184 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
185 | },
186 | "node_modules/lodash.snakecase": {
187 | "version": "4.1.1",
188 | "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
189 | "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
190 | },
191 | "node_modules/lodash.uniqwith": {
192 | "version": "4.5.0",
193 | "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz",
194 | "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q=="
195 | },
196 | "node_modules/peek-readable": {
197 | "version": "5.0.0-alpha.5",
198 | "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz",
199 | "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA==",
200 | "engines": {
201 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
202 | },
203 | "funding": {
204 | "type": "github",
205 | "url": "https://github.com/sponsors/Borewit"
206 | }
207 | },
208 | "node_modules/readable-stream": {
209 | "version": "3.6.0",
210 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
211 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
212 | "dependencies": {
213 | "inherits": "^2.0.3",
214 | "string_decoder": "^1.1.1",
215 | "util-deprecate": "^1.0.1"
216 | },
217 | "engines": {
218 | "node": ">= 6"
219 | }
220 | },
221 | "node_modules/readable-web-to-node-stream": {
222 | "version": "3.0.2",
223 | "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
224 | "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
225 | "dependencies": {
226 | "readable-stream": "^3.6.0"
227 | },
228 | "engines": {
229 | "node": ">=8"
230 | },
231 | "funding": {
232 | "type": "github",
233 | "url": "https://github.com/sponsors/Borewit"
234 | }
235 | },
236 | "node_modules/safe-buffer": {
237 | "version": "5.2.1",
238 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
239 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
240 | "funding": [
241 | {
242 | "type": "github",
243 | "url": "https://github.com/sponsors/feross"
244 | },
245 | {
246 | "type": "patreon",
247 | "url": "https://www.patreon.com/feross"
248 | },
249 | {
250 | "type": "consulting",
251 | "url": "https://feross.org/support"
252 | }
253 | ]
254 | },
255 | "node_modules/string_decoder": {
256 | "version": "1.3.0",
257 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
258 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
259 | "dependencies": {
260 | "safe-buffer": "~5.2.0"
261 | }
262 | },
263 | "node_modules/strtok3": {
264 | "version": "7.0.0-alpha.8",
265 | "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz",
266 | "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==",
267 | "dependencies": {
268 | "@tokenizer/token": "^0.3.0",
269 | "peek-readable": "^5.0.0-alpha.5"
270 | },
271 | "engines": {
272 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
273 | },
274 | "funding": {
275 | "type": "github",
276 | "url": "https://github.com/sponsors/Borewit"
277 | }
278 | },
279 | "node_modules/token-types": {
280 | "version": "5.0.0-alpha.2",
281 | "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz",
282 | "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==",
283 | "dependencies": {
284 | "@tokenizer/token": "^0.3.0",
285 | "ieee754": "^1.2.1"
286 | },
287 | "engines": {
288 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
289 | },
290 | "funding": {
291 | "type": "github",
292 | "url": "https://github.com/sponsors/Borewit"
293 | }
294 | },
295 | "node_modules/ts-mixer": {
296 | "version": "6.0.1",
297 | "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
298 | "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
299 | },
300 | "node_modules/tslib": {
301 | "version": "2.4.0",
302 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
303 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
304 | },
305 | "node_modules/typescript": {
306 | "version": "5.8.2",
307 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
308 | "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
309 | "dev": true,
310 | "bin": {
311 | "tsc": "bin/tsc",
312 | "tsserver": "bin/tsserver"
313 | },
314 | "engines": {
315 | "node": ">=14.17"
316 | }
317 | },
318 | "node_modules/undici": {
319 | "version": "5.29.0",
320 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
321 | "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
322 | "license": "MIT",
323 | "dependencies": {
324 | "@fastify/busboy": "^2.0.0"
325 | },
326 | "engines": {
327 | "node": ">=14.0"
328 | }
329 | },
330 | "node_modules/util-deprecate": {
331 | "version": "1.0.2",
332 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
333 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
334 | },
335 | "node_modules/ws": {
336 | "version": "8.17.1",
337 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
338 | "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
339 | "engines": {
340 | "node": ">=10.0.0"
341 | },
342 | "peerDependencies": {
343 | "bufferutil": "^4.0.1",
344 | "utf-8-validate": ">=5.0.2"
345 | },
346 | "peerDependenciesMeta": {
347 | "bufferutil": {
348 | "optional": true
349 | },
350 | "utf-8-validate": {
351 | "optional": true
352 | }
353 | }
354 | }
355 | },
356 | "dependencies": {
357 | "@discordjs/builders": {
358 | "version": "1.0.0",
359 | "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz",
360 | "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==",
361 | "requires": {
362 | "@sapphire/shapeshift": "^3.5.1",
363 | "discord-api-types": "^0.36.2",
364 | "fast-deep-equal": "^3.1.3",
365 | "ts-mixer": "^6.0.1",
366 | "tslib": "^2.4.0"
367 | }
368 | },
369 | "@discordjs/collection": {
370 | "version": "1.0.0",
371 | "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz",
372 | "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q=="
373 | },
374 | "@discordjs/rest": {
375 | "version": "1.0.0",
376 | "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz",
377 | "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==",
378 | "requires": {
379 | "@discordjs/collection": "^1.0.0",
380 | "@sapphire/async-queue": "^1.3.2",
381 | "@sapphire/snowflake": "^3.2.2",
382 | "discord-api-types": "^0.36.2",
383 | "file-type": "^17.1.2",
384 | "tslib": "^2.4.0",
385 | "undici": "^5.7.0"
386 | }
387 | },
388 | "@fastify/busboy": {
389 | "version": "2.1.1",
390 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
391 | "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="
392 | },
393 | "@sapphire/async-queue": {
394 | "version": "1.3.2",
395 | "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz",
396 | "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g=="
397 | },
398 | "@sapphire/shapeshift": {
399 | "version": "3.5.1",
400 | "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz",
401 | "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==",
402 | "requires": {
403 | "fast-deep-equal": "^3.1.3",
404 | "lodash.uniqwith": "^4.5.0"
405 | }
406 | },
407 | "@sapphire/snowflake": {
408 | "version": "3.2.2",
409 | "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz",
410 | "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ=="
411 | },
412 | "@tokenizer/token": {
413 | "version": "0.3.0",
414 | "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
415 | "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
416 | },
417 | "@types/node": {
418 | "version": "18.0.6",
419 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.6.tgz",
420 | "integrity": "sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw=="
421 | },
422 | "@types/ws": {
423 | "version": "8.5.3",
424 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
425 | "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
426 | "requires": {
427 | "@types/node": "*"
428 | }
429 | },
430 | "discord-api-types": {
431 | "version": "0.36.2",
432 | "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.2.tgz",
433 | "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q=="
434 | },
435 | "discord.js": {
436 | "version": "14.0.3",
437 | "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz",
438 | "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==",
439 | "requires": {
440 | "@discordjs/builders": "^1.0.0",
441 | "@discordjs/collection": "^1.0.0",
442 | "@discordjs/rest": "^1.0.0",
443 | "@sapphire/snowflake": "^3.2.2",
444 | "@types/ws": "^8.5.3",
445 | "discord-api-types": "^0.36.2",
446 | "fast-deep-equal": "^3.1.3",
447 | "lodash.snakecase": "^4.1.1",
448 | "tslib": "^2.4.0",
449 | "undici": "^5.8.0",
450 | "ws": "^8.8.1"
451 | }
452 | },
453 | "fast-deep-equal": {
454 | "version": "3.1.3",
455 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
456 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
457 | },
458 | "file-type": {
459 | "version": "17.1.3",
460 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz",
461 | "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==",
462 | "requires": {
463 | "readable-web-to-node-stream": "^3.0.2",
464 | "strtok3": "^7.0.0-alpha.7",
465 | "token-types": "^5.0.0-alpha.2"
466 | }
467 | },
468 | "ieee754": {
469 | "version": "1.2.1",
470 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
471 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
472 | },
473 | "inherits": {
474 | "version": "2.0.4",
475 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
476 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
477 | },
478 | "lodash.snakecase": {
479 | "version": "4.1.1",
480 | "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
481 | "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
482 | },
483 | "lodash.uniqwith": {
484 | "version": "4.5.0",
485 | "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz",
486 | "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q=="
487 | },
488 | "peek-readable": {
489 | "version": "5.0.0-alpha.5",
490 | "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz",
491 | "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA=="
492 | },
493 | "readable-stream": {
494 | "version": "3.6.0",
495 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
496 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
497 | "requires": {
498 | "inherits": "^2.0.3",
499 | "string_decoder": "^1.1.1",
500 | "util-deprecate": "^1.0.1"
501 | }
502 | },
503 | "readable-web-to-node-stream": {
504 | "version": "3.0.2",
505 | "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
506 | "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
507 | "requires": {
508 | "readable-stream": "^3.6.0"
509 | }
510 | },
511 | "safe-buffer": {
512 | "version": "5.2.1",
513 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
514 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
515 | },
516 | "string_decoder": {
517 | "version": "1.3.0",
518 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
519 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
520 | "requires": {
521 | "safe-buffer": "~5.2.0"
522 | }
523 | },
524 | "strtok3": {
525 | "version": "7.0.0-alpha.8",
526 | "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz",
527 | "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==",
528 | "requires": {
529 | "@tokenizer/token": "^0.3.0",
530 | "peek-readable": "^5.0.0-alpha.5"
531 | }
532 | },
533 | "token-types": {
534 | "version": "5.0.0-alpha.2",
535 | "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz",
536 | "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==",
537 | "requires": {
538 | "@tokenizer/token": "^0.3.0",
539 | "ieee754": "^1.2.1"
540 | }
541 | },
542 | "ts-mixer": {
543 | "version": "6.0.1",
544 | "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz",
545 | "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg=="
546 | },
547 | "tslib": {
548 | "version": "2.4.0",
549 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
550 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
551 | },
552 | "typescript": {
553 | "version": "5.8.2",
554 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
555 | "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
556 | "dev": true
557 | },
558 | "undici": {
559 | "version": "5.29.0",
560 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
561 | "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
562 | "requires": {
563 | "@fastify/busboy": "^2.0.0"
564 | }
565 | },
566 | "util-deprecate": {
567 | "version": "1.0.2",
568 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
569 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
570 | },
571 | "ws": {
572 | "version": "8.17.1",
573 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
574 | "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
575 | "requires": {}
576 | }
577 | }
578 | }
579 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "discordjs-logger",
3 | "version": "5.0.1",
4 | "description": "Discord.js all events!",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": "git+https://github.com/onepiecehung/discordjs-logger.git",
10 | "keywords": [
11 | "discord.js",
12 | "discord",
13 | "logger",
14 | "discord.js-logger"
15 | ],
16 | "author": "Nguyen Huu Hung (@ds112,@onepiecehung)",
17 | "license": "MIT",
18 | "bugs": {
19 | "url": "https://github.com/onepiecehung/discordjs-logger/issues"
20 | },
21 | "homepage": "https://github.com/onepiecehung/discordjs-logger#readme",
22 | "dependencies": {
23 | "discord.js": "^14.0.3"
24 | },
25 | "devDependencies": {
26 | "typescript": "^5.8.2"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */
4 | /* Basic Options */
5 | // "incremental": true, /* Enable incremental compilation */
6 | "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
7 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
8 | // "lib": [], /* Specify library files to be included in the compilation. */
9 | "allowJs": true, /* Allow javascript files to be compiled. */
10 | // "checkJs": true, /* Report errors in .js files. */
11 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
12 | "declaration": true, /* Generates corresponding '.d.ts' file. */
13 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
14 | "sourceMap": false, /* Generates corresponding '.map' file. */
15 | // "outFile": "./", /* Concatenate and emit output to single file. */
16 | "outDir": "./", /* Redirect output structure to the directory. */
17 | "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
18 | // "composite": true, /* Enable project compilation */
19 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
20 | // "removeComments": true, /* Do not emit comments to output. */
21 | // "noEmit": true, /* Do not emit outputs. */
22 | "importHelpers": true, /* Import emit helpers from 'tslib'. */
23 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
24 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
25 | /* Strict Type-Checking Options */
26 | "strict": true, /* Enable all strict type-checking options. */
27 | "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
28 | // "strictNullChecks": true, /* Enable strict null checks. */
29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
34 | /* Additional Checks */
35 | // "noUnusedLocals": true, /* Report errors on unused locals. */
36 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
37 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
38 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
39 | /* Module Resolution Options */
40 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
41 | // "baseUrl": "src", /* Base directory to resolve non-absolute module names. */
42 | // "paths": {
43 | // "@/*": [
44 | // "*"
45 | // ],
46 | // "@bin/*": [
47 | // "bin/*"
48 | // ],
49 | // "@config/*": [
50 | // "config/*"
51 | // ],
52 | // "@connector/*": [
53 | // "connector/*"
54 | // ],
55 | // "@controllers/*": [
56 | // "controllers/*"
57 | // ],
58 | // "@core/*": [
59 | // "core/*"
60 | // ],
61 | // "@interfaces/*": [
62 | // "interfaces/*"
63 | // ],
64 | // "@messages/*": [
65 | // "messages/*"
66 | // ],
67 | // "@middleware/*": [
68 | // "middleware/*"
69 | // ],
70 | // "@models/*": [
71 | // "models/*"
72 | // ],
73 | // "@repository/*": [
74 | // "repository/*"
75 | // ],
76 | // "@routes/*": [
77 | // "routes/*"
78 | // ],
79 | // "@services/*": [
80 | // "services/*"
81 | // ],
82 | // "@utils/*": [
83 | // "utils/*"
84 | // ],
85 | // "@workers/*": [
86 | // "workers/*"
87 | // ]
88 | // }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
89 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
90 | "typeRoots": [
91 | "node_modules/@types"
92 | ], /* List of folders to include type definitions from. */
93 | // "types": [], /* Type declaration files to be included in compilation. */
94 | "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
95 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
96 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
97 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
98 | /* Source Map Options */
99 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
100 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
101 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
102 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
103 | /* Experimental Options */
104 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
105 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
106 | /* Advanced Options */
107 | "skipLibCheck": true, /* Skip type checking of declaration files. */
108 | // "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
109 | },
110 | "include": [
111 | "./*",
112 | ".env"
113 | ],
114 | "lib": [
115 | "esnext",
116 | "dom"
117 | ],
118 | "exclude": [
119 | "node_modules"
120 | ]
121 | }
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "defaultSeverity": "error",
3 | "extends": [
4 | "tslint:recommended"
5 | ],
6 | "jsRules": {},
7 | "rules": {
8 | "no-console": false,
9 | "new-parens": false,
10 | "no-empty": false,
11 | "no-unused-variable": false,
12 | "object-literal-shorthand": false,
13 | "ban-types": false,
14 | "triple-equals": false,
15 | "no-unused-expression": false,
16 | "no-trailing-whitespace": false,
17 | "radix": false,
18 | "arrow-return-shorthand": false,
19 | "one-variable-per-declaration": false,
20 | "variable-name": false,
21 | "no-shadowed-variable": false
22 | },
23 | "rulesDirectory": []
24 | }
--------------------------------------------------------------------------------