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
Merge branch 'main' into vip-badge
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
847d790513
moved demote promote
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
acfcae975e
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
unit tests
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
feff709714
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 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.