C# 我怎样才能接受 steam 的 steam 报价?

C# how can I accept a steam steam offer?

我已经检查了 SteamBot 的源代码,但由于我是一名新程序员,所以我似乎不太了解它。如果有人可以帮助我,那就太好了!提前致谢。

我在 SteamBot 上找到了方法 (https://github.com/Jessecar96/SteamBot/blob/master/SteamTrade/TradeOffer/OfferSession.cs#L30)

不过好像没看懂

这里有一些可以帮助的东西 (https://www.reddit.com/r/SteamBot/comments/3a6rp6/who_to_accept_traiding_offers_with_c_steam/.compact)

在您的代码中,您希望引用 class

//at the top of the file
using SteamTrade.TradeOffer;

//the later on in the file
Offersession newSteamSession = new OfferSession('yourApiKey', 'steamweb');

string convertedStringtradeId = String.Empty;
var isAccepted = newSteamSession.Accept(tradeOfferId, convertedStringtradeId);

if(isAccepted) 
{
    //do more logic here if the offer was good
    //you can use the convertedStringtradeId if you need something


}else
{
  //what happens when things go wrong
}