nexcord-log

v0.0.1

Discord bot Message & Voice log bot recipe

_ _signor_p_ ยท 0 downloads ยท Updated 7/13/2026
nexcorddiscord.jslogtsxnexrecipe
xnex install nexcord-log GitHub repo

Nexcord Log Recipe

A minimalist, high-performance Message and Voice state logging system built with the Nexcord ecosystem. This recipe leverages dependency injection, shared config management, and JSX component rendering for clean Discord bot architecture.

Features

  • ๐Ÿ›‘ Message Delete Logs: Keeps track of removed user messages.
  • ๐Ÿ“ Message Edit Logs: Logs modified content with old vs new diffs.
  • ๐ŸŽ™๏ธ Voice State Tracking: Tracks joins, leaves, and channel moves.
  • โฑ๏ธ Duration Metrics: Automatically calculates time spent in voice channels.
  • ๐Ÿ’Ž JSX-Powered Embeds: Built using @nexcord/tsx for highly readable embed declarations.

Structure

plaintext
src/
 โ”œโ”€โ”€ components/
 โ”‚    โ””โ”€โ”€ log.components.tsx  # JSX Embed structure
 โ”œโ”€โ”€ configs/
 โ”‚    โ””โ”€โ”€ log.config.ts      # DI-aware configuration & global store
 โ””โ”€โ”€ events/
      โ””โ”€โ”€ Log.events.ts      # Event listeners using @Listener() & @On()

Setup & Configuration

Before running the bot, configure your target logging channel IDs inside src/configs/log.config.ts:

typescript
registerConfig('channelsId', () => ({
    defaultChannel: 'YOUR_DEFAULT_LOG_CHANNEL_ID',
    updateChannel:  'YOUR_UPDATE_LOG_CHANNEL_ID',
    deleteChannel:  'YOUR_DELETE_LOG_CHANNEL_ID'
}));

Installation

If installing manually, ensure the following core dependencies are available in your project:

bash
xnex install nexcord-log

How It Works

  1. State Store: voiceConnectionLog is registered globally as a Map<string, Date> in the config service to track active voice sessions across modules safely.
  2. Dynamic Resolution: registerConfigWait resolves ChannelService after the client goes live, safely injecting operational channel streams into the framework.
  3. Event Catching: Decoupled event listeners parse execution payloads via DcEvents<T> type mappings ensuring static code safety throughout production lifecycles.