add reload all cogs command
@@ -29,9 +29,20 @@ class Owner(commands.Cog):
@commands.command(name='reload')
@commands.is_owner()
async def reload_cog(self, ctx, cog):
+ if cog == 'all':
+ await self.reload_all_cogs(ctx)
+ else:
self.bot.reload_extension(f'cogs.{cog}')
await ctx.message.add_reaction(self.d.emojis.yes)
+ @commands.command(name='reloadall')
+ @commands.is_owner()
+ async def reload_all_cogs(self, ctx):
+ for cog in self.bot.cogs_list:
+ self.bot.reload_extension(cog)
+
+ await ctx.message.add_reaction(self.d.emojis.yes)
+
@commands.command(name='eval')
@commands.is_owner()
async def eval_stuff(self, ctx, *, stuff):
