2
1
Fork
You've already forked mxbt
0

Reaction Action system #7

Open
opened 2024年06月09日 13:46:40 +02:00 by warlock · 0 comments

Well, using custom params in event.source['content'] dict we can implement reaction-actions system, which will be do action on specific reaction from specific (or not) user.

I guess we need to add Listener.on_action(ctx: Context) listener, add Context.action parameter and add **params parameter into all sending methods in Bot. With that we can include any custom data in sending event and add something like that:

{
 "content" : {
 ...
 "org.mxbt.custom" : {
 "👍" : {
 "action" : "kick"
 } 
 }
 }
}
Well, using custom params in `event.source['content']` dict we can implement reaction-actions system, which will be do action on specific reaction from specific (or not) user. I guess we need to add `Listener.on_action(ctx: Context)` listener, add Context.action parameter and add `**params` parameter into all sending methods in `Bot`. With that we can include any custom data in sending event and add something like that: ```json { "content" : { ... "org.mxbt.custom" : { "👍" : { "action" : "kick" } } } } ```
Sign in to join this conversation.
No Branch/Tag specified
master
pages
mkdocs
0.3.7
0.3.6
0.3.5
0.3.4.1
0.3.4
0.3.3
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
librehub/mxbt#7
Reference in a new issue
librehub/mxbt
No description provided.
Delete branch "%!s()"

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?