From 797179bd385d8726fa71975bcfff632f9b912244 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Fri, 16 Apr 2021 14:59:04 +0300 Subject: [PATCH] 1 --- main.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/main.py b/main.py index 0a5cdf0..e38369d 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,10 @@ ffmpeg_options = { 'options': '-vn' } +ffmpeg_bass_options = { + 'options': '-af "firequalizer=gain_entry="entry(0,-8);entry(250,4);entry(1000,-8);entry(4000,0);entry(16000,-8)""' +} + ytdl = youtube_dl.YoutubeDL(ytdl_format_options) @@ -89,6 +93,22 @@ class Music(commands.Cog): await ctx.send('Now playing: {}'.format(player.title)) + @commands.command() + async def bassboost(self, ctx, *, url): + async with ctx.typing(): + player = await YTDLSource.bass_from_url(url, loop=self.bot.loop, stream=True) + ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None) + + await ctx.send('Now playing: {}'.format(player.title)) + + @commands.command() + async def superbass(self, ctx, *, url): + async with ctx.typing(): + player = await YTDLSource.superbass_from_url(url, loop=self.bot.loop, stream=True) + ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None) + + await ctx.send('Now playing: {}'.format(player.title)) + @commands.command() async def volume(self, ctx, volume: int): """Changes the player's volume""" @@ -106,6 +126,8 @@ class Music(commands.Cog): await ctx.voice_client.disconnect() @play.before_invoke + @bassboost.before_invoke + @superbass.before_invoke async def ensure_voice(self, ctx): if ctx.voice_client is None: if ctx.author.voice: