Skip: IRC/API methods (my automation uses web interface)
Timing: Real-Time Detection During Active Session
Need to test before starting automation each day
Real-time detection during live chat sessions
Scenario: "Is this account safe to send messages with right now?"
🚨 CORE PROBLEM TO SOLVE:
My automation sends chat messages using browser automation. I need a bulletproof method to
detect if an account is shadowbanned BEFORE it starts messaging, so I don't waste time sending
invisible messages.
Key Requirements:
Works with browser automation (Selenium/undetected-chromedriver)
Tests actual message visibility in real Twitch streams
Bypasses or handles chat restrictions (followers-only, etc.)
Returns clear: ✅ Safe to use / ❌ Shadowbanned
Research this specific use case and find me the method that actually works! 🔍
Assistant
I'll help you build a robust shadowban detection system for your Twitch automation. Here's a comprehensive solution that addresses your specific needs:
Automated Shadowban Detection System
Core Detection Strategy
The most reliable method combines multiple verification techniques:
1. Self-Message Visibility Test (Primary Method)
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import random
class TwitchShadowbanDetector:
def __init__(self, driver):
self.driver = driver
self.test_channels = [
'your_test_channel', # Your own channel
'small_streamer_1', # Backup channels with <50 viewers
'small_streamer_2'
]
def detect_shadowban(self, account_username):
"""
Primary detection method: Send test message and verify visibility
"""
# Generate unique test message
test_id = f"test_{random.randint(10000, 99999)}_{int(time.time())}"
test_message = f"!ping {test_id}"
for channel in self.test_channels:
try:
# Navigate to channel
self.driver.get(f"https://www.twitch.tv/{channel}")
time.sleep(3)
# Send test message
chat_input = WebDriverWait(self.driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, 'textarea[data-a-target="chat-input"]'))
)
chat_input.send_keys(test_message)
chat_input.send_keys(Keys.RETURN)
# Wait and check for message appearance
time.sleep(2)
# Check if message appears in chat
chat_messages = self.driver.find_elements(By.CSS_SELECTOR, '[data-a-target="chat-line-message"]')
for msg in chat_messages[-10:]: # Check last 10 messages
if test_id in msg.text and account_username in msg.text:
return True # Not shadowbanned
except Exception as e:
continue
return False # Likely shadowbanned
2. Multi-Tab Verification (Enhanced Reliability)
def multi_tab_verification(self, account_username, test_message_id):
"""
Open incognito tab to verify message visibility from external perspective
"""
# Store current window
main_window = self.driver.current_window_handle
# Open new incognito window
self.driver.execute_script("window.open('','_blank');")
self.driver.switch_to.window(self.driver.window_handles[-1])
try:
# Navigate to same channel without logging in
self.driver.get(f"https://www.twitch.tv/{self.test_channels[0]}")
time.sleep(3)
# Look for the test message
chat_messages = self.driver.find_elements(By.CSS_SELECTOR, '[data-a-target="chat-line-message"]')
for msg in chat_messages[-20:]:
if test_message_id in msg.text:
return True # Message visible = not shadowbanned
return False # Message not visible = shadowbanned
finally:
self.driver.close()
self.driver.switch_to.window(main_window)
Bypass Chat Restrictions
Handle Followers-Only Mode:
def bypass_follower_restrictions(self):
"""
Use channels that don't have follower restrictions for testing
"""
# Maintain list of reliable test channels
open_chat_channels = [
'forsen', # Usually has open chat
'xqc', # High traffic, open chat
'sodapoppin' # Generally open
]
# Test in multiple channels to ensure accuracy
for channel in open_chat_channels:
if self.can_send_message(channel):
return channel
return None
def can_send_message(self, channel):
"""
Check if chat input is available and not restricted
"""
try:
chat_input = self.driver.find_element(By.CSS_SELECTOR, 'textarea[data-a-target="chat-input"]')
return chat_input.is_enabled() and not chat_input.get_attribute('disabled')
except:
return False
Complete Detection Pipeline
class ShadowbanDetectionPipeline:
def __init__(self, accounts):
self.accounts = accounts # List of 4 account credentials
self.results = {}
def test_all_accounts(self):
"""
Test all 4 accounts and return status report
"""
for account in self.accounts:
driver = self.create_driver_session()
detector = TwitchShadowbanDetector(driver)
# Login to account
self.login_to_twitch(driver, account)
# Run detection tests
is_safe = self.run_detection_suite(detector, account['username'])
self.results[account['username']] = {
'status': '✅ Safe to use' if is_safe else '❌ Shadowbanned',
'timestamp': time.time(),
'confidence': self.calculate_confidence(is_safe)
}
driver.quit()
return self.results
def run_detection_suite(self, detector, username):
"""
Run multiple detection methods for accuracy
"""
tests = []
# Test 1: Direct message visibility
tests.append(detector.detect_shadowban(username))
# Test 2: Multi-tab verification
test_id = f"verify_{random.randint(10000, 99999)}"
tests.append(detector.multi_tab_verification(username, test_id))
# Test 3: Message rate test
tests.append(self.test_message_rate(detector))
# Majority vote for final decision
return sum(tests) >= 2
Third-Party Verification Tools
1. TwitchTracker Integration:
def verify_with_twitchtracker(self, username):
"""
Check if user appears in public chat logs
"""
url = f"https://twitchtracker.com/search?q={username}"
self.driver.get(url)
time.sleep(2)
# Check if user has recent chat activity
try:
chat_activity = self.driver.find_element(By.CSS_SELECTOR, '.chat-activity')
return 'No recent activity' not in chat_activity.text
except:
return None # Inconclusive
2. Stream Chat Monitor:
def monitor_chat_appearance(self, username, duration=30):
"""
Monitor if messages appear in real-time chat feed
"""
start_time = time.time()
message_count = 0
while time.time() - start_time < duration:
messages = self.driver.find_elements(By.CSS_SELECTOR, '[data-a-target="chat-line-message"]')
for msg in messages:
if username in msg.text:
message_count += 1
time.sleep(1)
return message_count > 0
Daily Pre-Check Routine
def daily_account_health_check():
"""
Run before starting daily automation
"""
pipeline = ShadowbanDetectionPipeline(accounts)
results = pipeline.test_all_accounts()
safe_accounts = []
banned_accounts = []
for username, status in results.items():
if status['status'] == '✅ Safe to use':
safe_accounts.append(username)
else:
banned_accounts.append(username)
# Generate report
print(f"Account Status Report - {time.strftime('%Y-%m-%d %H:%M:%S')}")
print(f"Safe Accounts: {len(safe_accounts)}")
print(f"Shadowbanned: {len(banned_accounts)}")
# Return only safe accounts for automation
return safe_accounts
Real-Time Detection During Active Sessions
class LiveShadowbanMonitor:
def __init__(self, driver, username):
self.driver = driver
self.username = username
self.message_history = []
self.last_check = time.time()
def verify_message_sent(self, message_text):
"""
Check if last sent message is visible
"""
time.sleep(1) # Brief wait for message to appear
# Get recent chat messages
messages = self.driver.find_elements(By.CSS_SELECTOR, '[data-a-target="chat-line-message"]')
for msg in messages[-5:]:
if self.username in msg.text and message_text in msg.text:
return True
# If message not found, possible shadowban
return False
def continuous_monitoring(self):
"""
Monitor account health during active session
"""
if time.time() - self.last_check > 300: # Check every 5 minutes
test_result = self.quick_shadowban_test()
if not test_result:
raise Exception("Account potentially shadowbanned during session!")
self.last_check = time.time()
Implementation Tips
Use Rotating Test Channels: Maintain a pool of 10-15 small channels for testing to avoid detection patterns
Timing Considerations:
Wait 2-3 seconds between test messages
Run full detection suite once per day
Quick checks every 5-10 minutes during active sessions
False Positive Handling:
If detection fails, retry with 2-3 different channels
Consider network delays and Twitch server issues
Implement confidence scoring based on multiple test results
Stealth Measures:
Randomize test message formats
Use natural-looking test messages
Vary testing intervals
This system provides reliable shadowban detection that integrates seamlessly with your browser automation setup. The multi-layered approach ensures accurate results while maintaining automation efficiency.