Custom this
BotCommand #48
No reviewers
Labels
No labels
Automated
Backlog
Post_Prototype_1.0
Bot_Code
Core
Bot_Code
Custom
CI/CD
Complexity
Advanced
Complexity
Basic
Complexity
Expert
Complexity
Intermediate
Kind/Breaking
Kind/Bug
Kind/Bug Fix
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Nix
Ownership
Collab
Ownership
Collab with Leads
Ownership
Individual Lead
Ownership
In-Review
Ownership
Needs Owner > May Delegate
Ownership
Workshop with Leads
Phase 1.0
Requirements > Drafting
Phase 1.0
Requirements > Researching
Phase 1.0
Requirements > Review & Planning
Phase 2.0
Design > Research & Analysis
Phase 3.0
Coding > Implementation
Phase 4.0
QA > Unit Testing & Design
Phase 5.0
Resolution > Completed
Phase 5.0
Resolution > Review for Completion
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Depends on
#52 Retrieve Reply information from
ExecBodyParams
modulatingforce/forcebot_rs
Reference: modulatingforce/forcebot_rs#48
Loading…
Reference in a new issue
No description provided.
Delete branch "say-this-guy"
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?
this
would issue a fun notification back in the replyFor example :
In the future, maybe it could be enhanced to do other things or have additional enhanced logic
At Custom Module Level, use the
Chat
module functions mentioned here to say in reply to chat#43 (comment)
Functional Use Case - Twitch Chatter
BotCommand
, I can run thatBotCommand
<botprefix>this
. For example<botprefix>this fking guy ICANT
Code Difficulty
Low Difficulty and Relatively Small Code Change
However, delegating has it's advantages :
Plan of Action :
BotCommand
calledthis
BotCommand
. Logic should include checking if what was responded to was a replyChat
module to Send messages to users or elsehwere #43say_in_reply_to()
so responds to the userJust in case if helpful
Working Custom Module Example
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/main/src/custom/experimental/experiment001.rs#L100
Working Custom Module Example
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/main/src/custom/experimental/experiment001.rs#L106-L107
Source Definition
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/main/src/core/bot_actions.rs#L15-L19
I believe I got it to work on a local . Without pushing, see if these recommendations help. This will also help future documentation
LULE I could push what I have, but let's see if you could get it to work also . You pretty much had what you needed, just in the wrong places to load
Code Recommendation
custom.rs
, add the followinga. NOTE - if you have borrowing issues, you can clone() the Arc for one of the values earlier like so
Move the
thisguy.rs
file into the custom folderRemove the other stuff that was added before
Additional Information
1. Core Implementation on Loading Modules
Note : This is not critical to know when creating custom modules are loaded
In Core , when the ModulesManager is first constructed, it calls the Fixed paths for custom.rs & core.rs (below)
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/say-this-guy/src/core/botmodules.rs#L612-L617
So when defining new modules ensure they are references in either of those points - more than likely custom.rs
For example, below is loading the experimental module
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/say-this-guy/src/custom.rs#L15
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/say-this-guy/src/custom.rs#L24
2. Modules loaded are logged
Logs show just after the above process what has been loaded into the bot from commands from main. You'll see log entries similar to the following
This may be helpful :
sayout
that checks for messages that are considered replies .Below sample is taking the reply body
https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/main/src/custom/experimental/experiment002.rs#L72-L75
ExecBodyParams
#52ExecBodyParams
Hi @HaruYuumei
As discussed, #52 has been merged into master
To update the branch on this PR, please
** You can do this directly on this forge
Just FYI, doing this (from this Feature Branch, Update Branch by Merge), it will take the changes from Main/Master and add them onto this Feature Branch without changing either branch's commit history
The above is generally the most common way unless you're looking to reorganize / cleanup commit history . It generally also does not have issues
As a comparison, if you Update Branch by Rebase, you're changing the history of the feature branch by having all main/master branch be applied first before feature branch commits
For more information : https://www.atlassian.com/git/tutorials/merging-vs-rebasing
Generally, when Updating your feature set, I would say :
Use the Update Branch by Merge Option
If there are issues merging (e.g., merge conflict), we can address this afterwards, possibly by :
a. attempting the same merge locally (with Feature checked out, merge master into feature), and resolving the merge conflicts
OR
b. attempting to Update Branch by Rebase (try the forge first ; but if the forge also finds conflicts, try to do the rebase locally, and resolve the conflicts)
When there's a merge conflict, the source files will be in a state where you can pick which changes are in conflict by deleting the unwanted change between the two > and then stage & commit that resolving merge conflict as a normal commit
More information :
https://www.simplilearn.com/tutorials/git-tutorial/merge-conflicts-in-git
Hope that helps!
Haru going to try the above at some point today
If there are issues, we'll troubleshoot those issues on this branch and use whatever we learn for merges needed for textmods
Hi @HaruYuumei
Could you try this locally? Pull this branch down - you should also get a compile error when
cargo build
. Afterwards, try the suggestion to make sure it buildsAfterwards, push up
@ -0,0 +34,4 @@
botlock
.botmgrs
.chat
.say_in_reply_to(¶ms.msg, a, params.clone())
We're getting an error here in ci/cd
Recommend this be adjusted to
@HaruYuumei could you review and address the warnings first? Thank you!
@ -0,0 +57,4 @@
Broadcaster
],
}
.add_to_modmgr(Arc::clone(&mgr))
@HaruYuumei CI/CD is throwing a warning for this line
To improve our coding, CI/CD is set to a relatively strict level - the following:
Could you run that locally? Read through the errors that are returned - these lints usually have links to sites that help explain what might be best and why
Take your time on this though if required!
looks like it was a reference that was not actually needed should be alright now 😄
CI/CD looks good
Approving
WIP: Customto Customthis
BotCommandthis
BotCommand