diff options
author | aninternettroll <lucafulger@gmail.com> | 2020-09-27 10:50:50 +0000 |
---|---|---|
committer | aninternettroll <lucafulger@gmail.com> | 2020-09-27 10:50:50 +0000 |
commit | d439a851657beea76516d76b129ad2002bce9e55 (patch) | |
tree | 925946523588ce9d991ea5ba27f95c37ad3426a0 /cogs/player.py | |
parent | 74cc1bcbab8bf54d4d6be420c87a82e06a707b3a (diff) | |
download | steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar.gz steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar.bz2 steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar.lz steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar.xz steve-bot-d439a851657beea76516d76b129ad2002bce9e55.tar.zst steve-bot-d439a851657beea76516d76b129ad2002bce9e55.zip |
Better Error Handler
Diffstat (limited to 'cogs/player.py')
-rwxr-xr-x | cogs/player.py | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/cogs/player.py b/cogs/player.py index f21992d..ae328a5 100755 --- a/cogs/player.py +++ b/cogs/player.py @@ -74,8 +74,8 @@ class YTDLSource(discord.PCMVolumeTransformer): def __getitem__(self, item: str): """Allows us to access attributes similar to a dict. - This is only useful when you are NOT downloading. - """ + This is only useful when you are NOT downloading. + """ return self.__getattribute__(item) @classmethod @@ -112,7 +112,7 @@ class YTDLSource(discord.PCMVolumeTransformer): async def regather_stream(cls, data, *, loop): """Used for preparing a stream, instead of downloading. - Since Youtube Streaming links expire.""" + Since Youtube Streaming links expire.""" loop = loop or asyncio.get_event_loop() requester = data["requester"] @@ -129,11 +129,11 @@ class YTDLSource(discord.PCMVolumeTransformer): class MusicPlayer: """A class which is assigned to each guild using the bot for Music. - This class implements a queue and loop, which allows for different guilds to listen to different playlists - simultaneously. + This class implements a queue and loop, which allows for different guilds to listen to different playlists + simultaneously. - When the bot disconnects from the Voice it's instance will be destroyed. - """ + When the bot disconnects from the Voice it's instance will be destroyed. + """ __slots__ = ( "bot", @@ -289,14 +289,14 @@ class Player(commands.Cog): async def connect_(self, ctx, *, channel: discord.VoiceChannel = None): """Connect to voice. - Parameters - ------------ - channel: discord.VoiceChannel [Optional] - The channel to connect to. If a channel is not specified, an attempt to join the voice channel you are in - will be made. + Parameters + ------------ + channel: discord.VoiceChannel [Optional] + The channel to connect to. If a channel is not specified, an attempt to join the voice channel you are in + will be made. - This command also handles moving the bot to different channels. - """ + This command also handles moving the bot to different channels. + """ if not channel: try: channel = ctx.author.voice.channel @@ -328,14 +328,14 @@ class Player(commands.Cog): async def play_(self, ctx, *, search: str): """Request a song and add it to the queue. - This command attempts to join a valid voice channel if the bot is not already in one. - Uses YTDL to automatically search and retrieve a song. + This command attempts to join a valid voice channel if the bot is not already in one. + Uses YTDL to automatically search and retrieve a song. - Parameters - ------------ - search: str [Required] - The song to search and retrieve using YTDL. This could be a simple search, an ID or URL. - """ + Parameters + ------------ + search: str [Required] + The song to search and retrieve using YTDL. This could be a simple search, an ID or URL. + """ await ctx.trigger_typing() vc = ctx.voice_client @@ -452,11 +452,11 @@ class Player(commands.Cog): async def change_volume(self, ctx, *, vol: float): """Change the player volume. - Parameters - ------------ - volume: float or int [Required] - The volume to set the player to in percentage. This must be between 1 and 100. - """ + Parameters + ------------ + volume: float or int [Required] + The volume to set the player to in percentage. This must be between 1 and 100. + """ vc = ctx.voice_client if not vc or not vc.is_connected(): @@ -479,9 +479,9 @@ class Player(commands.Cog): async def stop_(self, ctx): """Stop the currently playing song and destroy the player. - !Warning! - This will destroy the player assigned to your guild, also deleting any queued songs and settings. - """ + !Warning! + This will destroy the player assigned to your guild, also deleting any queued songs and settings. + """ vc = ctx.voice_client if not vc or not vc.is_connected(): |