You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug When I try to use the FreeGamesCommand on my bot, I get a NullReferenceException in PluginContext.get_CancellationToken(). This prevents me from saving the options and executing the command.
Expected behavior I expected the command to save the options and execute without any errors.
Here is a copy of the error log:
2023-10-29 18:25:24|dotnet-2326|ERROR|ASF|OnBotCommand() System.NullReferenceException: Object reference not set to an instance of an object.
at Maxisoft.ASF.PluginContext.get_CancellationToken()
at ASFFreeGames.Commands.FreeGamesCommand.SaveOptions()
at ASFFreeGames.Commands.FreeGamesCommand.HandleSetCommand(Bot bot, String[] args)
at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
at ArchiSteamFarm.Core.Utilities.InParallelT
at ArchiSteamFarm.Plugins.PluginsCore.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
Desktop (please complete the following information):
OS: Windows 10
ASF: 5.4.12.5
Plugin build with 4e97524
The text was updated successfully, but these errors were encountered:
This commit adds some checks and methods to ensure that the PluginContext is valid and initialized before using it. It also adds a cancellationToken parameter to some of the methods that use the PluginContext cancellation token. This should resolve the issue #42 (#42) that was reported.
Describe the bug When I try to use the FreeGamesCommand on my bot, I get a NullReferenceException in PluginContext.get_CancellationToken(). This prevents me from saving the options and executing the command.
To Reproduce Steps to reproduce the behavior:
Freegames set VERBOSE
Expected behavior I expected the command to save the options and execute without any errors.
Here is a copy of the error log:
Desktop (please complete the following information):
OS: Windows 10
ASF: 5.4.12.5
Plugin build with 4e97524
The text was updated successfully, but these errors were encountered: