1
This commit is contained in:
22
main.py
22
main.py
@@ -46,6 +46,10 @@ ffmpeg_options = {
|
|||||||
'options': '-vn'
|
'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)
|
ytdl = youtube_dl.YoutubeDL(ytdl_format_options)
|
||||||
|
|
||||||
|
|
||||||
@@ -89,6 +93,22 @@ class Music(commands.Cog):
|
|||||||
|
|
||||||
await ctx.send('Now playing: {}'.format(player.title))
|
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()
|
@commands.command()
|
||||||
async def volume(self, ctx, volume: int):
|
async def volume(self, ctx, volume: int):
|
||||||
"""Changes the player's volume"""
|
"""Changes the player's volume"""
|
||||||
@@ -106,6 +126,8 @@ class Music(commands.Cog):
|
|||||||
await ctx.voice_client.disconnect()
|
await ctx.voice_client.disconnect()
|
||||||
|
|
||||||
@play.before_invoke
|
@play.before_invoke
|
||||||
|
@bassboost.before_invoke
|
||||||
|
@superbass.before_invoke
|
||||||
async def ensure_voice(self, ctx):
|
async def ensure_voice(self, ctx):
|
||||||
if ctx.voice_client is None:
|
if ctx.voice_client is None:
|
||||||
if ctx.author.voice:
|
if ctx.author.voice:
|
||||||
|
|||||||
Reference in New Issue
Block a user