"""Allows us to access attributes similar to a dict. # YTDL info dicts (data) have other useful information you might want """Exception for cases of invalid Voice Channels."""Ĭlass YTDLSource(discord.PCMVolumeTransformer):ĭef _init_(self, source, *, data, requester): """Custom Exception class for connection errors."""Ĭlass InvalidVoiceChannel(VoiceConnectionError): ![]() 'source_address': '0.0.0.0' # ipv6 addresses cause issues sometimesĬlass VoiceConnectionError(commands.CommandError): Youtube_dl.utils.bug_reports_message = lambda: '' # Suppress noise about console usage from errors Try copy-pasting this code into your cog, and it should work for you without any issues. Other commands include np, which will show the current video playing queue, which will print out the entire music queue vol, which will show the current volume of the voice client vol, which will change the volume percentage based on the inputted number, and the regular join and leave commands that are used to make the bot join a voice channel. Along with that, it has other commands such as remove and clear that will either remove a specified song in the queue or will clear the entire queue. Also, it has complete queue functionality, which is similar to that of bots like Groovy and Rythm. I have code for my music bot that streams any youtube video without downloading it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |