File tree Expand file tree Collapse file tree 4 files changed +14
-11
lines changed Expand file tree Collapse file tree 4 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 120
120
</ItemGroup >
121
121
<ItemGroup >
122
122
<None Include =" App.config" />
123
+ <None Include =" config\example.json" >
124
+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
125
+ </None >
126
+ <None Include =" config\minimal.json" >
127
+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
128
+ </None >
123
129
<None Include =" packages.config" />
124
130
</ItemGroup >
125
131
<ItemGroup >
143
149
<Name >SteamAuth</Name >
144
150
</ProjectReference >
145
151
</ItemGroup >
146
- <ItemGroup >
147
- <Folder Include =" config\" />
148
- </ItemGroup >
152
+ <ItemGroup />
149
153
<Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
150
154
<PropertyGroup >
151
155
<PreBuildEvent >
Original file line number Diff line number Diff line change @@ -428,19 +428,14 @@ private async Task<string> ResponseSendTrade() {
428
428
return "Trade couldn't be send because SteamMasterID is not defined!" ;
429
429
}
430
430
431
- string token = null ;
432
- if ( ! string . IsNullOrEmpty ( BotConfig . SteamTradeToken ) && ! BotConfig . SteamTradeToken . Equals ( "null" ) ) {
433
- token = BotConfig . SteamTradeToken ;
434
- }
435
-
436
431
await Trading . LimitInventoryRequestsAsync ( ) . ConfigureAwait ( false ) ;
437
432
List < SteamItem > inventory = await ArchiWebHandler . GetMyTradableInventory ( ) . ConfigureAwait ( false ) ;
438
433
439
434
if ( inventory == null || inventory . Count == 0 ) {
440
435
return "Nothing to send, inventory seems empty!" ;
441
436
}
442
437
443
- if ( await ArchiWebHandler . SendTradeOffer ( inventory , BotConfig . SteamMasterID , token ) . ConfigureAwait ( false ) ) {
438
+ if ( await ArchiWebHandler . SendTradeOffer ( inventory , BotConfig . SteamMasterID , BotConfig . SteamTradeToken ) . ConfigureAwait ( false ) ) {
444
439
await AcceptAllConfirmations ( ) . ConfigureAwait ( false ) ;
445
440
return "Trade offer sent successfully!" ;
446
441
} else {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ internal sealed class BotConfig {
80
80
[ JsonProperty ( Required = Required . DisallowNull ) ]
81
81
internal bool SendOnFarmingFinished { get ; private set ; } = false ;
82
82
83
- [ JsonProperty ( Required = Required . DisallowNull ) ]
83
+ [ JsonProperty ]
84
84
internal string SteamTradeToken { get ; private set ; } = null ;
85
85
86
86
[ JsonProperty ( Required = Required . DisallowNull ) ]
@@ -230,6 +230,10 @@ internal static BotConfig LoadOldFormat(string path) {
230
230
botConfig . SteamParentalPIN = null ;
231
231
}
232
232
233
+ if ( botConfig . SteamTradeToken != null && botConfig . SteamTradeToken . Equals ( "null" ) ) {
234
+ botConfig . SteamTradeToken = null ;
235
+ }
236
+
233
237
return botConfig ;
234
238
}
235
239
Original file line number Diff line number Diff line change 15
15
"UseAsfAsMobileAuthenticator" : false ,
16
16
"ShutdownOnFarmingFinished" : false ,
17
17
"SendOnFarmingFinished" : false ,
18
- "SteamTradeToken" : " null" ,
18
+ "SteamTradeToken" : null ,
19
19
"SendTradePeriod" : 0 ,
20
20
"GamesPlayedWhileIdle" : [
21
21
0
You can’t perform that action at this time.
0 commit comments