Skip to content

Idk#81

Open
NHStarlight wants to merge 112 commits into
codebymitch:mainfrom
NHStarlight:main
Open

Idk#81
NHStarlight wants to merge 112 commits into
codebymitch:mainfrom
NHStarlight:main

Conversation

@NHStarlight
Copy link
Copy Markdown

No description provided.

Updated error handling and logic for moderation cases retrieval.
Refactor error handling and user feedback in moderation cases command.
Refactor moderation event logging and case retrieval functions for improved readability and efficiency.
Updated comments for clarity and changed notification method to ephemeral.
Refactor messageCreate event to handle prefix commands and leveling logic.
Removed handleLeveling import and its usage to prevent errors.
NHStarlight and others added 19 commits May 26, 2026 14:22
Modify src/config/postgres.js to prioritize environment variables like `DATABASE_URL`, `PGHOST`, `PGPORT`, `PGDATABASE`, `PGUSER`, and `PGPASSWORD` for PostgreSQL connection settings, including SSL configuration when applicable.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d4f2b168-e09e-43fc-a7b4-00bc519a6768
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: baacfdfe-4384-406d-8932-56f17e67bff4
Replit-Helium-Checkpoint-Created: true
Replace console logs with a structured logger, fix database query issues, handle potential errors in JSON parsing and API responses, update permission flag usage, and ensure commands are properly checked before execution.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d4f2b168-e09e-43fc-a7b4-00bc519a6768
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2b9cf294-4dcd-4ba1-8f05-69b1b8ca8eb1
Replit-Helium-Checkpoint-Created: true
Implement a robust fake interaction object for prefix commands and correct prefix detection logic in moderation commands.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d4f2b168-e09e-43fc-a7b4-00bc519a6768
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f65c0055-07da-4287-983d-c160ceb13506
Replit-Helium-Checkpoint-Created: true
…rk together

Refactor messageCreate.js to create a fake interaction object for prefix commands, and update purge.js to correctly handle integer arguments, ensuring both command types function seamlessly.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d4f2b168-e09e-43fc-a7b4-00bc519a6768
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 66d5d1a2-9889-4d6f-9651-a53e69ae39f6
Replit-Helium-Checkpoint-Created: true
- Use shared reply/edit for prefix interactions

- Parse subcommands and subcommand groups from slash command schema

- Register command aliases and default nh! prefix config

- Align lock/purge prefix responses with InteractionHelper

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Rebrand help to nh_starlightsercurity with full command list from client.commands

- Keep category select while paging; fix help pagination target page

- English user messages for prefix errors and cooldowns

- Prefix massban mentions, sync getMember, alias conflict fixes

Co-authored-by: Cursor <cursoragent@cursor.com>
…sition, warnings error handling, purge limit, reason defaults
- Fixed timeout/mute duration parsing (support '2 days' and '2d' formats)
- Fixed quarantine role position (1 not 2 below bot's top role)
- Fixed warnings command error handling (catch logging errors)
- Made warn reason optional (default to 'No reason')
- Added more timeout/mute duration options (2d, 1y)
- Fixed purge command for 100+ messages with proper batching
- Added snipe command to get deleted messages
- Added prefix command to show server prefix
- Added 8ball command for magic 8 ball questions
- Added editafk command to edit AFK messages
- Fixed afk command to support prefix commands
- Fixed messageDelete event to store deleted messages for snipe
- Created new punishment_records table to track all moderation actions
- Fields: guild_id, user_id, moderator_id, punishment_type, reason, duration_minutes, expires_at, status, appeal_status, appeal_reason
- Added indexes on user_id, guild_id, and status for fast queries
- Helps prevent punishment evading by maintaining detailed records
- Added optional 'target' user parameter for admins to edit other users' AFK
- Added ManageGuild permission requirement
- Only admins can edit other users' AFK status
- Regular users can still edit their own AFK with /editafk
- Added optional 'newprefix' parameter to change server prefix
- Shows current prefix when called without arguments
- Updates guild config database when new prefix is set
- Added ManageGuild permission requirement for changing prefix
- Integrates with existing guildConfig service for consistency
- Validates prefix length (max 5 characters)
- Fixed corrupted escaped newlines in message handling
- Cleaned up the message assignment logic
- Command now works properly for both slash and prefix commands
- Maintains database storage and nickname updates
- When a user is mentioned in a message, bot checks if they are AFK
- Displays: '@username has been AFK for 2h 30m | Reason: message'
- Shows duration in days/hours/minutes/seconds format
- Handles multiple mentions in one message
- Non-intrusive: uses SuppressEmbeds flag for clean messages
- Auto-remove AFK when user sends a message
- Show: 'You have been AFK for 2h 30m'
- Track channels where user was mentioned during AFK
- Show: 'You were mentioned in: #channel1, #channel2'
- Store mention history in database for accurate notification
- Clean up all AFK data on return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant