Skip to content

Infraction subcommand for amending infraction reasons #1170

@purefunctor

Description

@purefunctor

Motivation

Currently, the only way to amend an infraction reason is to search and copy the original reason before invoking

!infr edit (last|infr_id) {old_reason} (Edit|Context): {amended_reason}

An infr subcommand that abstracts this action would allow for a nicer interface, at least in my opinion, especially for amending infractions that were needed to be handed out quickly.

Proposed Implementation

A subcommand that's similar in form to infraction_edit to be called infraction_amend (à la git commit --amend) first looks up the original reason for the infraction (possibly using this routine), amending the new reason prefixed with either Edit: or Context: , and then invoking infraction_edit. The infraction duration can also be edited by passing the appropriate parameters and the new duration could also possibly be amended automatically to the message.

Example Usage:

> !infr amend last This member had `...`
] Spamming in #python-general. Edit: This member had `...`

> !infr amend 512 1h This member had ...
] Spamming in #python-general. Edit: This member had `...`. Infraction incremented/reduced to `...` from `...`.

Metadata

Metadata

Assignees

Labels

a: moderationRelated to community moderation functionality: (moderation, defcon, verification)s: WIPWork In Progresst: featureNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions