mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-05-06 13:32:15 +02:00
Update radio.py
This commit is contained in:
@@ -191,9 +191,11 @@ async def voxMonitor():
|
||||
else:
|
||||
traps = voxTrapList
|
||||
if any(trap.lower() in text.lower() for trap in traps):
|
||||
#remove the trap words from the text
|
||||
for trap in traps:
|
||||
text = text.replace(trap, '')
|
||||
idx = text.lower().find(trap.lower())
|
||||
if idx != -1:
|
||||
# Remove everything before and including the trap word
|
||||
text = text[idx + len(trap):]
|
||||
text = text.strip()
|
||||
if text:
|
||||
logger.debug(f"RadioMon: VOX 🎙️Trapped {voxTrapList} in: {text}")
|
||||
|
||||
Reference in New Issue
Block a user