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.
This pull request introduces enhancements and fixes across multiple modules, focusing on improving error handling, adding functionality, and refining code consistency. Key changes include the addition of fallback mechanisms for database operations, enhanced error messages for moderation commands, and updates to command aliases and parameters for better usability.
Moderation Enhancements:
save_warn_fallbackto store warnings in a JSON file if database operations fail. This ensures warnings are logged even during database outages. (cogs/Moderation.py, [1] [2]timeout,kick,ban, and others, providing clearer guidance to users when required parameters are missing or invalid. (cogs/Moderation.py, cogs/Moderation.pyR323-R400).kick->.k,.ban->.b) to improve command accessibility. (cogs/Moderation.py, [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Code Consistency:
datetime.datetime.utcnow()across moderation commands for better readability and consistency. (cogs/Moderation.py, [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Fun Module Improvements:
timezonecommand to accept an optionaldiscord.Memberparameter for better flexibility. (cogs/fun/Other.py, cogs/fun/Other.pyL76-R78)timezonecommand to handle cases where the user's timezone is invalid, improving user feedback. (cogs/fun/Other.py, cogs/fun/Other.pyL95-R96)Miscellaneous Fixes:
AutoFishing.pyrelated to thecog_unloadmethod, ensuring the autofishing task is properly canceled when the cog is unloaded. (cogs/economy/fishing/AutoFishing.py, cogs/economy/fishing/AutoFishing.pyR18-R23)os,json,Optional) in relevant files to support new functionality and improve type hinting. (cogs/Moderation.py, [1];cogs/fun/Other.py, [2]