summaryrefslogtreecommitdiff
path: root/src/wasp-event-handlers-binary.el
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-11-07 00:20:02 -0500
committerLLLL Colonq <llll@colonq>2025-11-07 00:20:02 -0500
commitcf266a56f30daae8b9af7c9bc3267c61b1973192 (patch)
treef365939f712973840ff19d9265c552af820cd1ef /src/wasp-event-handlers-binary.el
parent3d31c488fb06e9937964041f4d83d0cb1c9699ab (diff)
Update
Diffstat (limited to 'src/wasp-event-handlers-binary.el')
-rw-r--r--src/wasp-event-handlers-binary.el47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/wasp-event-handlers-binary.el b/src/wasp-event-handlers-binary.el
index b7df863d..acdc2616 100644
--- a/src/wasp-event-handlers-binary.el
+++ b/src/wasp-event-handlers-binary.el
@@ -13,27 +13,26 @@
(setf
w/bus-binary-event-handlers
(list
- (cons "monitor twitch chat incoming"
+ (cons "fig monitor twitch chat incoming"
(lambda (d)
- (message "incoming: %s" d)
(-let [(user stags msg) (s-split-up-to " " (w/utf8 d) 2)]
(w/twitch-handle-incoming-chat
user
(--map (s-split "\t" it) (s-split "\n" stags))
msg))))
- (cons "monitor twitch redeem incoming"
+ (cons "fig monitor twitch redeem incoming"
(lambda (d)
- (-let [(user redeem input) (s-split-up-to " " (w/utf8 d) 2)]
+ (-let [(user redeem input) (s-split-up-to "\t" (w/utf8 d) 2)]
(w/twitch-handle-redeem-helper user redeem input))))
- (cons "frontend redeem incoming"
+ (cons "fig web redeem incoming"
(lambda (d)
(-let [(user redeem input) (s-split-up-to "\t" (w/utf8 d) 2)]
(w/twitch-handle-redeem-helper user redeem input 1000))))
- (cons "monitor twitch raid"
+ (cons "fig monitor twitch raid"
(lambda (d)
(let ((user (w/utf8 d)))
(soundboard//play-clip "rampage.mp3")
- (w/write-chat-event (format "%s just raided!" user))
+ (w/chat-write-event (format "%s just raided!" user))
(w/friend-respond (format "%s just came to visit" user))
(run-with-timer
15 nil
@@ -46,50 +45,50 @@
(if clips
(w/model-region-video "hair" (car clips))
(w/model-region-user-avatar "hair" user)))))))))
- (cons "monitor twitch follow"
+ (cons "fig monitor twitch follow"
(lambda (d)
(let ((user (w/utf8 d)))
(soundboard//play-clip "firstblood.mp3")
(w/model-region-word "skin" (format "welcome_%s_" user))
(w/friend-respond (format "%s just followed the stream" user))
- (w/write-chat-event (format "New follower: %s" user)))))
- (cons "monitor twitch subscribe"
+ (w/chat-write-event (format "New follower: %s" user)))))
+ (cons "fig monitor twitch subscribe"
(lambda (d)
(let ((user (w/utf8 d)))
(w/thank-sub user)
(w/model-region-word "skin" (format "thanks_%s_" user))
(w/friend-respond (format "%s just subscribed to the stream" user))
- (w/write-chat-event (format "New subscriber: %s" user)))))
- (cons "monitor twitch gift"
+ (w/chat-write-event (format "New subscriber: %s" user)))))
+ (cons "fig monitor twitch gift"
(lambda (d)
(-let [(user subs) (s-split-up-to " " (w/utf8 d) 2)]
(unless (s-equals? user "lcolonq")
(w/model-region-word "skin" (format "thanks_%s_" user))
(w/friend-respond (format "%s just gifted subscriptions" user))
- (w/write-chat-event (format "%s gifted %d subs" user subs))
+ (w/chat-write-event (format "%s gifted %d subs" user subs))
(soundboard//play-monsterkill subs)))))
- (cons "monitor twitch poll begin"
+ (cons "fig monitor twitch poll begin"
(lambda (_)
- (w/write-chat-event "Poll started")
+ (w/chat-write-event "Poll started")
(w/friend-respond "The chatters are doing a poll")))
- (cons "monitor twitch poll end"
+ (cons "fig monitor twitch poll end"
(lambda (d)
(let*
- ( (sp (s-split " " (w/utf8 d)))
- (choices (--map (s-split "," it) (cdr sp)))
- (winner (car (-max-by (-on #'> #'cadr) choices))))
- (w/write-chat-event (format "Poll finished, winner is: %s" winner))
+ ( (sp (s-split "\n" (w/utf8 d)))
+ (choices (--map (-let [(o v) (s-split "\t" it)] (cons o (string-to-number v))) (cdr sp)))
+ (winner (car (-max-by (-on #'> #'cdr) choices))))
+ (w/chat-write-event (format "Poll finished, winner is: %s" winner))
(when w/twitch-current-poll-callback
(funcall w/twitch-current-poll-callback winner))
(setq w/twitch-current-poll-callback nil))))
- (cons "monitor twitch prediction begin"
+ (cons "fig monitor twitch prediction begin"
(lambda (d)
- (w/write-chat-event "Gamble started")
+ (w/chat-write-event "Gamble started")
(w/friend-respond "The chatters are gambling")
(setq w/twitch-current-prediction-ids (w/utf8 d))))
- (cons "monitor twitch prediction end"
+ (cons "fig monitor twitch prediction end"
(lambda (_)
- (w/write-chat-event "Gamble finished")
+ (w/chat-write-event "Gamble finished")
(setq w/twitch-current-prediction-ids nil)))
))