Run black on all examples and require it for CI

This commit is contained in:
Rapptz
2022-03-24 23:39:50 -04:00
parent 968a1f366f
commit 8591cfc5e7
21 changed files with 91 additions and 44 deletions

View File

@ -22,11 +22,11 @@ ytdl_format_options = {
'quiet': True,
'no_warnings': True,
'default_search': 'auto',
'source_address': '0.0.0.0' # bind to ipv4 since ipv6 addresses cause issues sometimes
'source_address': '0.0.0.0', # bind to ipv4 since ipv6 addresses cause issues sometimes
}
ffmpeg_options = {
'options': '-vn'
'options': '-vn',
}
ytdl = youtube_dl.YoutubeDL(ytdl_format_options)
@ -125,21 +125,27 @@ class Music(commands.Cog):
elif ctx.voice_client.is_playing():
ctx.voice_client.stop()
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"),
description='Relatively simple music bot example',
intents=intents)
bot = commands.Bot(
command_prefix=commands.when_mentioned_or("!"),
description='Relatively simple music bot example',
intents=intents,
)
@bot.event
async def on_ready():
print(f'Logged in as {bot.user} (ID: {bot.user.id})')
print('------')
async def main():
async with bot:
await bot.add_cog(Music(bot))
await bot.start('token')
asyncio.run(main())