python-discord / sir-lancebot

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
MIT License
243 stars 241 forks source link

Youtube Command #585

Open SuperMaZingCoder opened 3 years ago

SuperMaZingCoder commented 3 years ago

Description

Implement a .youtube or .yt command to get the top 5 results from YouTube with that search query.

Reasoning

Users can share videos with each other and recommend YouTube tutorials on different topics.

Proposed Implementation

Use the Youtube API.

Would you like to implement this yourself?

decorator-factory commented 3 years ago

I'm a bit afraid that it could be used in a LMGTFY way. That is, instead of linking a tutorial or an article, a person can just invoke that command with a query.

HassanAbouelela commented 3 years ago

Hmm most sir-lancebot commands are locked to the bot channels, and a few others. As long as we don't allow this command within help contexts, I think we should be fine.

decorator-factory commented 3 years ago

@HassanAbouelela That makes sense.

It's also important to set up some sort of rate limit. Besides the documented limits, Google also apparently has some undocumented rate limits, so you just have to be careful.

SuperMaZingCoder commented 3 years ago

I'm a bit afraid that it could be used in a LMGTFY way. That is, instead of linking a tutorial or an article, a person can just invoke that command with a query.

@decorator-factory I think we have a few other Lancebot commands that are similar such as the Wikipedia, and in-development StackOverflow command, but I think like @HassanAbouelela said, we should be fine as long as we limit its usage.