[Mod] Make tempbans permanent when using [p]hackban #4025
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!4025
Loading…
Reference in a new issue
No description provided.
Delete branch "patch-2"
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?
Type
Description of the changes
Closes #2898 by removing the user entry in the list of current tempbans which prevents them from bein automatically unbanned.
This is now fully tested and definitely functional. I added the info that a tempban was upgraded to a permaban as an "error" so it would show in the result of the command because it seemed like the best and easiest option. I don't think that this info should be "left out" and isn't necessarilly worth the effort of adding additional handling in the output function.
You're absolutely right... I thought I needed those for the user IDs specifically (don't ask me how that got into my brain). I put them up top to where the other local variables are defined.
Looks good, there's just one issue with the message shown on successful "upgrade" to a permaban.
@ -360,4 +377,3 @@)user_ids = remove_processed(user_ids)This shouldn't show under errors - this is just an additional information about the ban, it's not an error. I don't have any specific way of showing it in mind though (if we do want to show this information).
@ -360,4 +377,3 @@)user_ids = remove_processed(user_ids)I think it's important to show that an upgrade happen and made some changes. Let me know what you think of them.
Just two small things that should be changed here and it should be good to go.
@ -292,6 +292,7 @@ class KickBanMixin(MixinMeta):using this command"""You can just use a list and append IDs to it instead of using a dict with two same values.
@ -300,6 +301,11 @@ class KickBanMixin(MixinMeta):if errors:It would probably be better to use a humanised list (
humanize_list()util) here, rather than put each user ID in separate line.@ -292,6 +292,7 @@ class KickBanMixin(MixinMeta):using this command"""yes... that would've been smart
Looks good to me, thanks for the PR.