···2323| `MIN_PHRASE_WORDS` | `4` | minimum words in phrase to match |
2424| `POSTING_ENABLED` | `false` | must be `true` to actually post |
2525| `COOLDOWN_MINUTES` | `120` | don't repost same bufo within this time |
2626+| `EXCLUDE_PATTERNS` | `sad,crying,...` | exclude bufos matching these patterns |
2627| `JETSTREAM_ENDPOINT` | `jetstream2.us-east.bsky.network` | jetstream server |
27282829## local dev
+3
bot/src/bufo_bot/config.py
···1515 # cooldown: don't repost same bufo within this many minutes
1616 cooldown_minutes: int = 120
17171818+ # exclude bufos matching these patterns (comma-separated regex)
1919+ exclude_patterns: str = "what-have-you-done,what-have-i-done,sad,crying,cant-take"
2020+1821 model_config = {"env_file": ".env", "extra": "ignore"}
19222023
+7-2
bot/src/bufo_bot/main.py
···57575858def load_bufos() -> list[Bufo]:
5959 """fetch the list of bufos from the find-bufo API"""
6060- api_url = "https://find-bufo.com/api/search?query=bufo&top_k=2000&alpha=0"
6060+ params = {
6161+ "query": "bufo",
6262+ "top_k": 2000,
6363+ "alpha": 0,
6464+ "exclude": settings.exclude_patterns,
6565+ }
61666267 try:
6363- resp = httpx.get(api_url, timeout=30)
6868+ resp = httpx.get("https://find-bufo.com/api/search", params=params, timeout=30)
6469 resp.raise_for_status()
6570 data = resp.json()
6671 bufos = [