Search code examples
c#steamsteambot

SteamKit2 what is the name of callback to get new trade offer?


I found in code "TradeProposedCallback" and "TradeResultCallbac" but they are not called when I get a new offer.

"SteamNotifications.NotificationCallback" called when I get a new offer but also when a new comment, message, etc. In the end, it comes out too often and I get from steam "Access Denied You don't have permission to access "http://store.steampowered.com/" on this server. Reference" How can I fix this problem? Without making a crutch in the form of a delay.


Solution

  • My solution

       if (callback.Notifications.Count > 0 && callback.Notifications[0].UserNotificationType == SteamBot.SteamNotifications.NotificationCallback.UserNotificationType.TradeOffer)
                        {
                            Console.WriteLine("TradeOffer");
                         }