YouTube-Discord-Bot - Discord Bot to Search YouTube

Overview

YouTube Bot

Info

  • YouTube Bot is a discord bot where you can search for anything on YouTube, it will automatically find the first result, the channel and a lot more info about it then format it into an embed, and if you would like there is a dropdown menu where you can make the bot send you an ephemeral message with the video as an embed to watch.

Set-Up

Required

Enable YouTube API

Adding Your Info

  • Get your previously mentioned "Discord Bot Token" and replace the "bottokenhere" with your discord bot token.
  • Found here
cmd.run('tokenhere')
  • Replace the "googleapikeyhere" found on line 18 with your Google API key
api_service_name = "youtube"
api_version = "v3"
DEVELOPER_KEY = 'googleapikeyhere'
  • Now pip install all the modules and you are ready to run your bot!
  • You can also host this bot

Customizability

Status

  • To customize your bots status edit the information on line 13
    await cmd.change_presence(activity=discord.Activity(name='😼😼😼😼😼', type=5))
  • Name is the text that shows up in the status
  • The type is what it says before that, e.g. "Streaming", "Listening to" or in this case "Competing in"
  • Here are some types you can set it as:
ID Name Format Example
0 Game Playing {name} "Playing Rocket League"
1 Streaming Streaming {details} "Streaming Rocket League"
2 Listening Listening to {name} "Listening to Spotify"
3 Watching Watching {name} "Watching YouTube Together"
4 Custom {emoji} {name} " 😃 I am cool"
5 Competing Competing in {name} "Competing in Arena World Champions"

Search Info

  • You can customize the search settings by editing the info found in lines 62-68
    request = youtube.search().list(
        part="id,snippet",
        type='video',
        q=f"{output}",
        videoDuration='short',
        videoDefinition='high',
        maxResults=1,
        fields="nextPageToken,items(id(videoId),snippet(publishedAt,channelId,channelTitle,title,description))"
    )

Other

  • and of course you can customize the embed and drop down menu

How It Works

FAQ

  • How do I avoid maxing out my quota on Googles API?

You should add a cooldown to the bots commands, and if you are using this bot in a lot of servers I would recommend making more Google projects, getting the API keys from those, then using code that will randomly pick from 1 of up to 15 API keys in a text file.

  • How can I host this bot without paying?

I would recommend EC2 on AWS for free hosting, you can research how to use that, I am not typing out a tutorial because I am not in the mood to write a 30 page essay.

  • Why did you waste so much time on the README.md?

shut up.

End

To reach me if you have any issues, or need help my discord is: Rice#0404.

You might also like...
YouTube playlist Files downloaded by FDM are not organized according to the original order on YouTube

Youtube-Playlist-File-Organizer YouTube playlist Files downloaded by Free Download Manager are not organized according to the original order on YouTub

Google Drive, OneDrive and Youtube as covert-channels - Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram
Google Drive, OneDrive and Youtube as covert-channels - Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram

covert-control Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram using Python to create the files and the lis

This project uses Youtube data API's to do youtube tags analysis based on viewCount, comments etc.

Youtube video details analyser Steps to run this project Please set the AuthKey which you can fetch from google developer console and paste it in the

Automation that uses Github Actions, Google Drive API, YouTube Data API and youtube-dl together to feed BackJam app with new music

Automation that uses Github Actions, Google Drive API, YouTube Data API and youtube-dl together to feed BackJam app with new music

Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.
Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.

Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.

It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Rhythm bot clone for discord written in Python and uses YouTube to get media files.

Tunebot About Rhythm bot clone for discord written in Python and uses YouTube to get media files. Usage You need a .env file within the same directory

Releases(YouTube)
Owner
Riceblades11
Hello I am Riceblades11 My discord is Rice#0404 ok bye
Riceblades11
JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support

Just Another Konsole YouTube-Music Overview I wanted to create this application so that I could use the command line to play music easily. I often pla

Mayank Jha 73 Jan 1, 2023
Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google

Advanced Discord.py Image Bot CREDITS Made by RLX and Mathiscool README by Milrato Installation Guide in .env Adjust the TOKEN python main.py to start

RLX 3 Jan 16, 2022
Linky bot, A open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

LinkyBot Linky bot, An open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

AlexyDaCoder 1 Sep 20, 2022
A youtube search telegram bot.

YouTube-Search-Bot A youtube search telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License -> https://github

Fayas Noushad 22 Nov 12, 2022
A Telegram Bot to Play Audio in Voice Chats With Youtube and Deezer support. Supports Live streaming from youtube Supports Mega Radio Fm Streamings

Bot To Stream Musics on PyTGcalls with Channel Support. A Telegram Bot to Play Audio in Voice Chats With Supports Live streaming from youtube and Mega

Shamil Habeeb 37 Dec 15, 2022
A Telegram bot to download youtube playlists and upload them to telegram. (may be slow becoz youtube limitations)

YTPlaylistDL ?? A Telegram bot to download youtube playlists and upload them to telegram. (may be slow becoz youtube limitations) ?? Follow me and sta

Anjana Madu 43 Dec 28, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
This is a very easy to use tool developed in python that will search for free courses from multiple sites including youtube and enroll in the ones in which it can.

Free-Course-Hunter-and-Enroller This is a very easy to use tool developed in python that will search for free courses from multiple sites including yo

Zain 12 Nov 12, 2022
Python Library to Extract youtube video Tags without Youtube API

YoutubeTags Python Library to Extract youtube video Tags without Youtube API Installation pip install YoutubeTags Example import YoutubeTags from Yout

Nuhman Pk 17 Nov 12, 2022
Telegram Userbot to steram youtube live or Youtube vido in telegram vc by help of pytgcalls

TGVCVidioPlayerUB Telegram Userbot to steram youtube live or youtube vidio in telegram vc by help of pytgcalls Commands =>> Vidio Playing ?? stream :

Achu biju 3 Oct 28, 2022