Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/DJSv14 #1227

Closed
wants to merge 614 commits into from
Closed

feature/DJSv14 #1227

wants to merge 614 commits into from

Conversation

BioCla
Copy link
Contributor

@BioCla BioCla commented May 22, 2023

Please describe the changes this PR makes and why it should be merged:
Implements DJSv14.
Contains Major changes, will be going up as a separate version
Read:
#1225
#1223

The code has been almost completely refactored, keeping the same basic structure but reorganizing the Libraries, adding functionality and modularity.
The bot has also been (optionally) containerized, using docker compose contexts, allowing the bot to be developed on any platform.

Tasks:

  • Docker context
  • Logging System
  • DJSv14 Implemented
  • Modular commands system
  • Music Manager switch (Cosmicord, Erela)
  • Updated packages to latest compatible versions
  • Credits
  • DBMS
  • Music commands
  • Music client funnel
  • Dashboard
  • github workflow and templates

v5.1 Beta

Implemented features:

  • Playing tracks from playlists saved on DB
  • DJ Roles
  • dedicated music channels with controller
  • increased compatibility with multiple music engines
  • A working dashboard
    and some more...

v5.2 Beta

  • Figma designs
  • Better queues
  • Command refactoring
  • Fixing bugs and implementing checks
  • And more...

v5.3 Full release

  • Play, modify queue and control players from the dashboard

Future updates:

v6.0:

  • Complete TS rewrite
  • Will use Bun
  • Automatic version updater (keeps the bot up to date with stable releases)
  • CI/CD (if possible)
  • Custom wrapper (maybe)???
  • Better modular docker configuration

if anyone has suggestions reply to this or create a thread/discussion

PR Status

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • Code changes have been tested against the Discord API, or there are no code changes

The update is ready to be merged whenever

@BioCla BioCla marked this pull request as draft May 22, 2023 08:22
@BioCla BioCla changed the title Feature/dj sv14 Feature/djsv14 May 22, 2023
@DarrenOfficial
Copy link
Collaborator

I think we should create a new branch for this, then push to master v5 once completed.

@LewdHuTao
Copy link
Collaborator

So how do you want to add Spotify, Apple Music and Deezer plugins?

I have a few options:

  1. Use LavaSrc (tested in my bot that using shoukaku and kazagumo, i can confirm its pretty good)
  2. Use kazagumo and shoukaku to add spotify and deezer plugins (stone deezer)
  3. Implements own plugins manager which pretty complicated

@Neko-Life
Copy link
Contributor

Good idea. Perfect opportunity for ts rewrite

@BioCla
Copy link
Contributor Author

BioCla commented May 28, 2023

@Neko-Life

Good idea. Perfect opportunity for ts rewrite

unfortunately I had already started with JS.
probably gonna have to ask someone to help with that later on. I've been trying to keep track of all the typings in the meanwhile but I have noticed how much easier it would be if we actually had a TS bot instead. Once this base version is done I'll see to start implementing a proper TS version for the bot

@BioCla
Copy link
Contributor Author

BioCla commented May 30, 2023

Note: this will go up as 5.1

@BioCla
Copy link
Contributor Author

BioCla commented May 31, 2023

Scylla was added in 26a57fb but will be switched out for a PostgreSQL DB with Prisma ORM

@BioCla
Copy link
Contributor Author

BioCla commented Jun 1, 2023

Scylla was added in 26a57fb but will be switched out for a PostgreSQL DB with Prisma ORM

Prisma supports different DB architectures, mostly SQL, but also MongoDB.
Postgresql will be the provided db by default but documentation will be provided for configuration of your own DB

@BioCla BioCla changed the title Feature/djsv14 [v5.1] feature/DJSv14 Jun 3, 2023
@BioCla BioCla marked this pull request as ready for review June 5, 2023 12:22
@C-EO
Copy link

C-EO commented Jun 8, 2023

Will this still be hostable on Replit or shall we have to do on-site hosting?

@BioCla
Copy link
Contributor Author

BioCla commented Jun 8, 2023

Will this still be hostable on Replit or shall we have to do on-site hosting?

I haven't tested it on any deployment ready services and i don't recommend replit anyway.

The bot runs on anything that supports docker or that is docker configurable so you're free to test it however you like. If you're interested in just the bot (without DB and playlist command) then you can extract the djs-bot folder and use that directly, as it is completely modular and separable from the docker compose structure.

@BioCla
Copy link
Contributor Author

BioCla commented Jun 10, 2023

Will this still be hostable on Replit or shall we have to do on-site hosting?

I haven't tested it on any deployment ready services and i don't recommend replit anyway.

The bot runs on anything that supports docker or that is docker configurable so you're free to test it however you like. If you're interested in just the bot (without DB and playlist command) then you can extract the djs-bot folder and use that directly, as it is completely modular and separable from the docker compose structure.

I know this might be a half solution but you could try the method described in this forum post:

https://replit.com/talk/ask/How-to-install-Docker/39255

@C-EO
Copy link

C-EO commented Jun 10, 2023

@BioCla The new Replit uses NixOS. That means that Docker can't be used because they phased it out. Before, Replit used to be a gigantic Docker container with many Docker instances running. Since it now uses Nix, I can't use the Docker option. I do not want the DB functionality, that's why I'm asking whether this new version of the bot supports Replit?

@BioCla
Copy link
Contributor Author

BioCla commented Jun 10, 2023

@BioCla The new Replit uses NixOS. That means that Docker can't be used because they phased it out. Before, Replit used to be a gigantic Docker container with many Docker instances running. Since it now uses Nix, I can't use the Docker option. I do not want the DB functionality, that's why I'm asking whether this new version of the bot supports Replit?

If you're interested in just the bot (without DB and playlist command) then you can extract the djs-bot folder and use that directly, as it is completely modular and separable from the docker compose structure.

yes... If you want to set it up yourself

@BioCla
Copy link
Contributor Author

BioCla commented Jun 16, 2023

v5.1 now has the dashboard as well, matching v5.0.
v5.1 now enters it's official beta period.

Upcoming features:
Playing from playlists saved on DB
DJ Roles
dedicated music channels with controller (maybe)???
and more...

if anyone has suggestions reply to this or create a thread/discussion

@sprucecellodev125
Copy link
Collaborator

@BioCla The new Replit uses NixOS. That means that Docker can't be used because they phased it out. Before, Replit used to be a gigantic Docker container with many Docker instances running. Since it now uses Nix, I can't use the Docker option. I do not want the DB functionality, that's why I'm asking whether this new version of the bot supports Replit?

nonono, It's running Ubuntu (ewww), and yes it have Nix as package manager instead. However if you put pkgs.docker in replit.nix deps, it installs Docker but doesn't make Docker working properly. Since Replit doesn't give you root access, I think you should configure rootless docker (pain)

@BioCla BioCla mentioned this pull request Jun 19, 2023
15 tasks
@ghost
Copy link

ghost commented Jun 20, 2023

Hey mate and maintainers :)

I might be misunderstanding something, but according to this readme, it seems I can't configure my own Lavalink server, only the one preconfigured in the docker-compose.yml example.

It would be awesome, if you could make it a Docker ENV, so you could choose your own, since I have mine hosted behind a reverse proxy, and I would like it to keep it that way, instead of using the "default" docker.lavalink.

@BioCla
Copy link
Contributor Author

BioCla commented Jun 20, 2023

@vp-en

Hey mate and maintainers :)

I might be misunderstanding something, but according to this readme, it seems I can't configure my own Lavalink server, only the one preconfigured in the docker-compose.yml example.

It would be awesome, if you could make it a Docker ENV, so you could choose your own, since I have mine hosted behind a reverse proxy, and I would like it to keep it that way, instead of using the "default" docker.lavalink.

as stated in the main README.md:

If you don't want a particular service to start up on make up you can simply comment the block for the service you want to remove from the docker-compose.yml file

This implies that you can indeed remove the lavalink service if it doesn't suit your needs but you would still need to modify the appropriate node configuration in the config.js file under the djs-bot directory

@ghost
Copy link

ghost commented Jun 20, 2023

Ah cool, so there'll still be a config.js file with the option(s), then it's all good. Thanks mate <3

@C-EO
Copy link

C-EO commented Jun 20, 2023

@BioCla One of the reasons I liked v5 is because it had buttons. It would be pointless to create a v5.1 without buttons

The player needs the buttons for they simplified the work in addition to the pause, play, stop, and volume commands

@BioCla
Copy link
Contributor Author

BioCla commented Jun 20, 2023

@C-EO

@BioCla One of the reasons I liked v5 is because it had buttons. It would be pointless to create a v5.1 without buttons

The player needs the buttons for they simplified the work in addition to the pause, play, stop, and volume commands

I'll take that as a suggestion. I was already planning on reimplementing them under a different dress:
Instead of having it be on the player message itself it would be in a dedicated channel (kinda like hydra).

I'll try to reimplement it as you suggested as well

@C-EO
Copy link

C-EO commented Jun 22, 2023

@BioCla I know right now I might sound like pushing too much, but the lyrics command doesn't return the lyrics for a song that is longer 4096 chars.

Ideally it should return them but say "Truncated...."

@BioCla
Copy link
Contributor Author

BioCla commented Jun 22, 2023

@C-EO

@BioCla I know right now I might sound like pushing too much, but the lyrics command doesn't return the lyrics for a song that is longer 4096 chars.

Ideally it should return them but say "Truncated...."

Thanks for letting me know, I'll fix it as soon as possible. It used to already be as you said but it seems it got reimplemented somewhere along the restructuring of the command

@C-EO
Copy link

C-EO commented Jun 22, 2023

Thanks

BioCla and others added 11 commits October 26, 2023 06:57
…ard (#151)

chore(deps-dev): bump @types/react from 18.2.31 to 18.2.32 in /dashboard
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.8 to 20.8.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…#152)

chore(deps-dev): bump @types/node from 20.8.8 to 20.8.9 in /dashboard
# Draft

## Please describe the changes this PR makes and why it should be
merged:

## Status and versioning classification:

<!--
Please move lines that apply to you out of the comment:
- Code changes have been tested against the Discord API, or there are no
code changes
- I know how to update typings and have done so, or typings don't need
updating
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed,
parameters moved or removed)
- This PR **only** includes non-code changes, like changes to
documentation, README, etc.
-->
@BioCla BioCla marked this pull request as ready for review October 26, 2023 10:08
dependabot bot and others added 15 commits October 27, 2023 03:36
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.32 to 18.2.33.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ard (#154)

Bumps
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)
from 18.2.32 to 18.2.33.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/react&package-manager=npm_and_yarn&previous-version=18.2.32&new-version=18.2.33)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
## Please describe the changes this PR makes and why it should be
merged:
If a user tries to add a playlist with the ``/play`` and ``/playlists
play`` command, the addTrack function will only receive one
argument(tracks).
The addTrack function takes a player and a tracklist, and adds the
tracks to the player.

## Status and versioning classification:

<!--
Please move lines that apply to you out of the comment:
- Code changes have been tested against the Discord API, or there are no
code changes
- I know how to update typings and have done so, or typings don't need
updating
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed,
parameters moved or removed)
- This PR **only** includes non-code changes, like changes to
documentation, README, etc.
-->
## Please describe the changes this PR makes and why it should be
merged:

## Status and versioning classification:
- Code changes have been tested against the Discord API, or there are no
code changes
- I know how to update typings and have done so, or typings don't need
updating
## Please describe the changes this PR makes and why it should be
merged:

## Status and versioning classification:
- Code changes have been tested against the Discord API, or there are no
code changes
- I know how to update typings and have done so, or typings don't need
updating
@BioCla
Copy link
Contributor Author

BioCla commented Oct 29, 2023

New version available at: https://github.com/wtfnotavailable/Discord-MusicBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.