This commit is contained in:
BarsTiger
2021-04-16 14:59:04 +03:00
parent a60ced932e
commit 797179bd38

22
main.py
View File

@@ -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: