Skip to content

evgfilim1/randmuzposter

Repository files navigation

randmuzposter

black code style

Lint code Build and push Docker image Deploy a Docker container

A simple bot to help with posting music to my channel.

Dependencies

  • Python 3.10
  • aiogram 3.0.0b5
  • httpx

Setup

Copy .env.example to .env and edit the latter. Then follow the instructions below depending on your setup.

Docker

Note: This requires Docker Engine and Docker Compose to be installed.

docker compose build

Manual

  1. (Optional) Create and activate venv
    python3.10 -m venv .venv && source .venv/bin/activate
  2. Install requirements
    pip install -r requirements.txt

Run

Docker

docker compose up -d

Manual

  1. Source venv if you created one
    source .venv/bin/activate
  2. Export environment variables (it's safe, trust me)
    eval "$(sed '/^#/d;s/^/export /' <.env)"
  3. Run the bot
    python -m randmuzposter

Usage

Send a music file with any supported link attached to it in caption (e.g. with @nowplaybot or @LyBot). The bot will parse it and make a request to song.link API to get links to more streaming services. Then you can edit some links if they're not accurate, e.g. to use audio-only for YT Music, or even replace an audio, and post it to your channel.