@@ -291,10 +291,30 @@ internal static async Task<ResultadoCombinado> EnviarLikeEFavorito(Bot bot, EAcc
291291 return access >= EAccess . Owner ? FormatarResposta ( Strings . BotNotFound ) : null ;
292292 }
293293
294- // Verifica quantos bots estão online
294+ // === Obtém o AppID do sharedfile (opcional para blacklist) ===
295+ Bot firstBot = bots . First ( b => b . IsConnectedAndLoggedOn ) ;
296+ string ? appId = await AppIdHelper . ObterAppIdDoSharedfile ( firstBot , sharedfileId ) . ConfigureAwait ( false ) ;
297+
298+ HashSet < string > botsBlacklisted = [ ] ;
299+
300+ if ( ! string . IsNullOrEmpty ( appId ) ) {
301+ // === Obtém bots na blacklist ===
302+ botsBlacklisted = await BlacklistHelper . ObterBotsNaBlacklist ( appId ) . ConfigureAwait ( false ) ;
303+ if ( botsBlacklisted . Count > 0 ) {
304+ ASF . ArchiLogger . LogGenericInfo ( $ "Socialboost|SHAREDFILES => { botsBlacklisted . Count } bot(s) na blacklist do AppID { appId } ") ;
305+ }
306+ } else {
307+ ASF . ArchiLogger . LogGenericWarning ( $ "Socialboost|SHAREDFILES => Não foi possível obter AppID, sistema de blacklist desabilitado para este sharedfile") ;
308+ }
309+
310+ if ( botsBlacklisted . Count > 0 ) {
311+ ASF . ArchiLogger . LogGenericInfo ( $ "Socialboost|SHAREDFILES => { botsBlacklisted . Count } bot(s) na blacklist do AppID { appId } ") ;
312+ }
313+
314+ // Verifica quantos bots estão online (e não na blacklist)
295315 int botsOnline = 0 ;
296316 foreach ( Bot bot in bots ) {
297- if ( bot . IsConnectedAndLoggedOn ) {
317+ if ( bot . IsConnectedAndLoggedOn && ! botsBlacklisted . Contains ( bot . BotName ) ) {
298318 botsOnline ++ ;
299319 }
300320 }
@@ -305,20 +325,6 @@ internal static async Task<ResultadoCombinado> EnviarLikeEFavorito(Bot bot, EAcc
305325 : null ;
306326 }
307327
308- // Obtém o AppID do sharedfile usando o primeiro bot disponível
309- Bot firstBot = bots . First ( b => b . IsConnectedAndLoggedOn ) ;
310- string ? appId = await SessionHelper . FetchAppIDShared (
311- firstBot ,
312- $ "https://steamcommunity.com/sharedfiles/filedetails/?id={ sharedfileId } ",
313- sharedfileId
314- ) . ConfigureAwait ( false ) ;
315-
316- if ( string . IsNullOrEmpty ( appId ) ) {
317- return access >= EAccess . Owner
318- ? FormatarResposta ( $ "Erro ao obter AppID do sharedfile { sharedfileId } ")
319- : null ;
320- }
321-
322328 // Listas para armazenar resultados
323329 List < ResultadoCombinado > resultados = [ ] ;
324330 int likesEnviados = 0 ;
@@ -333,6 +339,11 @@ internal static async Task<ResultadoCombinado> EnviarLikeEFavorito(Bot bot, EAcc
333339 break ;
334340 }
335341
342+ // === NOVO: Pula bots na blacklist ===
343+ if ( botsBlacklisted . Contains ( bot . BotName ) ) {
344+ continue ;
345+ }
346+
336347 // Pula bots offline
337348 if ( ! bot . IsConnectedAndLoggedOn ) {
338349 continue ;
@@ -359,7 +370,7 @@ internal static async Task<ResultadoCombinado> EnviarLikeEFavorito(Bot bot, EAcc
359370 bot ,
360371 Commands . GetProxyAccess ( bot , access , steamID ) ,
361372 sharedfileId ,
362- appId ,
373+ appId ! ,
363374 jaEnviouLike == true ,
364375 jaEnviouFav == true
365376 ) . ConfigureAwait ( false ) ;
@@ -369,6 +380,11 @@ internal static async Task<ResultadoCombinado> EnviarLikeEFavorito(Bot bot, EAcc
369380 continue ;
370381 }
371382
383+ // === Se detectou VAC ban, adiciona à blacklist (se tiver AppID) ===
384+ if ( resultado . VacBan && ! string . IsNullOrEmpty ( appId ) ) {
385+ await BlacklistHelper . AdicionarBotNaBlacklist ( bot . BotName , appId ) . ConfigureAwait ( false ) ;
386+ }
387+
372388 resultados . Add ( resultado ) ;
373389
374390 if ( resultado . LikeSucesso ) {
0 commit comments