Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

fdnt7/Lyra

Repository files navigation

Λύρα

Lyra

Python 3.10 Black License

A featureful Discord music bot, made with hikari, hikari-tanjun and lavasnek_rs on Python 3.10.5.

⚠️ Repo Archival

  • This reposity is no longer maintained. A rewrite will be developed on this repo

Inviting the bot to your own servers

  • ⚠️ The bot is no longer hosted.
  • You can DM me on Discord (Fridella#0777) or ask in Lýra's support server for more information

Supporting the bot

  • Please consider supporting the bot by pressing the ❤️ Sponsor button at the top!

Running your own instance of Lýra

Prerequisites

  • Set up a MongoDB Atlas Database

  • Create & fill these files with the necessary info:

    • .env

      GENIUS_ACCESS_TOKEN="..."
      LYRA_DEV_TOKEN="..." # unused if dev_mode is false
      LYRA_TOKEN="..."
      
      LAVALINK_HOST="lavalink"
      LAVALINK_PWD="..."
      LAVALINK_PORT="..."
      
      MONGODB_PWD="..."
      MONGODB_CONN_STR="..." # replace the pwd in the str with %s
      
      SOUNDCLOUD_CLIENT_ID="..."
    • config.yml

      dev_mode: false # true/false
      prefixes:
      - '...'
      emoji_guild: 777069316247126036 # do not change this
      guilds: # unused if dev_mode is false
      - ...
  • Obtain these files

    • headers_auth.json (Instructions here)

? You can get the Soundcloud Client ID from here

? Feel free to change internal constant and configs in lyra/src/lib/consts.py and add your own EQ bands in bands.yml

Building & Running the bot via docker

  • Run sudo docker-compose up

    ^ You can also add the -d flag to run the containers in detached mode

Running the bot without docker

  • In the lavalink-local folder

    Options for Windows and Linux are superscripted with win and nix respectively

    • Extract (or symlink) the jdk-13.0.2win | nix folder

    • Get the latest build of Lavalink.jar

      Your lavalink-local folder should look like this

      lavalink-local
      ├──jdk-13.0.2 -- maybe symlink
        └──...
      ├──application.yml.dev -- lavalink config, feel free to edit
      └──Lavalink.jar
  • Run (cd lyra && pip install -Ur requirements.txt)

    ^ If that doesn't work, try pip3 instead

    ^ If you prefer having a venv, run (cd lyra && python -m venv .venv && . lyra/.venv/bin/Activate.ps1 && pip install -Ur requirements.txt)ʷᶦⁿ | (cd lyra && python -m venv .venv && . lyra/.venv/bin/activate && pip install -Ur requirements.txt)ⁿᶦˣ

  • Run scripts/server.batwin | scripts/servernix and wait for Lavalink to finish starting up

  • Run scripts/bot.batwin | scripts/botnix to start the bot up

    ^ To run the bot in debug mode, run scripts/bot-debug.batʷᶦⁿ | scripts/bot-debugⁿᶦˣ

Development

  • Run pip install -r dev_requirements.txt
  • Run scripts/tggldev [OPTIONS]... to toggle between dev modes

Options

  • --dev, -d: The dev mode. Possible values are t | T for On and f | F for Off. If this option was not given, the mode will be toggled from the previous state.