diff --git a/main.py b/main.py index fd185b2..0288346 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ import youtube_dl from discord.ext import commands + ######################################################################################################################### # MMMMMMMM MMMMMMMMUUUUUUUU UUUUUUUU SSSSSSSSSSSSSSS IIIIIIIIII CCCCCCCCCCCCC @@ -105,9 +106,12 @@ class YTDLSource(discord.PCMVolumeTransformer): filename = data['url'] if stream else ytdl.prepare_filename(data) return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_super_bass_options), data=data) + + class Music(commands.Cog): def __init__(self, bot): self.bot = bot + self.now = "" @commands.command() async def join(self, ctx, *, channel: discord.VoiceChannel): @@ -122,6 +126,7 @@ class Music(commands.Cog): 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)) + self.now = player.title @commands.command() async def bassboost(self, ctx, *, url): @@ -227,4 +232,4 @@ async def on_ready(): bot.add_cog(Music(bot)) bot.add_cog(Answers(bot)) -bot.run(token) +bot.run('ODI5OTk2MzM3NjEyNzE4MTEw.YHAQUw.UoEzhz7fVG3Wqfr2IhrE14oNqEE') diff --git a/requirements.txt b/requirements.txt index 8fcc342..e7412e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ discord.py discord.py[voice] youtube_dl ffmpeg -PyNaCl \ No newline at end of file +PyNaCl +httpx \ No newline at end of file