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

[Core] Multiple mod admin roles #2783

Merged
merged 14 commits into from
Jun 24, 2019
Merged

[Core] Multiple mod admin roles #2783

merged 14 commits into from
Jun 24, 2019

Conversation

DiscordLiz
Copy link
Contributor

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

This allows multiple mod and admin roles to be used.

I've updated everywhere which uses it directly.

If cog developers are expected to be allowed to interact with the bot's settings directly, this is also a breaking change.

@mikeshardmind
Copy link
Contributor

I don't think we ever publicly documented the bot's db. I'm inclined to say that even if this may break someone, they should be using the exposed documented functions instead of this. I'm happy to review it later, and open to discussing delaying this for a breaking release if someone disagrees with that stance.

@mikeshardmind
Copy link
Contributor

A note for anyone going to test this: Since it modifies the bot's db including the types of things in it, I suggest testing with a brand new instance or a copy of a prior one.

Copy link
Member

@Flame442 Flame442 left a comment

Choose a reason for hiding this comment

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

I haven't had a chance to run this on a bot yet, however I looked over the strings a bit and have some changes to suggest.

-All doc strings: The spaces in between the text and the quotes should be removed for consistency with the rest of red
-All doc strings: Missing periods at the end.
-I remember a PR at some point added consistency to all of the del/delete/rem/remove commands by aliasing all of that, [p]set remove<mod/admin>role might need to get the same treatment.

redbot/core/core_commands.py Outdated Show resolved Hide resolved
if role.id in roles:
return await ctx.send(_("This is already an admin role."))
roles.append(role.id)
await ctx.send(_("That role was added as an admin role for this guild."))
Copy link
Member

Choose a reason for hiding this comment

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

This line and L758, "That role was added" doesn't sound very good, maybe a simple "Role added successfully."?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with something different here, let me know if it sounds better to you.

redbot/core/core_commands.py Outdated Show resolved Hide resolved
@Flame442 Flame442 added QA: Needed Type: Enhancement Something meant to enhance existing Red features. and removed QA: Unassigned labels Jun 22, 2019
Update strings
Update docstrings
Add aliases
@mikeshardmind mikeshardmind added this to the 3.1.3 milestone Jun 23, 2019
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.

I need to do a bit more actual testing with this (not a full review), but it's what I've noticed so far.

Definitely liking most of what I'm seeing here so far.

redbot/core/commands/requires.py Outdated Show resolved Hide resolved
redbot/core/core_commands.py Show resolved Hide resolved
redbot/core/commands/requires.py Outdated Show resolved Hide resolved
Flame442
Flame442 previously approved these changes Jun 24, 2019
Copy link
Member

@Flame442 Flame442 left a comment

Choose a reason for hiding this comment

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

While I still don't love the "this" in "This role is already an <admin/mod> role.", the changes I requested have been addressed.

mikeshardmind
mikeshardmind previously approved these changes Jun 24, 2019
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 @DiscordLiz for the quick follow up on issues discussed both here and in Discord.

🎉

@DiscordLiz DiscordLiz dismissed stale reviews from mikeshardmind and Flame442 via c80d142 June 24, 2019 03:32
@mikeshardmind mikeshardmind changed the title Multiple mod admin roles [Core] Multiple mod admin roles Jun 24, 2019
@mikeshardmind mikeshardmind merged commit 6bdc960 into Cog-Creators:V3/develop Jun 24, 2019
@Flame442 Flame442 mentioned this pull request Jul 5, 2019
3 tasks
@DiscordLiz DiscordLiz deleted the multiple-mod-admin-roles branch July 9, 2019 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants