Skip to content

Commit 7761cd2

Browse files
committed
Fix registry shuffle and search
1 parent d2323c2 commit 7761cd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cogs/plugins.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ async def plugin_enabled(self, ctx):
268268

269269
@plugin.command(name='registry', aliases=['list'])
270270
@checks.has_permissions(PermissionLevel.OWNER)
271-
async def plugin_registry(self, ctx, plugin_name=None):
271+
async def plugin_registry(self, ctx, *, plugin_name:str=None):
272272
"""Shows a list of all approved plugins."""
273273

274274
embeds = []
@@ -285,9 +285,10 @@ def find_index(name):
285285
return index
286286
index += 1
287287

288-
if plugin_name and plugin_name in self.registry:
288+
index = 0
289+
if plugin_name in self.registry:
289290
index = find_index(plugin_name)
290-
else:
291+
elif plugin_name is not None:
291292
return await ctx.send(embed=discord.Embed(
292293
color=discord.Color.red(),
293294
description=f'Could not find a plugin with name "{plugin_name}" within the registry.'

0 commit comments

Comments
 (0)