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
🎯 Twitch Shadowban Detection for Bot Developers
🔍 Primary Detection Method: Self-Message Visibility Test
Core Concept
The most reliable way to detect shadowbans is testing if your messages appear in actual chat. Here's a bulletproof approach:
Implementation Strategy
python
def detect_shadowban(driver, test_account, verify_account):
"""
Test shadowban by sending message and verifying visibility
Args:
driver: Selenium WebDriver for test account
test_account: Account being tested for shadowban
verify_account: Clean account to verify message visibility
"""
# 1. Generate unique test message
test_id = f"test_{int(time.time())}_{random.randint(1000,9999)}"
test_message = f"🎮 {test_id}"
# 2. Find suitable test channel
test_channels = [
"https://twitch.tv/[small_streamer]", # Low traffic channels
"https://twitch.tv/[your_test_channel]", # Your own channel
]
# 3. Send test message
send_chat_message(driver, test_message)
time.sleep(2) # Wait for message to process
# 4. Check visibility (multiple methods)
return verify_message_visibility(test_message, verify_account)
🛠️ Detection Methods Ranked by Reliability
1. Dual-Account Verification (Most Reliable)
Use test account to send message
Use clean "observer" account to check if message appears
Works even in follower-only chats if both accounts follow
2. DOM Inspection Method
python
def check_own_message_in_dom(driver, message_text):
"""Check if your message appears in chat DOM"""
try:
# Wait for message to appear
WebDriverWait(driver, 5).until(
EC.presence_of_element_located((
By.XPATH,
f"//span[contains(@class, 'text-fragment') and contains(text(), '{message_text}')]"
))
)
# Additional check: Verify it's YOUR message
message_element = driver.find_element(By.XPATH,
f"//div[contains(@class, 'chat-line__message')]//span[contains(text(), '{message_text}')]"
)
# Check if message has your username
username_element = message_element.find_element(By.XPATH,
".//ancestor::div[contains(@class, 'chat-line__message')]//span[contains(@class, 'chat-author__display-name')]"
)
return True
except:
return False # Message not found = likely shadowbanned
3. Network Response Analysis
Monitor network responses when sending messages:
python
# Enable Chrome DevTools Protocol
options.add_experimental_option('excludeSwitches', ['enable-logging'])
options.set_capability('goog:loggingPrefs', {'performance': 'ALL'})
# After sending message, check responses
logs = driver.get_log('performance')
for log in logs:
message = json.loads(log['message'])
if 'Network.responseReceived' in message['message']['method']:
response = message['message']['params']['response']
# Look for error codes or specific responses indicating shadowban
🎪 Channel Selection Strategy
Best Test Channels:
Your Own Channel - Full control, no restrictions
Small Active Streams (10-50 viewers) - Less chat spam
Bot-Friendly Channels - Some streamers allow bot testing
Handling Follower-Only Mode:
python
def handle_follower_only(driver, channel_url):
"""Pre-follow channels to bypass restrictions"""
follow_button = driver.find_element(By.CSS_SELECTOR,
"button[data-a-target='follow-button']"
)
if "Follow" in follow_button.text:
follow_button.click()
time.sleep(1) # Wait for follow to register
🔧 Complete Detection Pipeline
python
class TwitchShadowbanDetector:
def __init__(self, accounts):
self.accounts = accounts
self.test_channel = "YOUR_TEST_CHANNEL"
def test_account(self, account):
"""Complete shadowban test for single account"""
# 1. Login with test account
driver = self.create_driver(account)
# 2. Navigate to test channel
driver.get(f"https://twitch.tv/{self.test_channel}")
time.sleep(3)
# 3. Send unique test message
test_msg = f"test_{uuid.uuid4().hex[:8]}"
self.send_message(driver, test_msg)
# 4. Multi-method verification
results = {
'dom_check': self.check_dom(driver, test_msg),
'api_check': self.check_via_api(test_msg),
'observer_check': self.check_with_observer(test_msg)
}
# 5. Determine status
if all(results.values()):
return "✅ Account is clean"
elif not any(results.values()):
return "❌ Account is shadowbanned"
else:
return "⚠️ Partial restriction detected"
📊 Third-Party Verification Tools
1. TwitchTracker.com
Check if your messages appear in VODs
Compare chat activity stats
2. Twitch Inspector (Chrome Extension)
Real-time chat monitoring
Message delivery confirmation
3. Custom Webhook Monitor
python
# Set up webhook to monitor chat via EventSub
# Useful for automated verification without second account
This approach gives you automated, reliable shadowban detection that integrates directly with your Selenium automation. The key is using multiple verification methods and having a clean observer account to confirm message visibility.