{"repo":"onepiecehung/discordjs-logger","free":true,"listed":false,"github":"https://github.com/onepiecehung/discordjs-logger","clone":"git clone https://github.com/onepiecehung/discordjs-logger.git","description":"Discord all events!","language":"TypeScript","stars":18,"topics":["discord","discord-bot","discord-js","discord-api","discordjs","discord-logger","discord-event"],"license":"MIT","category":"chat-messaging","readme_excerpt":"discordjs-logger v5 A lightweight logger for Discord.js events – now with a new generic API for flexible event registration! --- Overview 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: - Register a single event with a custom handler using on() . - Bulk-register events with default logging or custom handlers via registerEvents() . - Log all available events from Discord.js with a single call using logAllEvents() . This approach reduces boilerplate and makes your code easier to maintain. --- Installation To install discordjs-logger v5, update your package.json to use version 5: or Note: If you’re still on v4, your package-lock or yarn.lock will prevent automatic upgrade. Please refer to the Migration Guide below. --- Usage Instructions (v5) Below are some examples demonstrating the new API. Basic Setup API Methods on(event, handler) Registers a specific event with your custom handler. Example: registerEvents(arg) Overloaded to support two usages: 1. Default handler: Pass an array of events (from the Discord.js Events enum) to register them with a default logger. 2. Custom handlers: Pass an array of tuples [event, handler] to register each event with a custom handler. logAllEvents() Registers all available events (retrieved from the Discord.js Events enum) with the default logging handler. --- Migration Guide: Upgrading from Version 4","default_branch":null,"files":null,"tree":[],"storefront":"/r/onepiecehung","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/onepiecehung/discordjs-logger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}