diff --git a/cogs/voice.py b/cogs/voice.py index fe95215..5a1fc04 100644 --- a/cogs/voice.py +++ b/cogs/voice.py @@ -76,7 +76,7 @@ class voice(commands.Cog): @commands.command() async def help(self, ctx): embed = discord.Embed(title="Help", description="",color=0x7289da) - embed.set_author(name=f"{ctx.guild.me.display_name}",url="https://discordbots.org/bot/472911936951156740", icon_url=f"{ctx.guild.me.avatar_url}") + embed.set_author(name=f"{ctx.guild.me.display_name}",url="https://discordbots.org/bot/472911936951156740", icon_url=f"{ctx.guild.me.display_avatar.url}") embed.add_field(name=f'**Commands**', value=f'**Lock your channel by using the following command:**\n\n`.voice lock`\n\n------------\n\n' f'**Unlock your channel by using the following command:**\n\n`.voice unlock`\n\n------------\n\n' f'**Change your channel name by using the following command:**\n\n`.voice name `\n\n**Example:** `.voice name EU 5kd+`\n\n------------\n\n' @@ -304,5 +304,5 @@ class voice(commands.Cog): conn.close() -def setup(bot): - bot.add_cog(voice(bot)) +async def setup(bot): + await bot.add_cog(voice(bot)) diff --git a/voicecreate.py b/voicecreate.py index 7448bd8..02f40f7 100644 --- a/voicecreate.py +++ b/voicecreate.py @@ -15,19 +15,19 @@ DISCORD_TOKEN = 'Enter Discord Token here' initial_extensions = ['cogs.voice'] -if __name__ == '__main__': - for extension in initial_extensions: - try: - bot.load_extension(extension) - except Exception as e: - print(f'Failed to load extension {extension}.', file=sys.stderr) - traceback.print_exc() - @bot.event async def on_ready(): print('Logged in as') print(bot.user.name) print(bot.user.id) print('------') + + for extension in initial_extensions: + try: + await bot.load_extension(extension) + print(f'Loaded {extension}') + except Exception as e: + print(f'Failed to load extension {extension}.', file=sys.stderr) + traceback.print_exc() bot.run(DISCORD_TOKEN)