espimarisa / hibiki

⚓ A Discord bot focused on accessible and informational utilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[REQ] Music Commands

cthpw103 opened this issue · comments

Perhaps implementing the old music commands would be something to explore? Use the Discogs & MusicBrainz API?

We've considered it & I'll look into it more in the future, depending on how well their APIs are.

Perhaps using more APIs (Bandcamp, Soundcloud, YouTube etc...) could be useful. Not sure how good the YouTube API is at giving Music metadata although

I don't think the YouTube API returns song info by default (maybe they do on their auto-genned things like these but I'll have to check. Other APIs would be useful to have for metadata + playback aswell.

https://developers.google.com/youtube/v3/docs/videos#resource

Doesn't seem to have much information relating to songs.

maybe we could tell if it's an official upload via contentDetails.licensedContent, doubt it'll be of use

Figured it didn't; that's where the other APIs like MusicBrainz or Discogs could come into play.. maybe also for album covers etc. I'll look thru what the API actually returns soon though

How may we tell the song title and artist name without doing some stuff to the video title?

We could figure something hacky out if there's not a proper way to do it

¯\_(ツ)_/¯

rovi has a good api

I don't think the YouTube API returns song info by default (maybe they do on their auto-genned things like these but I'll have to check. Other APIs would be useful to have for metadata + playback aswell.

Assuming that you want to simply retrieve song metadata, the Spotify API could be of interest.
From glancing at the docs, you're able to retrieve track info with a GET request to https://api.spotify.com/v1/tracks/:trackID, where trackID is one of these.

Getting an ID seems to be the only issue though, unless you actually receive one (which is pretty easy with Discord); Spotify URLs — well, those that are embedded by Discord — include the track ID. There's likely another endpoint for searching.

Spotify support would be something of interest. However, extracting song name & artist from a Youtube video would be good.

Yeah. I should probably try emailing someone about it if it isn't actually implemented.

Spotify does actually have a search function (linked to a Go library since the JS implementation is, uh, a mess): https://github.com/zmb3/spotify/blob/master/search.go.

JS implementation: https://github.com/JMPerez/spotify-web-api-js

Could be a possibility 🤔

I've been looking into it a lot recently - possibly expect some stuff on the dev branch soon?

Someone I was working with just created something to interface with Spotify's API; they didn't actually need to get explicit access to it either. The only issue seems to be getting track IDs, so possibly a command to fetch extra metadata could be considered?

hmn, possibly

Just one part of it lol
image

could be useful

After taking a bit of a break from the project and coming back to it, I believe I've found a pretty sweet way to implement all of this. Give me some time... 🤔

As of right now, I'm heavily focused on improving / refactoring the current code. However, I'll push music commands as a priority for one of our next feature releases. We could probably utilise lavalink for the best performance (doing it the old fashioned way with ytdl is slow, spammy, and ugly), but I haven't looked too much into that as I've been focused on refactors & bugs.

It also doesn't help that I'm pretty much the sole contributor to the project right now. Hibiki has and always will be a passion project, so when motivation goes away, it gets tricky to work on something like this.

daijoubu (´⌣`ʃƪ) I hope the best, maybe later that feature will be available.

This issue seems to be inactive, and will automatically be closed in 7 days.

shutup bot

This issue seems to be inactive, and will automatically be closed in 7 days.

Shutup

Possibly in the next feature update after v3.2.0?

no

Moved this to a new issue, #17