title: Discord.py | Youtube statistics
body: <p>How can I retrieve the information of an youtube account or video with a discord bot in python?</p>
  <p>I want to do sth like this:</p>
  <pre><code>@commands.command(name='youtube', aliases=['yt'])
  async def youtube(self, ctx, *, search):
      yt_object = youtube.search(search)
      if yt_object == channel:
          abonnements = yt_object.abonnements
          await ctx.send(abonnements)
      elif yt_object == video:
          views = yt_object.views
          await ctx.send(views)
  </code></pre>