Recognize VIP badge as Special Roles #44

Merged
modulatingforce merged 9 commits from vip-badge into main 2024-03-25 22:38:02 -04:00

Changes should include The following related to Channel VIP :

  • Add in ChatBadge for Channel VIPs . Similar to Bot Channel Mods
  • There should be functionality so that actual Channel VIPs automatically become Bot Channel VIPs
  • promote / demote be considered adjusted to set VIPs ?
    • Understanding there may be a pipeline for set / get BotCommands (though no PR yet) , I could use existing promote / demote to add in any VIP handling logic (mostly the auto VIP portion)

Plan of Action :

  • Add ChatBadge VIP
    • Code & Adjust
    • QA Test
  • Enhance promote / demote
    • Code & Adjust
    • QA Test
  • Consider Creating Units Tests
  • Enhance Existing experiment02.sayout() BotCommand so it
    • allows VIPs to run it
    • Validates whether the Chatter has special roles in the target channel as well before sending
  • Clippy & Comments cleanup
Changes should include The following related to Channel VIP : - Add in ChatBadge for Channel VIPs . Similar to Bot Channel Mods - There should be functionality so that actual Channel VIPs automatically become Bot Channel VIPs - `promote` / `demote` be considered adjusted to set VIPs ? - Understanding there may be a pipeline for `set` / `get` BotCommands (though no PR yet) , I could use existing `promote` / `demote` to add in any VIP handling logic (mostly the auto VIP portion) --- # Plan of Action : - [x] Add ChatBadge VIP - [x] Code & Adjust - [x] QA Test - [x] Enhance `promote` / `demote` - [x] Code & Adjust - [x] QA Test - [x] Consider Creating Units Tests - [x] Enhance Existing `experiment02.sayout()` BotCommand so it - allows VIPs to run it - Validates whether the Chatter has special roles in the target channel as well before sending - [x] Clippy & Comments cleanup
modulatingforce added this to the Prototype 1.0 milestone 2024-03-24 13:25:54 -04:00
modulatingforce added the
Priority
Low
Kind/Enhancement
labels 2024-03-24 13:25:54 -04:00
modulatingforce added this to the Rust Learning project 2024-03-24 13:25:54 -04:00
modulatingforce self-assigned this 2024-03-25 16:32:00 -04:00
modulatingforce added 1 commit 2024-03-25 16:33:02 -04:00
Merge branch 'main' into vip-badge
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
847d790513
modulatingforce added 4 commits 2024-03-25 19:37:35 -04:00
moved demote promote
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
acfcae975e
modulatingforce added 2 commits 2024-03-25 20:24:35 -04:00
promote/demote checks invalid arg flag
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
e66985814a
Author
Owner

Possible Unit Tests

Doesn't have to be exhaustive. Just tests some of the core features from this PR

Workflow 1 - Channel Elevated User Promotes/Demotes VIP

  1. Requester has a Mod Role
  2. assert getspecialuserroles for Target Chatter
  3. Requester Promotes a Target Chatter to VIP
  4. assert getspecialuserroles for Target Chatter
  5. Requester Promotes a Target Chatter to VIP
  6. assert getspecialuserroles for Target Chatter
  7. Requester Demotes a Target Chatter from VIP
  8. assert getspecialuserroles for Target Chatter
  9. Requester Demotes a Target Chatter from VIP
  10. assert getspecialuserroles for Target Chatter

Workflow 2 - Auto VIP

  1. Requester has a VIP Badge Role , but no Roles Yet
  2. assert getspecialuserroles for Requester
  3. Run canuserrun() for the Requester . (This is ran after BotCommands are ran)
  4. assert getspecialuserroles for Requester has been Auto VIPed
# Possible Unit Tests _Doesn't have to be exhaustive. Just tests some of the core features from this PR_ ## Workflow 1 - Channel Elevated User Promotes/Demotes VIP 1. Requester has a Mod Role 2. assert `getspecialuserroles` for Target Chatter 3. Requester Promotes a Target Chatter to VIP 4. assert `getspecialuserroles` for Target Chatter 5. Requester Promotes a Target Chatter to VIP 6. assert `getspecialuserroles` for Target Chatter 7. Requester Demotes a Target Chatter from VIP 8. assert `getspecialuserroles` for Target Chatter 7. Requester Demotes a Target Chatter from VIP 8. assert `getspecialuserroles` for Target Chatter ## Workflow 2 - Auto VIP 1. Requester has a VIP Badge Role , but no Roles Yet 2. assert `getspecialuserroles` for Requester 3. Run `canuserrun()` for the Requester . (This is ran after `BotCommands` are ran) 4. assert `getspecialuserroles` for Requester has been Auto VIPed
modulatingforce added 1 commit 2024-03-25 21:40:50 -04:00
unit tests
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
feff709714
modulatingforce added 1 commit 2024-03-25 21:50:47 -04:00
clippy & comments cleanup
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
de2ef03661
modulatingforce changed title from WIP: Recognize VIP badge as Special Roles to Recognize VIP badge as Special Roles 2024-03-25 21:51:21 -04:00
modulatingforce merged commit b9227cc72b into main 2024-03-25 22:38:02 -04:00
modulatingforce deleted branch vip-badge 2024-03-25 22:38:02 -04:00
Sign in to join this conversation.
No reviewers
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: modulatingforce/forcebot_rs#44
No description provided.