Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added extensions load and unload command. #87

Closed
wants to merge 17 commits into from
Closed

Added extensions load and unload command. #87

wants to merge 17 commits into from

Conversation

Inheritanc-e
Copy link

Resolves #15

Moved bot.run, load_extensions to main.py. Added an extension file in utils, added extensions command for loading, unloading and reloading extensions.
image

bot/exts/utils/extensions.py Outdated Show resolved Hide resolved
bot/utils/extension.py Show resolved Hide resolved
Copy link
Contributor

@Shivansh-007 Shivansh-007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah Shit, pressed wrong button.

Copy link
Member

@vivekashok1221 vivekashok1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not gone through the PR in detail but here are few things.

bot/__main__.py Outdated Show resolved Hide resolved
bot/bot.py Outdated Show resolved Hide resolved
bot/exts/utils/extensions.py Outdated Show resolved Hide resolved
bot/exts/utils/extensions.py Outdated Show resolved Hide resolved
bot/exts/utils/extensions.py Outdated Show resolved Hide resolved
@Inheritanc-e
Copy link
Author

@codephile1221 @Shivansh-007
Made the suggested changes.

Copy link
Contributor

@Shivansh-007 Shivansh-007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly all PEP 8 Errors. Will finish the rest of review after sometime.

#ROLES
STEERING_COUNCIL=""
SUPREME_CUCUMBER=""
LORDS=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing new line in here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new line after LORDS="" is missing.

await ctx.channel.send(messages)


def manage(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8: E303 too many blank lines.



def setup(bot: commands.Bot) -> None:
bot.add_cog(Extensions(bot))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8: W292 no newline at end of file

Comment on lines +113 to +115
extensions = [ ext for ext in extension.EXTENSIONS
if ext not in UNLOAD_BLACKLIST
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8: E124 closing bracket does not match visual indentation

return

if '*' in extensions:
extensions = [ ext for ext in extension.EXTENSIONS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8: E201 whitespace after '['

await ctx.channel.send(messages)

@extension_group.command(name="unload", aliases=["ul"])
async def unloading(self, ctx: commands.Cog, *extensions: Extension) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async def unloading(self, ctx: commands.Cog, *extensions: Extension) -> None:
async def unloading(self, ctx: commands.Context, *extensions: Extension) -> None:

@@ -1,6 +1,7 @@
import logging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import statement 'import logging'

Suggested change
import logging

@gustavwilliam
Copy link
Member

It doesn't seem like this will ever be merged.

There's a new PR for extension management commands now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load/Unload Cogs
4 participants