nexcord-log
v0.0.1Discord bot Message & Voice log bot recipe
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/tsxfor highly readable embed declarations.
Structure
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:
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:
xnex install nexcord-log
How It Works
- State Store:
voiceConnectionLogis registered globally as aMap<string, Date>in the config service to track active voice sessions across modules safely. - Dynamic Resolution:
registerConfigWaitresolvesChannelServiceafter the client goes live, safely injecting operational channel streams into the framework. - Event Catching: Decoupled event listeners parse execution payloads via
DcEvents<T>type mappings ensuring static code safety throughout production lifecycles.
Versions
Release links are tracked by Nex; source code lives in the developer's GitHub repo.
setup.files
Files that will be integrated into your project
- recipes
- nexcord-log
- README.md โ recipes/nexcord-log
-
-
- src
- components
- log.components.tsx โ src/components
-
- configs
- log.config.ts โ src/configs
-
- events
- Log.events.ts โ src/events
-
-
setup.scripts
Commands executed during recipe integration
These commands run automatically during integration โ after your explicit approval via the Nex CLI.
- 1 Auto-run script
bun install @nexcord/core @nexcord/config @nexcord/tsx
nexconfig
Full recipe configuration
{
"name": "nexcord-log",
"version": "0.0.1",
"description": "Discord bot Message & Voice log bot recipe",
"keywords": [
"nexcord",
"discord.js",
"log",
"tsx",
"nex",
"recipe"
],
"files": [
"src/components",
"src/configs",
"src/events",
"recipes/nexcord-log"
],
"setup": {
"scripts": [
"bun install @nexcord/core @nexcord/config @nexcord/tsx"
],
"files": {
"src/components": {
"log.components.tsx": "src/components"
},
"src/configs": {
"log.config.ts": "src/configs"
},
"src/events": {
"Log.events.ts": "src/events"
},
"recipes/nexcord-log": {
"README.md": "recipes/nexcord-log"
}
}
}
}
You might also be interested in these
nexcord-hello
Example Nexcord slash command that registers /hello and replies with an ephemeral greeting โ a good starting point for building your own commands.
nexcord-core
Nexcord basic project recipe
axum-log
Basic log middleware for axum api application.
nestjs-basic-auth
NESTJS BASIC AUTH RECIPE
nestjs
NESTJS EMPTY TEMPLATE