Sandbox/315bc7f2 fc36 400c 8917 lmhx#91
Open
tatoamericano8-blip wants to merge 12 commits into
Open
Conversation
donde el bot escucha lo que pasa en Discord en tiempo real.
## Problem\nThe command loader was crashing with because it assumed all objects were SlashCommandBuilder instances with a method.\n\nSome commands may have as plain objects or other structures that don't have this method, causing the bot to crash during startup.\n\n## Solution\nAdded a new helper function that safely handles both:\n- SlashCommandBuilder instances (calls )\n- Plain objects (returns them directly)\n- Invalid structures (returns null and logs a warning)\n\nThis function is now used in all places where was previously called directly:\n- Line 103: Loading commands\n- Line 117: Filtering commands with subcommands\n- Line 122: Counting subcommands\n- Line 155+: Command registration\n\n## Changes\n- Added helper function\n- Updated to use the helper\n- Updated to use the helper\n- Added proper null checks and error logging\n\nThe bot will now gracefully skip malformed commands instead of crashing.
Author
|
hola |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.