Skip to content

Commit

Permalink
new plugin cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
greeeen-dev committed Oct 19, 2024
1 parent 083e555 commit fbf6944
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cogs/sysmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@ async def restart(self, ctx):
await self.bot_shutdown(ctx, restart=True)

@commands.command(aliases=['plugins'],hidden=True,description=language.desc('sysmgr.modifiers'))
@restrictions.owner()
async def modifiers(self, ctx, *, plugin=None):
selector = language.get_selector(ctx)
if plugin:
Expand All @@ -1139,7 +1138,6 @@ async def modifiers(self, ctx, *, plugin=None):
if not plugin:
offset = page * 20
embed = nextcord.Embed(title=selector.get('title'), color=self.bot.colors.unifier)
text = ''
if offset > len(pluglist):
page = len(pluglist) // 20 - 1
offset = page * 20
Expand All @@ -1148,11 +1146,11 @@ async def modifiers(self, ctx, *, plugin=None):
break
with open('plugins/'+pluglist[x]) as file:
pluginfo = json.load(file)
if text == '':
text = f'- {pluginfo["name"]} (`{pluginfo["id"]}`)'
else:
text = f'{text}\n- {pluginfo["name"]} (`{pluginfo["id"]}`)'
embed.description = text
embed.add_field(
name=f'{pluginfo["name"]} (`{pluginfo["id"]}`, {pluginfo["version"]})',
value=pluginfo["description"],
inline=False
)
embed.set_footer(text=selector.rawfget(
'page', 'sysmgr.extensions', values={'page': page + 1}
))
Expand Down Expand Up @@ -1861,7 +1859,7 @@ async def upgrade(self, ctx, plugin='system', *, args=''):
disabled=False
),
nextcord.ui.Button(
style=nextcord.ButtonStyle.gray, label=selector.rawget('nevermind','sysmgr.install'), custom_id=f'reject',
style=nextcord.ButtonStyle.gray, label=selector.rawget('nevermind','commons.navigation'), custom_id=f'reject',
disabled=False
),
nextcord.ui.Button(
Expand Down

0 comments on commit fbf6944

Please sign in to comment.