@@ -25,18 +25,17 @@ def __init__(self, bot):
2525 description = "Load a cog" ,
2626 )
2727 @checks .is_owner ()
28- async def load (self , context : Context , cog : str ):
28+ async def load (self , context : Context , cog : str ) -> None :
2929 """
3030 The bot will load the given cog.
31-
3231 :param context: The hybrid command context.
3332 :param cog: The cog to be loaded.
3433 """
3534 try :
3635 await self .bot .load_extension (f"cogs.{ cog } " )
3736 except Exception as e :
3837 embed = discord .Embed (title = "Error!" , description = f"Could not load the `{ cog } ` cog." )
39- await context .send (embed = embed )
38+ await context .send (embed = embed ); return
4039 embed = discord .Embed (title = "Load" , description = f"Successfully loaded the `{ cog } ` cog." )
4140 await context .send (embed = embed )
4241
@@ -46,18 +45,17 @@ async def load(self, context: Context, cog: str):
4645 description = "Unloads a cog." ,
4746 )
4847 @checks .is_owner ()
49- async def unload (self , context : Context , cog : str ):
48+ async def unload (self , context : Context , cog : str ) -> None :
5049 """
5150 The bot will unload the given cog.
52-
5351 :param context: The hybrid command context.
5452 :param cog: The cog to be unloaded.
5553 """
5654 try :
5755 await self .bot .unload_extension (f"cogs.{ cog } " )
5856 except Exception as e :
5957 embed = discord .Embed (title = "Error!" , description = f"Could not unload the `{ cog } ` cog." )
60- await context .send (embed = embed )
58+ await context .send (embed = embed ); return
6159 embed = discord .Embed (title = "Unload" , description = f"Successfully loaded the `{ cog } ` cog." )
6260 await context .send (embed = embed )
6361
@@ -66,18 +64,17 @@ async def unload(self, context: Context, cog: str):
6664 description = "Reloads a cog." ,
6765 )
6866 @checks .is_owner ()
69- async def reload (self , context : Context , cog : str ):
67+ async def reload (self , context : Context , cog : str ) -> None :
7068 """
7169 The bot will reload the given cog.
72-
7370 :param context: The hybrid command context.
7471 :param cog: The cog to be reloaded.
7572 """
7673 try :
7774 await self .bot .reload_extension (f"cogs.{ cog } " )
7875 except Exception as e :
7976 embed = discord .Embed (title = "Error!" , description = f"Could not reload the `{ cog } ` cog." )
80- await context .send (embed = embed )
77+ await context .send (embed = embed ); return
8178 embed = discord .Embed (title = "Reload" , description = f"Successfully reloaded the `{ cog } ` cog." )
8279 await context .send (embed = embed )
8380
0 commit comments