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

[V3 Core] Add checks to [p]command #2770

Merged
merged 2 commits into from
Jun 19, 2019
Merged

[V3 Core] Add checks to [p]command #2770

merged 2 commits into from
Jun 19, 2019

Conversation

NeuroAssassin
Copy link
Contributor

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Now makes sure that when running [p]command disable, you are not disabling the [p]command command. In addition, it makes sure the user running the [p]command <> server command can actually run the command they are disabling/enabling.

Copy link
Contributor

@mikeshardmind mikeshardmind left a comment

Choose a reason for hiding this comment

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

Checking if the person can run it shouldn't happen IMO. This removes the possiblity for the bot owner to manage enabled guild only commands from DMs. If the goal of this is to avoid a guild owner locking an owner command, check the requires object for the required permission level. Beyond that, there's no reason someone able to run a disable should be unable to disable commands.

@NeuroAssassin
Copy link
Contributor Author

Just pushed a commit to address the requested changes.

Copy link
Contributor

@mikeshardmind mikeshardmind left a comment

Choose a reason for hiding this comment

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

Thanks!

@mikeshardmind mikeshardmind merged commit 9d008d5 into Cog-Creators:V3/develop Jun 19, 2019
@mikeshardmind mikeshardmind added this to the 3.1.3 milestone Jun 19, 2019
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.

2 participants