No username in modlog entries #3443
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#3443
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?
Command bugs
Command name
hackban, reason
What cog is this command from?
Mod, ModLog
What were you expecting to happen?
ModLog entry should show a nickname and/or username.
What actually happened?
For users that aren't in the server, the ModLog entry shows no information indicating what user the entry is for.
How can we reproduce this issue?
Moderate or update a ModLog entry for any user not in the server or not in the bot's cache.
This is intended behavior. If the user isn't cached in the bot it will be unknown user. It was done to reduce the amount of fetch calls done to discord server to avoid 403s.
Intentional, Modlog fetching user info was causing rate-limit issues. Fetching user info is an extremely limited operation compared to many others.
Could it not keep at least the user ID or username that is already in the modlog entry, instead of wiping it?
This image uses the non-embedded form but the scenarios do not differ between the two here.
In the first one, the user was in the bot's cache, so we kept the name and ID.
In the second one, the user wasn't in the bot's cache. We don't have the name and don't fetch it, but we keep the ID.
In the third one, we had both the name and id, but we discard the name to avoid modlog being used by bots to advertise, keeping the ID.
In no circumstance do we not at least store the ID. We are guaranteed to always have this when the bot is performing a ban.
My mistake. Misunderstood a piece of what was said when reading this before. The embedded form is differing in an unintended way and this is the issue, not the name not being present itself.
I'd like to reopen this issue as today I noticed a problem by following these steps:
[p]reason[Unknown or Deleted User] (ID)This makes the modlog entry itself less useful for future moderation checks and throws away information that was already present, which IMO is not a behaviour that one would reasonably expect. I'd rather have outdated information rather than no information at all.
Quick summary of discussion in Discord:
Which means we need modlog to store what was name#discrim that was available at the original action, if any and change how some of the updating happens.