How shdwofm/music-bot works
This Telegram bot accepts a streaming-service track URL, queries Odesli for cross-platform matches, excludes the source platform, and replies with formatted links. The main flow is split between Telegram handling in bot.py and conversion logic in link_converter.py; the latter detects the source, performs the API request, and selects available results. README-documented platform coverage is represented by the converter’s supported-platform stage. The shown source establishes these calls; Telegram transport behavior is represented by its polling and message handlers.
Main entry points: link_converter.py Link converter · bot.py Message handlers
Components 8
Telegram interaction
- Message handlers
bot.py - Reply formatting
bot.py
Link conversion
- Link converter
link_converter.py - Source detection
link_converter.py - Platform selection
link_converter.py
External services
- Telegram API
- Odesli API
Other components
- Telegram user
Connections 9
- Telegram user → Message handlers: sends URL
bot.py - Message handlers → Link converter: requests links
bot.py - Link converter → Source detection: detects source
link_converter.py - Link converter → Odesli API: requests matches
link_converter.py - Link converter → Platform selection: filters results
link_converter.py - Link converter → Message handlers: returns links
bot.py - Message handlers → Reply formatting: formats links
bot.py - Message handlers → Telegram API: polls and replies
bot.py - Reply formatting → Telegram user: sends results
bot.py