Discord Bot written in Python that plays music in your voice channel

Overview

Discord Bot that plays music! python

I decided to create a simple Discord bot using Python in order to advance my coding skills.

Please don't ask me for help with your code, this code is simple enough if you have a basic understanding of code

DO NOT COPY AND PASTE THIS CODE IF YOU DO NOT KNOW WHAT YOU ARE DOING. I WILL NOT HELP YOU.

This bot as of right now can:

  • Join the channel you're in
  • Play from Youtube
  • Pause
  • Stop
  • Resume
  • Clear messages in channel

To do:

  • Add messages when commands are executed succesfully
  • Queue system
  • Have the bot always on (I would have to pay for this option so it's really not worth it as of right now)
  • Include eventual jokes
  • use cogs to organize commands

Dependecies:

INSTALL THESE DEPENDECIES IN ORDER FOR THE CODE TO WORK

  • discord.py
  • ffmpeg
  • YouTube-dl
  • dotenv
Comments
  • Bot prefix?

    Bot prefix?

    Hi i'm new to coding and im looking to make a discord music bot. i typed in your code and found the prefix load_dotenv() client = commands.Bot(command_prefix='.') but i dont know the play command and i would like to change the prefix. can i just do "= "v!" and then use the command v!play in the discord? because i tried to do this but i dosent seem to be working, is that not an option or is the code not right? -Crossinq

    opened by Crossinq 11
  • Further development of Bot

    Further development of Bot

    I am very excited for the future of the bot, I wanted that if you could add music commands play not just by youtube links/playlist but also by names and spotify and a queue system with it...

    opened by MobsLInep 1
  • Not working

    Not working

    Traceback (most recent call last):
      File "C:\Users\Tenet\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
        ret = await coro(*args, **kwargs)
      File "C:/Users/Tenet/AppData/Local/Programs/Python/Python39/ezv2.py", line 31, in play
        voice = get(client.voice_clients, guild=ctx.guild)
    NameError: name 'get' is not defined
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "C:\Users\Tenet\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
        await ctx.command.invoke(ctx)
      File "C:\Users\Tenet\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
        await injected(*ctx.args, **ctx.kwargs)
      File "C:\Users\Tenet\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
        raise CommandInvokeError(exc) from exc
    discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'get' is not defined
    
    opened by asel4ik 1
  • Readme - dotenv

    Readme - dotenv

    Dependency list should be modified to clarify that the package to be installed is "python-dotenv" vice "dotenv" which is deprecated.

    opened by pnhearer 0
  • venv instructions

    venv instructions

    Bot could be setup in a venv. Readme could be updated to provide instructions for doing so. This creates greater flexibility for future iterations of this project.

    opened by pnhearer 0
  • AttributeError: 'NoneType' object has no attribute 'is_playing'

    AttributeError: 'NoneType' object has no attribute 'is_playing'

    I've been balding my head for 5 hours wondering why this happen. anyone care to explain? I did installed all dependencies. Apologies in advance

    `Bot online Ignoring exception in command play: Traceback (most recent call last): File "C:\Users\ahmad\PycharmProjects\Discord bot\venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "C:\Users\ahmad\PycharmProjects\Discord bot\Rihito bot.py", line 41, in play if not voice.is_playing(): AttributeError: 'NoneType' object has no attribute 'is_playing'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "C:\Users\ahmad\PycharmProjects\Discord bot\venv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke await ctx.command.invoke(ctx) File "C:\Users\ahmad\PycharmProjects\Discord bot\venv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke await injected(*ctx.args, **ctx.kwargs) File "C:\Users\ahmad\PycharmProjects\Discord bot\venv\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'is_playing' `

    opened by Arief47 2
Owner
Eric Yeung
UWindsor Computer Science graduate
Eric Yeung
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

?? Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls ?? Get

levina 143 Jun 19, 2022
veez music is a telegram music bot project, allow you to play music on voice chat group telegram.

?? VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements ?? FFmpeg NodeJS node

levina 23 Aug 29, 2021
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ ?????????? ?????????? ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 8, 2022
An Advanced Telegram Bot to Play Radio & Music in Voice Chat. This is Also The Source Code of The Bot Which is Being Used For Playing Radio in @AsmSafone Channel ❤️

Telegram Radio Player V3 An Advanced Telegram Bot to Play Nonstop Radio/Music/YouTube Live in Channel or Group Voice Chats. This is also the source co

SAF ONE 421 Jan 5, 2023
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

Arvinth Krishna 12 Aug 31, 2022
This Is Advanced Version Of Old Radio Player, An Telegram Bot to Play Radio/Music in Channel or Group Voice Chats.

Telegram Radio Player V2 An Telegram Bot to Play Radio/Music in Channel or Group Voice Chats. This is also the source code of the bot which is being u

SAF ONE 81 Dec 3, 2022
Telegram Radio - A User-bot who continuously play random audio files (from the famous telegram music channel @mveargasm) in the intended voice chat.

MvEargasmDJ: This is my submission for the Telegram Radio Project of Baivaru. Which required a userbot to continiously play random audio files from th

eyaadh 24 Nov 12, 2022
🎵 RythmReloaded 🎵 A bot that can play music on Telegram Group and Channel Voice Chats

?? RythmReloaded ?? A bot that can play music on Telegram Group and Channel Voice Chats POWERED BY MARSHALX TGCALLS Available on telegram as @OptimusP

null 0 Nov 3, 2021
The official Magenta Voice Skill SDK used to develop skills for the Magenta Voice Assistant using Voice Platform!

Magenta Voice Skill SDK Development • Support • Contribute • Contributors • Licensing Magenta Voice Skill SDK for Python is a package that assists in

Telekom Open Source Software 18 Nov 19, 2022
Music bot for playing music on telegram voice chat group.

Somali X Music ?? Music bot for playing music on telegram voice chat group. Requirements FFmpeg NodeJS nodesource.com Python 3.8+ or Higher PyTgCalls

Abdisamad Omar Mohamed 4 Dec 1, 2021
ANKIT-OS/TG-MUSIC-PLAYER a special repository. Its Is A Telegram Bot To Play To Play Music In Voice Chat

?? ?? TG MUSIC PLAYER ?? ?? The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • ??️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs ?? •

ANKIT KUMAR 1 Dec 27, 2021
A code that can make your 5 accounts stay 24/7 in a discord voice channel!

Voicecord A code that can make your 5 accounts stay 24/7 in a discord voice channel! Usage ・Fork the repo ・Clone it to replit ・Install the required pa

DraKenCodeZ 3 Jan 9, 2022
Free and Open Source Channel/Group Voice chat music player for telegram ❤️ with button support Heroku Commands

ZeusMusic Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7 or higher PyTgCalls MongoDB 2nd Telegram Account (needed for userbot) ?? Get SESSION

ZeusNetwork 4 Jan 3, 2022
A Discord.py bot which can adjust a voice channel's bitrate depending on the number of users connected.

discord_bitrate_bot A Discord.py bot which can adjust a voice channel's bitrate depending on the number of users connected. Programmed to be run on a

null 1 Feb 10, 2022
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

Nikola Arbov 1 Jan 13, 2022
A bot that connects your guild chat to a Discord channel, written in Python.

Guild Chat Bot A bot that connects your guild chat to a discord channel. Uses discord.py and pyCraft Deploy on Railway Railway is a cloud development

Evernote 10 Sep 25, 2022
MusicBot is the original Discord music bot written for Python 3.5+, using the discord.py library

The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)

Just Some Bots 2.9k Jan 2, 2023
Discord bot that plays cricket with the user

CricBot Table of content Commands Installation Game rules License Commands S.No Command Use 1. >cric Open the home window. This command is not necessa

Raveesh Yadav 1 Nov 19, 2021
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

null 2 Feb 28, 2022