@@ -111,8 +111,8 @@ async def load_plugin(self, username, repo, plugin_name):
111111
112112 try :
113113 self .bot .load_extension (ext )
114- except ModuleNotFoundError as exc :
115- raise DownloadError ('Invalid plugin structure ' ) from exc
114+ except commands . ExtensionError as exc :
115+ raise DownloadError ('Invalid plugin. ' ) from exc
116116 else :
117117 msg = f'Loaded plugins.{ username } -{ repo } .{ plugin_name } '
118118 logger .info (info (msg ))
@@ -129,10 +129,10 @@ async def plugin(self, ctx):
129129 async def plugin_add (self , ctx , * , plugin_name ):
130130 """Adds a plugin"""
131131 if plugin_name in self .bot .config .plugins :
132- return await ctx .send ('Plugin already installed' )
132+ return await ctx .send ('Plugin already installed. ' )
133133 if plugin_name in self .bot .cogs .keys ():
134134 # another class with the same name
135- return await ctx .send ('Another cog exists with the same name' )
135+ return await ctx .send ('Another cog exists with the same name. ' )
136136
137137 message = await ctx .send ('Downloading plugin...' )
138138 async with ctx .typing ():
@@ -143,14 +143,14 @@ async def plugin_add(self, ctx, *, plugin_name):
143143 await self .download_plugin_repo (* parsed_plugin [:- 1 ])
144144 except DownloadError as exc :
145145 return await ctx .send (
146- f'Unable to fetch plugin from Github: { exc } '
146+ f'Unable to fetch plugin from Github: { exc } . '
147147 )
148148
149149 importlib .invalidate_caches ()
150150 try :
151151 await self .load_plugin (* parsed_plugin )
152152 except DownloadError as exc :
153- return await ctx .send (f'Unable to load plugin: `{ exc } `' )
153+ return await ctx .send (f'Unable to load plugin: `{ exc } `. ' )
154154
155155 # if it makes it here, it has passed all checks and should
156156 # be entered into the config
@@ -204,7 +204,7 @@ def onerror(func, path, exc_info):
204204 async def plugin_update (self , ctx , * , plugin_name ):
205205 """Updates a certain plugin"""
206206 if plugin_name not in self .bot .config .plugins :
207- return await ctx .send ('Plugin not installed' )
207+ return await ctx .send ('Plugin not installed. ' )
208208
209209 async with ctx .typing ():
210210 username , repo , name = self .parse_plugin (plugin_name )
@@ -217,7 +217,7 @@ async def plugin_update(self, ctx, *, plugin_name):
217217 )
218218 except subprocess .CalledProcessError as exc :
219219 err = exc .stderr .decode ('utf8' ).strip ()
220- await ctx .send (f'Error while updating: { err } ' )
220+ await ctx .send (f'Error while updating: { err } . ' )
221221 else :
222222 output = cmd .stdout .decode ('utf8' ).strip ()
223223 await ctx .send (f'```\n { output } \n ```' )
@@ -230,7 +230,7 @@ async def plugin_update(self, ctx, *, plugin_name):
230230 try :
231231 await self .load_plugin (username , repo , name )
232232 except DownloadError as exc :
233- await ctx .send (f'Unable to start plugin: `{ exc } `' )
233+ await ctx .send (f'Unable to start plugin: `{ exc } `. ' )
234234
235235 @plugin .command (name = 'list' , aliases = ['show' , 'view' ])
236236 @checks .has_permissions (PermissionLevel .OWNER )
@@ -240,7 +240,7 @@ async def plugin_list(self, ctx):
240240 msg = '```\n ' + '\n ' .join (self .bot .config .plugins ) + '\n ```'
241241 await ctx .send (msg )
242242 else :
243- await ctx .send ('No plugins installed' )
243+ await ctx .send ('No plugins installed. ' )
244244
245245
246246def setup (bot ):
0 commit comments