Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix KeyNotFoundException for scheduled free game collection (#70)
This commit resolves the `KeyNotFoundException` encountered during the scheduled free game collection process. The issue was caused by an attempt to access a non-existent key in the bot dictionary, as reported in issue #70. Changes include: - Added a check in `ASFFreeGamesPlugin.cs` to ensure there are viable bots before proceeding with the free game collection command. - Modified `FreeGamesCommand.cs` to handle bot collections more robustly, trimming bot names to prevent whitespace issues and using `GetValueOrDefault` to avoid exceptions when a bot name is not found. - Updated the `HandleInternalCollectCommand` method to return a more informative response, indicating the number of collected games and the bots involved in the operation. These updates aim to enhance the stability and reliability of the free game collection feature in ASF.
- Loading branch information