@@ -47,8 +47,9 @@ private string GetHomeProcess() {
4747 return "http://steamcommunity.com/id/" + VanityURL + "/home_process" ;
4848 } else if ( SteamID != 0 ) {
4949 return "http://steamcommunity.com/profiles/" + SteamID + "/home_process" ;
50+ } else {
51+ return null ;
5052 }
51- return null ;
5253 }
5354
5455 internal ArchiWebHandler ( Bot bot , string apiKey ) {
@@ -195,6 +196,7 @@ internal List<SteamTradeOffer> GetTradeOffers() {
195196 }
196197 result . Add ( tradeOffer ) ;
197198 }
199+
198200 return result ;
199201 }
200202
@@ -266,23 +268,24 @@ internal async Task LeaveClan(ulong clanID) {
266268 { "action" , "leaveGroup" } ,
267269 { "groupId" , clanID . ToString ( ) }
268270 } ;
271+
269272 await Utilities . UrlPostRequest ( request , postData , SteamCookieDictionary ) . ConfigureAwait ( false ) ;
270273 }
271274
272275 internal async Task < HtmlDocument > GetBadgePage ( int page ) {
273- HtmlDocument result = null ;
274- if ( SteamID != 0 && page != 0 ) {
275- result = await Utilities . UrlToHtmlDocument ( "http://steamcommunity.com/profiles/" + SteamID + "/badges?p=" + page , SteamCookieDictionary ) . ConfigureAwait ( false ) ;
276+ if ( SteamID == 0 || page == 0 ) {
277+ return null ;
276278 }
277- return result ;
279+
280+ return await Utilities . UrlToHtmlDocument ( "http://steamcommunity.com/profiles/" + SteamID + "/badges?p=" + page , SteamCookieDictionary ) . ConfigureAwait ( false ) ;
278281 }
279282
280283 internal async Task < HtmlDocument > GetGameCardsPage ( ulong appID ) {
281- HtmlDocument result = null ;
282- if ( SteamID != 0 && appID != 0 ) {
283- result = await Utilities . UrlToHtmlDocument ( "http://steamcommunity.com/profiles/" + SteamID + "/gamecards/" + appID , SteamCookieDictionary ) . ConfigureAwait ( false ) ;
284+ if ( SteamID == 0 || appID == 0 ) {
285+ return null ;
284286 }
285- return result ;
287+
288+ return await Utilities . UrlToHtmlDocument ( "http://steamcommunity.com/profiles/" + SteamID + "/gamecards/" + appID , SteamCookieDictionary ) . ConfigureAwait ( false ) ;
286289 }
287290 }
288291}
0 commit comments