-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
…e in utils, added extensions command for loading, unloading and reloading extensions
There was a problem hiding this 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.
There was a problem hiding this 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.
@codephile1221 @Shivansh-007 |
There was a problem hiding this 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="" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
extensions = [ ext for ext in extension.EXTENSIONS | ||
if ext not in UNLOAD_BLACKLIST | ||
] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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'
import logging |
It doesn't seem like this will ever be merged. There's a new PR for extension management commands now. |
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.