mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-28 13:24:09 +00:00
Update README and sports_command.py to enhance command descriptions and team ID stability. Expanded command help text for clarity, added new commands, and updated ESPN team IDs for accuracy. Included notes on verifying team IDs to prevent "no games found" errors.
This commit is contained in:
@@ -139,18 +139,21 @@ python meshcore_bot.py
|
||||
The bot responds to these commands:
|
||||
|
||||
**Basic Commands:**
|
||||
- `test` - Test message response
|
||||
- `test` or `t` - Test message response (can include optional phrase: `test <phrase>`)
|
||||
- `ping` - Ping/pong response
|
||||
- `help` - Show available commands
|
||||
- `hello` - Greeting response
|
||||
- `cmd` - List available commands
|
||||
- `help` - Show available commands (use `help <command>` for command details)
|
||||
- `hello` - Greeting response (also responds to: hi, hey, howdy, greetings, etc.)
|
||||
- `cmd` - List available commands in compact format
|
||||
|
||||
**Information Commands:**
|
||||
- `wx <location>` - Weather information
|
||||
- `aqi <location>` - Air quality index
|
||||
- `channels` - List hashtag channels (use `channels` for general, `channels list` for all categories, `channels <category>` for specific categories, `channels #channel` for specific channel info)
|
||||
- `wx <zipcode>` - Weather information for US zip code (also: `weather`, `wxa`, `wxalert`)
|
||||
- `gwx <location>` - Global weather for any location worldwide (also: `globalweather`, `gwxa`)
|
||||
- `aqi <location>` - Air quality index (usage: `aqi seattle`, `aqi greenwood`, `aqi vancouver canada`, `aqi 47.6,-122.3`, or `aqi help`)
|
||||
- `sun` - Sunrise/sunset times
|
||||
- `moon` - Moon phase and times
|
||||
- `solar` - Solar conditions
|
||||
- `solar` - Solar conditions and HF band status
|
||||
- `solarforecast` or `sf` - Solar panel production forecast (usage: `sf <location|repeater_name|coordinates|zipcode> [panel_size] [azimuth, 0=south] [angle]`)
|
||||
- `hfcond` - HF band conditions
|
||||
- `satpass <NORAD>` - Satellite pass information (default: radio passes, all passes above horizon)
|
||||
- `satpass <NORAD> visual` - Visual passes only (must be visually observable)
|
||||
@@ -161,21 +164,40 @@ The bot responds to these commands:
|
||||
- `roll` - Roll random number (1-100 by default, or specify like `roll 50`)
|
||||
|
||||
**Entertainment Commands:**
|
||||
- `joke` - Get a random joke
|
||||
- `joke` - Get a random joke (use `joke [category]` for specific category)
|
||||
- `dadjoke` - Get a dad joke from icanhazdadjoke.com
|
||||
- `hacker` - Responds to Linux commands (`sudo`, `ps aux`, `grep`, `ls -l`, etc.) with supervillain mainframe errors
|
||||
|
||||
**Sports Commands:**
|
||||
- `sports` - Get scores for default teams
|
||||
- `sports <team>` - Get scores for specific team
|
||||
- `sports <league>` - Get scores for league (nfl, mlb, nba, etc.)
|
||||
|
||||
**MeshCore Network Commands:**
|
||||
- `channels` - List hashtag channels
|
||||
- `path` - Decode message routing path
|
||||
- `prefix <XX>` - Look up repeaters by prefix
|
||||
- `repeater` - Manage repeater contacts and scan for new ones (DM only)
|
||||
- `stats` - Show bot usage statistics
|
||||
- `advert` - Send network advert (DM only)
|
||||
**MeshCore Utility Commands:**
|
||||
- `path` or `decode` or `route` - Decode message routing path
|
||||
- `prefix <XX>` - Look up repeaters by two-character prefix (e.g., `prefix 1A`)
|
||||
- `prefix refresh` - Refresh prefix cache
|
||||
- `prefix free` or `prefix available` - Show available prefixes
|
||||
- `prefix <XX> all` - Include all repeaters (not just active)
|
||||
- `stats` - Show bot usage statistics for past 24 hours
|
||||
- `stats messages` - Message statistics
|
||||
- `stats channels` - Channel statistics
|
||||
- `stats paths` - Path statistics
|
||||
- `multitest` or `mt` - Listens for 6 seconds and collects all unique paths from incoming messages
|
||||
|
||||
**Management Commands (DM only):**
|
||||
- `repeater` or `repeaters` or `rp` - Manage repeater contacts (DM only, requires ACL permissions)
|
||||
- `repeater scan` - Scan and catalog new repeaters
|
||||
- `repeater list` - List repeater contacts (use `--all` to show purged ones)
|
||||
- `repeater purge <days>` - Purge repeaters older than specified days
|
||||
- `repeater purge <name>` - Purge specific repeater by name
|
||||
- `repeater purge all` - Purge all repeaters
|
||||
- `repeater restore <name>` - Restore a previously purged repeater
|
||||
- `repeater stats` - Show repeater management statistics
|
||||
- `repeater status` - Show contact list status and limits
|
||||
- `repeater manage` - Auto-manage contact list (use `--dry-run` to preview)
|
||||
- See `help repeater` for full list of subcommands
|
||||
- `advert` - Send network flood advert (DM only, 1hr cooldown)
|
||||
|
||||
## Message Response Templates
|
||||
|
||||
@@ -192,7 +214,7 @@ Example:
|
||||
[Keywords]
|
||||
test = "Message received from {sender} | {connection_info}"
|
||||
ping = "Pong!"
|
||||
help = "Bot Help: test, ping, help, hello, cmd, wx, aqi, sun, moon, solar, hfcond, satpass, dice, roll, joke, dadjoke, sports, channels, path, prefix, repeater, stats"
|
||||
help = "Bot Help: test, ping, help, hello, cmd, wx, gwx, aqi, sun, moon, solar, solarforecast, hfcond, satpass, dice, roll, joke, dadjoke, sports, channels, path, prefix, repeater, stats, multitest, webviewer"
|
||||
```
|
||||
|
||||
## Hardware Setup
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
Sports command for the MeshCore Bot
|
||||
Provides sports scores and schedules using ESPN API
|
||||
API description via https://github.com/zuplo/espn-openapi/
|
||||
|
||||
Team ID Stability:
|
||||
ESPN team IDs are generally stable but can change in certain circumstances:
|
||||
- Team relocation or renaming
|
||||
- Expansion teams (new teams added to leagues)
|
||||
- ESPN data system updates
|
||||
|
||||
If a team returns "No games found", verify the team_id using:
|
||||
python3 test_scripts/find_espn_team_id.py <sport> <league> <team_name>
|
||||
|
||||
Team IDs should be periodically verified, especially after:
|
||||
- League expansion announcements
|
||||
- Team relocations or rebranding
|
||||
- When users report "no games found" for known active teams
|
||||
"""
|
||||
|
||||
import re
|
||||
@@ -71,6 +85,8 @@ class SportsCommand(BaseCommand):
|
||||
}
|
||||
|
||||
# Team mappings for common searches
|
||||
# NOTE: Team IDs can change over time (see module docstring).
|
||||
# Use test_scripts/find_espn_team_id.py to verify/update team IDs.
|
||||
TEAM_MAPPINGS = {
|
||||
# NFL Teams
|
||||
'seahawks': {'sport': 'football', 'league': 'nfl', 'team_id': '26'},
|
||||
@@ -294,8 +310,8 @@ class SportsCommand(BaseCommand):
|
||||
'washington mystics': {'sport': 'basketball', 'league': 'wnba', 'team_id': '16'},
|
||||
|
||||
# NHL Teams (limited data available from API)
|
||||
'kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '58'},
|
||||
'seattle kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '58'},
|
||||
'kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '124292'},
|
||||
'seattle kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '124292'},
|
||||
'blues': {'sport': 'hockey', 'league': 'nhl', 'team_id': '19'},
|
||||
'stars': {'sport': 'hockey', 'league': 'nhl', 'team_id': '9'},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user