This pull request addresses the KeyNotFoundException during the scheduled free game collection process and implements enhancements to bot handling. The changes are a direct response to the issue reported in #70.
Changes
ASFFreeGamesPlugin.cs: Introduced a pre-check for viable bots before initiating the free game collection command to prevent attempts to access keys that do not exist in the bot dictionary.
FreeGamesCommand.cs: Refined bot collection handling by trimming bot names to eliminate whitespace issues and employing GetValueOrDefault for safer retrieval of bot instances, thereby avoiding potential exceptions.
Command Handling: The HandleInternalCollectCommand method now provides a more detailed response, clearly stating the total number of games collected and enumerating the bots that participated in the operation.
Impact
These improvements are expected to significantly increase the stability and reliability of the free game collection feature within ASF, ensuring smoother operations and better user experience.
Additional Notes
Version bump to 1.5.2 to reflect the new changes and fixes.
Overview
This pull request addresses the
KeyNotFoundException
during the scheduled free game collection process and implements enhancements to bot handling. The changes are a direct response to the issue reported in #70.Changes
GetValueOrDefault
for safer retrieval of bot instances, thereby avoiding potential exceptions.HandleInternalCollectCommand
method now provides a more detailed response, clearly stating the total number of games collected and enumerating the bots that participated in the operation.Impact
These improvements are expected to significantly increase the stability and reliability of the free game collection feature within ASF, ensuring smoother operations and better user experience.
Additional Notes