Implement warning by user ID. #6445

Closed
opened 2024-09-02 04:33:37 +02:00 by RdrSeraphim · 4 comments
RdrSeraphim commented 2024-09-02 04:33:37 +02:00 (Migrated from github.com)

What component of Red (cog, command, API) would you like to see improvements on?

warnings

Describe the enhancement you're suggesting.

It seems that this was once behavior for the cog a long while ago, but I would like to propose allowing warns by user ID. It would be useful to warn IDs of users who, say, violated a rule but left before any warning could be given.

Anything else?

I'm not sure how this would intersect with warn actions, I'm not sure how the cog would perform these on absent users. I would also be willing to try and take this enhancement on if that would be preferable. My current line of thought would be to replicate the member param validation from [p]warnings and ignore DMing if the member isn't present.

### What component of Red (cog, command, API) would you like to see improvements on? warnings ### Describe the enhancement you're suggesting. It seems that this was once behavior for the cog a long while ago, but I would like to propose allowing warns by user ID. It would be useful to warn IDs of users who, say, violated a rule but left before any warning could be given. ### Anything else? I'm not sure how this would intersect with warn actions, I'm not sure how the cog would perform these on absent users. I would also be willing to try and take this enhancement on if that would be preferable. My current line of thought would be to replicate the member param validation from `[p]warnings` and ignore DMing if the member isn't present.
Needless2Say commented 2024-11-02 21:07:59 +01:00 (Migrated from github.com)

Hi, can I take this?

Hi, can I take this?
aikaterna commented 2024-11-02 23:31:47 +01:00 (Migrated from github.com)

We don't assign non-members to issues. Feel free to work on it if you wish.

We don't assign non-members to issues. Feel free to work on it if you wish.
Flame442 commented 2024-11-24 19:55:09 +01:00 (Migrated from github.com)

At least as far back as the start of V3, warnings has always taken a Member as the argument (ref). Perhaps you are thinking of [p]ban or similar commands?

As you pointed out, this seems a little hard to address given the nature of a warnings based cog. warnings allows actions to run any arbitrary command on the user, and cannot guarantee that the command will succeed if given an ID of a user who has left the server. It would make sense to allow a [p]warn that would give enough points to execute the [p]ban command to be used on a user who has left the server, since a user who is at that tier should be banned regardless of if they try to rejoin the server, and the ban command is able to accept IDs of members not in the server. However, something like [p]timeout which requires the user to be in the server would need to wait for them to rejoin (resulting in the timeout length not starting until after they rejoined, for better or for worse). There is no easy way for warnings to tell the difference between these cases and handle them individually. The only option that could work is always waiting until the user rejoins, but that requires the bot to be online when the user joins for them to be punished.

I am not certain if that added complexity is worth the effort for this edge case. If a disruptive user is leaving before a moderator is able to take action, it may often make sense to consider them a troll and bypass the server's standard warnings track.

At least as far back as the start of V3, `warnings` has always taken a `Member` as the argument ([ref](https://github.com/Cog-Creators/Red-DiscordBot/commit/c1ac78eea4f036c377f70799112cd544e3a14ee5#diff-1fa0574b7404468882355fe1f64fa85f3efec457da84180904112ddb54f41d17R222)). Perhaps you are thinking of `[p]ban` or similar commands? As you pointed out, this seems a little hard to address given the nature of a warnings based cog. `warnings` allows actions to run any arbitrary command on the user, and cannot guarantee that the command will succeed if given an ID of a user who has left the server. It would make sense to allow a `[p]warn` that would give enough points to execute the `[p]ban` command to be used on a user who has left the server, since a user who is at that tier should be banned regardless of if they try to rejoin the server, and the ban command is able to accept IDs of members not in the server. However, something like `[p]timeout` which *requires* the user to be in the server would need to wait for them to rejoin (resulting in the timeout length not starting until after they rejoined, for better or for worse). There is no easy way for `warnings` to tell the difference between these cases and handle them individually. The only option that could work is always waiting until the user rejoins, but that requires the bot to be online when the user joins for them to be punished. I am not certain if that added complexity is worth the effort for this edge case. If a disruptive user is leaving before a moderator is able to take action, it may often make sense to consider them a troll and bypass the server's standard `warnings` track.
Ascensionn commented 2024-11-26 21:21:58 +01:00 (Migrated from github.com)

I am not certain if that added complexity is worth the effort for this edge case. If a disruptive user is leaving before a moderator is able to take action, it may often make sense to consider them a troll and bypass the server's standard warnings track.

So yes, so in that case I can modify the [p]warn command to ban the user by their ID if they have already left the server. I also believe it is fair to assume they are a troll and should not be allowed back in the server.

> I am not certain if that added complexity is worth the effort for this edge case. If a disruptive user is leaving before a moderator is able to take action, it may often make sense to consider them a troll and bypass the server's standard `warnings` track. So yes, so in that case I can modify the [p]warn command to ban the user by their ID if they have already left the server. I also believe it is fair to assume they are a troll and should not be allowed back in the server.
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6445
No description provided.