Feature request, core modlog.py, Add Timestamp for sanitized embeds. #4118
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#4118
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
Add Timestamp for sanitization outside embeds with core modlog python file.
Select the type of feature you are requesting:
Describe your requested feature
Referencing code section:
github.com/Cog-Creators/Red-DiscordBot@28b5be21b3/redbot/core/modlog.py (L380-L394)We should have the timestamp being shown on the sanitized embed of the current case as seen below
Result:

I'm curious on why you want this as its own separate field, as discord provides an timestamp on the message.
Time stamp of the current warning, not the current date and time of the message*
example:

test warns from March 1st and Second
No time stamp,
with timestamp

Kowlin means this:

Time of case creation and time of message creation are pretty much equivalent, unless I'm missing something.
It'll be good to have when checking overall logs of a single user, seeing when their strike/ flag/ action was taken against them
I can see how the lack of that info in non-embed variants of
[p]casesforand[p]casecommands is an issue. Considering that we would have to add it to those commands, we probably could also add it to the message in modlog channel as well, although I still haven't heard a use case from you that isn't already fulfilled by the timestamp of the sent message in modlog channel.Also, it doesn't seem like you're using core modlog cog for this - the command output is different from the one in that cog.
They're using my version of
[p]casesforwhich adds the lines. Casereader in https://github.com/Dav-Git/Dav-Cogs It does in fact print out standard modlog entries though.this
Still the core modlog system just using extendedmodlog for better managing of warnings.
as editing modlog core file affects the output of sanitized modlogs as i shown in the start
github.com/Cog-Creators/Red-DiscordBot@28b5be21b3/redbot/core/modlog.py (L380-L394)addthing this in the modlog core file
Affects the output of the sanitizing.
This doesn't belong in the message content method IMO. Things displaying it (including core's
casesforshould add the timestamp to the display (they have access to it) if needed, but this method is also used for things such as the immediate sending where the timestamp would just be noise.Could always add optional keyword argument for that so that
[p]casesforand[p]casecommands could still utilise the same method.I don't use modlog myself, but same as you, I was thinking that this might be considered noise for some (it isn't so much for me but I am not modlog user) so I'm inclined to agree that it most likely shouldn't be changed.
I'm not sure of the top of my head if modlog cases always contain a timestamp. If that's teh case I'd agree that this should be implemented in
casesforandcaseinstead of being added to all modlog messages.They should up on the embed of casesfor and case, but do not show up on the sanitized version,
Ref for embed: Line 377
github.com/Cog-Creators/Red-DiscordBot@28b5be21b3/redbot/core/modlog.py (L357-L378)Compared to sanitized which as no date or time of the warn for the case
Ref:
github.com/Cog-Creators/Red-DiscordBot@28b5be21b3/redbot/core/modlog.py (L379-L394)No date is included.
I would find it useful to have the date of action included in the 'clean' version of the warn/strike/ etc, im sure other users will find it useful aswell.
Having a timestamp in the sanitize version is no different than a embed, unless adding a new text line breaks the bot, which i have found it does not break anything, including these cogs

The timestamp of action in a the cleaned version of embed is super useful, it adds no new functions or adds new calls that could interfere
I do would like to know where would this be noise at? Example?
When modlog cases are created, (ie right when the action is taken) they also get sent to the modlog channel using message content. As this is happening right at the time of the action, adding the timestamp to it here is just noise, as the time of the message is also the time of the action.
This can be better solved by things which display modlog cases for later viewing actually utilizing the attributes of the cases, rather than putting it here.