我已经检查了SteamBot的来源,但由于我是一名新的编码器,我似乎不太了解它。如果有人可以帮助我,那就太好了!提前谢谢。
我在SteamBot上找到了一种方法(https://github.com/Jessecar96/SteamBot/blob/master/SteamTrade/TradeOffer/OfferSession.cs#L30)
但我似乎并不理解。
答案 0 :(得分:1)
在您的代码中,您需要引用类
//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
}