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 REQUEST ] A Endpoint/Route to auto resolve all links (youtube, soundcloud, bandcamp) #14

Open
renanrcp opened this issue Oct 13, 2019 · 5 comments
Labels
💭 Discussion For discussing things 💡 Suggestion Suggesting new features.

Comments

@renanrcp
Copy link

With this the user can just send a link like this: https://www.youtube.com/watch?v=CY8E6N5Nzec and Concept identify it a YouTube link and handle that, good for a play command where the bot's user will send a url to the bot.

@renanrcp renanrcp changed the title [ Feature Request ] A Endpoint/Route to auto resolve all links (youtube, soundcloud, bandcamp) [ FEATURE REQUEST ] A Endpoint/Route to auto resolve all links (youtube, soundcloud, bandcamp) Oct 13, 2019
@Yucked Yucked added 💡 Suggestion Suggesting new features. 💭 Discussion For discussing things labels Oct 14, 2019
@Yucked
Copy link
Owner

Yucked commented Oct 14, 2019

That's fair but we will have to take into consideration all forms of urls and so on. We can limit it to /search HTTPGET only but with more sources and links it will get super messy to keep track of all urls and regex stuff.

@renanrcp
Copy link
Author

I think just a commom httpget with /seach and a class handler for that, we can make the theory regex public too, avoiding code repetition

@Yucked
Copy link
Owner

Yucked commented Oct 15, 2019

We can make a struct with const patterns and a static method for evaluating regex code with Compiled and IgnoreCase flags. But, I also think that regex might fail sometimes so it would be better to make a dictionary with url collection and we can go from there.

@renanrcp
Copy link
Author

That dictionary will have all possible urls for all sources?

@Yucked
Copy link
Owner

Yucked commented Oct 16, 2019

Yeah, something of that sort so it's a bit faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 Discussion For discussing things 💡 Suggestion Suggesting new features.
Projects
None yet
Development

No branches or pull requests

2 participants