GithubHelp home page GithubHelp logo

dysta / jukebot Goto Github PK

View Code? Open in Web Editor NEW
33.0 1.0 4.0 53.05 MB

Discord music bot written in Python 3

Home Page: https://dysta.github.io/JukeBotLab/

License: GNU General Public License v3.0

Python 99.51% Dockerfile 0.49%
bot discord python rythm music youtube-dl yt-dlp discordpy discord-bot disnake

jukebot's Introduction

juke-banner

JukeBot

Powered by Disnake Powered by Poetry
Discord music bot written in Python 3


๐Ÿงฉ Installation

git clone https://github.com/Dysta/JukeBot 
cd JukeBot
poetry install

โš™ Configuration

Rename .env.example to .env and fill in the values.

๐Ÿš€ Launch

Run poetry run task start.

โ‰ Other

The bot needs ffmpeg to work.

Install on Windows

Use the package manager Chocolatey and run in an admin shell choco install ffmpeg.

Install on Linux

Use apt, run sudo apt install ffmpeg.

Install on MacOS

Use brew, run brew install ffmpeg.


๐ŸŒ Deployment

Clone the repos.
Rename .env.example to .env and fill in the values.
Run docker-compose up -d.

OR

C/C the file .env.example in local, fill in the values.
Run docker run --env-file <YOUR_LOCAL_ENV_FILE> dysta/jukebot.


๐Ÿ”ฎ Devcontainer

Clone the project then open it in vscode. If you have the devcontainer extension, it will ask you to reopen the project in a devcontainer. If not, open the commands prompt then search for reopen in container.
All the needs will be automatically installed.


๐Ÿ—จ Features & Commands


Music

  • join
  • play
  • playtop
  • playskip
  • search
  • nowplaying
  • grab
  • seek
  • loop
  • pause
  • resume
  • lyrics
  • disconnect
  • share

Queue

  • queue
  • loopqueue
  • move
  • skipto
  • shuffle
  • remove
  • clear
  • removedupes

Utility

  • prefix
  • reset

Effect

  • speed
  • bass
  • nightcore
  • slowed

Others

  • info
  • invite
  • donate
  • watch
  • help

๐Ÿค Contributing

Contributions are what make the open source community an amazing place to learn, be inspired, and create. Any contributions you make are greatly appreciated.

  1. Fork the repository
  2. Clone your fork git clone https://github.com/Dysta/JukeBot.git
  3. Create your feature branch git checkout -b AmazingFeature
  4. Stage changes git add .
  5. Commit your changes git commit -m 'Added some AmazingFeature'
  6. Push to the branch git push origin AmazingFeature
  7. Submit a pull request

โค๏ธ Credits

Released with โค๏ธ by Dysta.

jukebot's People

Contributors

dependabot[bot] avatar dysta avatar theonlywayup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jukebot's Issues

๐ŸŸฅ โ€” Ratelimite when spamming leave/join voice channel as a user

Description

It's possible to rate limit the bot by spamming the leave and join action as a user because of the message sent to inform that the player is paused or resumed.

Expected result

Not being rate limited

Actual result

Rate limited

Reproduction Steps

Play something in the player, leave and join the same voice channel as the bot. The amounts of message sent by the bot trigger the gateway rate limit

Other (screen)

Custom Radio

Description

Offering to the user the ability to create custom playlist for their server.

DoD

  • Allow user to create radios
  • Save user's radios to database
  • Allow user to delete radios
  • List of radio show custom radios

Other

i18n

Description

Add possibility to translate message send by the bot using the i18n standard.

DoD

  • Create i18n folder
  • Add English translation
  • Add French translation
  • Convert all message to use the i18n system
  • Save language preference for each guild

Other

Ask Washi to review the translate quality

๐ŸŸฉ Taskipy

Description

Add package Taskipy to JukeBot to create task easily

DoD

  • Add Taskipy as dev dependencie in Poetry
  • Create task to format code using Black
  • Create task to clean dead import using Autoflake
  • Create task to run the bot

Other

๐ŸŸฅ IDLE

Description

JukeBot disconnect because of the idle task is not properly cancel, even if music is currently playing.

Reproducer

Summon the bot to a voice channel then use leave command. The task created during leave command is never canceled.

Other

๐ŸŸฅ โ€” Stop command behavior

Description

When user stop the player but the queue isn't empty, he don't have any way to resume the queue.

Expected result

User resume the queue.

Actual result

Nothing

Reproduction Steps

Use play command to play something with the bot, use play command again to add something in the queue then use stop command.
To resume the player, the user must use play command that dequeue the 1st song and add the its request to the queue.

Other (screen)

โ‡๏ธ Radio

Description

Offering to the user the ability to play pre configured playlists with many different style.

DoD

  • Add bunch of radios like :
    • Lofi
    • Hip Hop
    • Minecraft
    • Metal
    • Jazz
    • Lounge Coffee
    • Video Game
    • Others..
  • Show a list of all available radios

Other

๐ŸŸฅ โ€” Game import manquant

Description

image

il faut rajouter from discord import Game (du moins je l'ai rรฉsolu comme รงa)

Expected result

musique

Actual result

pas de musique

Reproduction Steps

pegi 18

Other (screen)

๐ŸŸฉ โ€” Docker

Description

Add Docker to the bot

DoD

  • Docker file
  • docker-compose
  • Edit the code to fit the need of docker

Other

๐ŸŸฅ โ€” High CPU usage

Description

From time to time, the bot consumes huge amounts of CPU by looping FFMPEG processes that only last for a few seconds.

Expected result

The bot does not create a looping process.

Actual result

High CPU consumption and loop creation of ffmpeg processes

Reproduction Steps

Put a link to play then enable loop. At a moment, the stream_url will be invalided by website that cause a insane ffmpeg creation loop and cause a high CPU usage.

Other (screen)

image
image
image
image

๐ŸŸจ โ€” Refactor Query and ShazamQuery component

Description

The two *Query components are starting to be difficult to maintain and improve. The lack of testing makes it hard to check if an update doesn't break all the old features. Moreover, it is complicated to add pre/post processing because of the bad design of the component.

Expected result

A Query base class allowing you to do pre or post processing simply. Tests.

Actual result

Nothing good for the long term

Reproduction Steps

Other (screen)

TTS

Description

TTS command allow user to play a tts message in the bot

DoD

  • Add gTTS dependency
  • Update dependency
  • Add TTS command
  • Integrate TTS to queue
  • When a TTS is finish, continue to read the queue
  • Delete TTS mp3 file generated

Other

๐ŸŸฉ โ€” Queue loop

Description

Add the possibility to loop the queue

DoD

  • Add QUEUE type to Loop enum
  • Create queue loop command

Other

๐ŸŸฅ Double disconnect

Description

The bot double disconnect when leave command is called. Probably a task that is not properly canceled.

Reproducer

Play something on the bot, call leave command and wait the timeout time. A second message telling the bot is disconnected should appear

Other

bug

๐ŸŸฅ โ€” Strange behavior with queue loop

Description

When we put a playlist and we activate the queue repeat, if we make a clear, the bot stops playing at the end of the music.
When we add new music, it replays the old music even if we skip to get the new one

Expected result

Playing the new music or can't clear queue if loop queue is enable

Actual result

Unconfirmed strange beahavior

Reproduction Steps

  • Play a song
  • Add a second song to the queue
  • Enable queue loop
  • Clear the queue
  • Skip the current song

Other (screen)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.