[V3] timed/temporary mutes [Don't review current, see comments] #2140
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!2140
Loading…
Reference in a new issue
No description provided.
Delete branch "V3/timed-mutes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Description of the changes
Adds support for temporary mutes.
Usage examples:
This resolves #2103
Going to modify the unmute task somewhat to handle time resolution a little more closely.
I understand the appeal of argparse-style commands, but unfortunately I don't agree that they have a place in core commands; not yet at least. My reasons being:
GreedyandOptionalconverters which would work perfectly for the purposes of temp mute without the break from conventionIn the future I would happily accept a utility for more general argparse-style converters, but if it's to be used in the core bot, it should not force any command signatures to change.
Actually, the greedy converter and optional one wont work for this. Greedy behaves more like a typehint for sequence, than a greedy match. And optional does not play nice with arbitrary strings which can exist in a reason. @tobotimus
An example:
Parse those unambiguously using d.py builtins ( and any other possible one) and I'll agree. Otherwise I'm not budging on implementation.
Since this has been dropped from RC1, close this if that's the final stance on argparse, and I'll make my own. I'm available on discord, as usual, to discuss up until then.
ED: discussed, and see below
I've updated this to not use argparse and flags. While both the time and reason remain optional, now the time must be provided first if it is going to be provided.
I've also decided to leave the original timedelta converter without reason support in the PR as I do still think this is a useful utility for other creators, but this can be removed if this is no longer wanted there.
Stuff here needs some more cleaning up, and likely re-handling after or with #2232 . Stale for now
Can you move
redbot.core.converter.timedelta_converterin a different pull request, or reopen #2126 because I need the converter in my cogs and knowing that this PR is frozen is not really reassuring for me...As 3.0.0 is in RC phase and not receiving new features, you should use a cog local converter if you need it before 3.1 when this would be included.
Closing this as I will not have the time to have a polished implementation of this before 3.1
The approach used here should likely not be reused after conversations in discord anyway.
Pull request closed