-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
adminchannel: rework topic-mask commands #2601
Conversation
Bonus code style fix using `default` arg to `bot.db.get_channel_value()`
- `.tmask` without arguments now shows the current topic mask instead of clearing it. - `.showmask` command is redundant with the above, and has been removed. - `.cleartmask` is added to explicitly clear the topic mask.
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'm all for it. I made an optional suggestion for a "ctmask" alias.
Refactored to use subcommands. I kind of like this style, actually. The |
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.
Nitpicking aside, LGTM.
c0f3e35
to
e6a0a71
Compare
Last night, @half-duplex said in our IRC: "reading only the strings and decorators in 2601: lgtm" — and that puts to rest the earlier discussion about |
Description
.tmask get
shows the current topic mask.tmask
without arguments assumes theget
subcommand.tmask set
now sets the topic mask, and provides a usage hint if called without further arguments.tmask clear
is added to explicitly clear the topic maskIn combination, the above should be sufficient to resolve #2596.
Checklist
make qa
(runsmake lint
andmake test
)Notes
If no one minds adding this to 8.0.0 while the release notes are still under peer review, I'm happy to get it shipped sooner.
(Because it's modifying command behavior, if we don't ship this patch in 8.0.0, I believe the semver-appropriate thing to do would be to ship the first commit in 8.0.1 and hold the second for 8.1.0.)