Delete modlog cases #3927
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#3927
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Feature request
Select the type of feature you are requesting:
Describe your requested feature
As asked on the Red server, a way for modlog cases to be deleted.
I think this is needed as it is stored data, and should be able to be deleted at a user's request. However, that also raises the concern of administrative actions being hidden, so I propose it being guild owner only.
I think theres room for 2 commands here. ( or one depending how we want the user to interface with command)
one to delete specific cases.
One to delete multiple cases, either by id or category say all mute cases. etc.
To reiterate our discussion from #features-ideas:
User will have to request manually data's deletion and only admin will be able to delete modlog cases to avoid abuse.
Now the question is, do wen want to check this with
.admin()so that permissions cog can change it or with.is_admin()so that it's hardlocked for guild admins.Edit:
.is_admin()is not part of checks but can be found here https://docs.discord.red/en/stable/framework_bot.html#redbot.core.bot.RedBase.is_adminI don't think modlog cases should be deletable by anyone other than the guild owner. (and even that, I don't think should actually be possible)
They serve as a record of accountability.
Beyond this, they don't store any data which are covered under any of the data protection laws except if someone is going beyond what red does to sell the data, something discord already forbids. They at most contain data provided to the bot for the purpose of the bot (mod action reasons) and data required for the reasonable operation of the bot (history of use/abuse by users and mods)
If this would be implement, would we need to delete both the config entry and all messages referencing the casetype? Because that sounds pretty impossible. Deleting config on the other hand is more or less trivial though
The modlog has the message ID. So a direct message delete can be done with a single channel.fetch_message.
But I would say optional, like an extra arg to delete the message. By default only deletes the modlog entry?
Well, what if someone uses
[p]casesforthose message IDs don't get saved anywhere.is this still needed now that the data deletion API exists and it can remove the portions of data which actually have a reason to be deleted?
Imo data deletion API is enough
I wouldn't say this fully resolved
I.e guild owner deleting multiple cases if there's a need for it
I don't quite see how that need could ever arise?
in what world is it not enough? a case is a record of an action taken. Even if the action was in error, it's a record of that error allowing actions taken on that error. There's no reason to delete it if anything sensitive can be sanitized in it already.
As I server owner I had the need to remove cases before, if I have had the need others are bound to have wanted to do the same in the past or need in the future.
What was the use case? you say you had a need for it without saying anything more. Cases can be amended already to indicate if there was an error, but outright deletion of the case defeats the reason for a modlog existing.
As a server owner I've accidentally taken moderation actions which I as a server owner wanted completely removed from the server if it doesn't need to be in the server it also doesn't need to be in the bot.
I still stand as wanting cases to be deleted as both a bot owner and a server owner. As a bot owner if there's no need for a case I don't want resources being used for no reason.
If this capability is added, I'd want it off by default and locked behind a bot owner setting, with the perms when enabled being guild owner and not modifiable by permissions. An update shouldn't change the way in which this can function, and as a host, I don't want to have an update changing something which functions as an audit tool.
It should be a normal command that a guild owner can run there's no reason it should need to be enabled by the bot owner, the bot is serving a server if the server owner wants it gone why is the bot owner keeps the data? It's not for operation since the server doesn't want it.
As a host, I don't want things that function as audit trails changing. You see it as for a server, but it also serves as an implicit log of actions done in a server for the bot owner to investigate if the server claims they did/didn't do something.
You input will be taken into consideration if/when this feature is designed.
And if at the time we deem having it off is the best for all users then we will implement it as such after all the want to ensure Red is a project that works for all users.
To be honest I don't see a pressing need for this feature, however if it is to be implemented it should 100% only be allowed to be issued by the server owner, otherwise it undermines the entire purpose of the mod-log.
Erledigt in
17023c74f. Neu:modlog.delete_case()in der API und der Befehl[p]deletecase <number>(mit Bestätigung). Er löscht den Fall und seine Nachricht im Modlog-Kanal; die übrigen Fallnummern bleiben unverändert.get_latest_case()fällt auf den neuesten verbleibenden Fall zurück, wenn der letzte gelöscht wurde.Generated by Claude Code