[Mod] Make tempbans permanent when using [p]hackban #4025

Merged
Dav-Git merged 9 commits from patch-2 into V3/develop 2020-07-08 01:15:42 +02:00
Dav-Git commented 2020-06-28 19:01:59 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Closes #2898 by removing the user entry in the list of current tempbans which prevents them from bein automatically unbanned.

### Type - [X] Bugfix - [ ] Enhancement - [ ] New feature ### Description of the changes Closes #2898 by removing the user entry in the list of current tempbans which prevents them from bein automatically unbanned.
palmtree5 (Migrated from github.com) reviewed 2020-06-28 19:01:59 +02:00
Dav-Git commented 2020-06-28 19:29:46 +02:00 (Migrated from github.com)

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.

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.
Jackenmen (Migrated from github.com) reviewed 2020-06-28 19:39:45 +02:00
Dav-Git (Migrated from github.com) reviewed 2020-06-28 20:18:13 +02:00
Dav-Git (Migrated from github.com) commented 2020-06-28 20:18:13 +02:00

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.

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.
Jackenmen (Migrated from github.com) requested changes 2020-07-07 02:06:58 +02:00
Jackenmen (Migrated from github.com) left a comment

Looks good, there's just one issue with the message shown on successful "upgrade" to a permaban.

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)
Jackenmen (Migrated from github.com) commented 2020-07-07 02:00:30 +02:00

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).

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).
Dav-Git (Migrated from github.com) reviewed 2020-07-07 11:05:53 +02:00
@ -360,4 +377,3 @@
)
user_ids = remove_processed(user_ids)
Dav-Git (Migrated from github.com) commented 2020-07-07 11:05:53 +02:00

I think it's important to show that an upgrade happen and made some changes. Let me know what you think of them.

I think it's important to show that an upgrade happen and made some changes. Let me know what you think of them.
Jackenmen (Migrated from github.com) requested changes 2020-07-07 19:21:28 +02:00
Jackenmen (Migrated from github.com) left a comment

Just two small things that should be changed here and it should be good to go.

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"""
Jackenmen (Migrated from github.com) commented 2020-07-07 19:15:17 +02:00

You can just use a list and append IDs to it instead of using a dict with two same values.

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:
Jackenmen (Migrated from github.com) commented 2020-07-07 19:16:50 +02:00

It would probably be better to use a humanised list (humanize_list() util) here, rather than put each user ID in separate line.

It would probably be better to use a humanised list (`humanize_list()` util) here, rather than put each user ID in separate line.
Dav-Git (Migrated from github.com) reviewed 2020-07-07 21:42:31 +02:00
@ -292,6 +292,7 @@ class KickBanMixin(MixinMeta):
using this command"""
Dav-Git (Migrated from github.com) commented 2020-07-07 21:42:31 +02:00

yes... that would've been smart

yes... that would've been smart
Jackenmen (Migrated from github.com) approved these changes 2020-07-08 01:15:32 +02:00
Jackenmen (Migrated from github.com) left a comment

Looks good to me, thanks for the PR.

Looks good to me, thanks for the PR.
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!4025
No description provided.