Skip to content
/ sunobot Public

Discord music bot specialized for SUNO platform integration. Play SUNO tracks, manage queues, search profiles, and save music locally. Docker-ready deployment.

Notifications You must be signed in to change notification settings

Pekno/sunobot

Repository files navigation

Logo SUNO Discord Bot

GitHub Tag Docker pulls

Description

Caution

As SUNO made changes to it's login system, a captcha is now mandatory, so song/lyrics generation feature was removed.

SUNO Discord Bot is a versatile music bot designed to play SUNO music directly in your Discord server. Simply provide a SUNO URL, and the bot will play the music for you. The bot also allows you to manage the music queue with commands to add, remove, skip, pause, resume, and stop music. Additionally, you can search and save local SUNO music. It can also generate lyrics and song if you provide a OPENAI_API_KEY

Features

An Embed Player to contol the playlist.

Player Embed

A Profile Search to get all the music made by a specific profile.

Profile Embed

Commands

Command Description Options
profile Search a SUNO profile by handle - suno_profile: (Required) Searched profile, with autocomplete based on local profiles already saved. UNUSED IF SHOULD_SAVE_LOCALY IS FALSE
play Play a SUNO music - suno_url: (Required) a SUNO URL
skip Skip a sound None
pause Pause sound None
resume Resume sound None
stop Stop sound None
generate Not registered if no OPENAI_API_KEY Generate Lyrics based on your prompt, once reviewed will generate the song and queue it - suno_prompt: (Required) A song prompt

Setup

To configure the SUNO Discord Bot, you need to set the following environment variables:

  • Required:

  • Optional:

    • OPENAI_API_KEY: API key from Open AI, required if you want the bot to generate lyrics and songs.
    • OPENAI_PROMPT: Prompt to generate the lyrics, use ${lang} as a variable to add the selected language from OPENAI_API_KEY.
    • SHOULD_SAVE_LOCALY: Defines if SUNO musics should be saved localy or only remain on the web.
    • SAVED_DATA_PATH: Defines the path where all suno data will be stored on the server. Default is ./suno. UNUSED IF SHOULD_SAVE_LOCALY IS False
    • LOG_LEVEL: Defines the logging level of the Bot. Default is warning.

A Docker image is also available via Docker Hub.

With these configurations, you can start your SUNO Discord Bot and enjoy seamless music playback in your Discord server.

Thanks

Thanks to the contributors of the Suno-API Project, most of the Backend API was based on their work.

Ideas / To do

  • [ ] Add the ability to generate song without OpenAI
  • Add the ability to play whole playlist
  • [ ] Add check for OpenAi credit before trying generation
  • Fix case when player message was deleted
  • Optimize Suno API calls

About

Discord music bot specialized for SUNO platform integration. Play SUNO tracks, manage queues, search profiles, and save music locally. Docker-ready deployment.

Resources

Stars

Watchers

Forks

Packages

No packages published