;;; wasp-twitch-chat-commands --- Twitch chat commands -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'soundboard) (require 'wasp-twitch) (require 'wasp-ai) (require 'wasp-8ball) (require 'wasp-tcg) ;; gizmos (require 'wasp-pronunciation) (setq w/twitch-chat-commands (list (cons "!commands" (lambda (_ _ _) (w/twitch-say (s-truncate 500 (s-concat "Available commands: " (s-join " " (--filter (s-contains? "!" it) (-map #'car w/twitch-chat-commands)))))))) (cons "MRBEAST" (lambda (_ _ _) (soundboard//play-clip "mrbeast.mp3"))) (cons "NICECOCK" (lambda (_ _ _) (soundboard//play-clip "pantsintoashes.mp3"))) (cons "hexadiCoding" (lambda (_ _ _) (soundboard//play-clip "developers.ogg"))) (cons "ProgrammingTime" (lambda (_ _ _) (soundboard//play-clip "emacslisp.ogg"))) (cons "roguelike" (lambda (uid user _) (w/twitch-say (if (= 0 (random 20)) (format "@%s that is a roguelike :3" user) (format "@%s that's not a roguelike" user))))) (cons "arch btw" (lambda (uid _ _) (w/twitch-say "I use nix btw"))) (cons "Joel" (lambda (uid _ _) (cl-incf w/chat-joel-count) (w/chat-update-header-line))) (cons "+2" (lambda (uid _ _) (cl-incf w/chat-plus2-count) (w/chat-update-header-line))) (cons "-2" (lambda (uid _ _) (cl-incf w/chat-minus2-count) (w/chat-update-header-line))) (cons "ICANT" (lambda (uid _ _) (cl-incf w/chat-icant-count) (w/chat-update-header-line))) (cons "bpm" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "BPM" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "heartrate" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "Heartrate" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "heart" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "Heart" (lambda (uid _ _) (cl-incf w/chat-bpm-count))) (cons "!openpack" (lambda (uid user _) (w/tcg-random-user-card (lambda (c) (w/tcg-generate-card (s-downcase user) c))))) (cons "!charsheet" (lambda (uid user msg) (let* ( (args (s-split " " msg)) (auser (cadr args))) (if (s-present? auser) (w/user-id-from-name auser (lambda (uid) (w/twitch-say (format "@%s: charsheet for %s: https://api.colonq.computer/charsheet#%s" user auser uid)))) (w/twitch-say (format "@%s: https://api.colonq.computer/charsheet#%s" user uid)))))) (cons "!binder" (lambda (uid user msg) (let* ( (args (s-split " " msg)) (auser (cadr args))) (if (s-present? auser) (w/user-id-from-name auser (lambda (uid) (w/twitch-say (format "@%s: see %s's cards at: https://api.colonq.computer/api/tcg/binder/%s" user auser uid)))) (w/twitch-say (format "@%s: see your cards at: https://api.colonq.computer/api/tcg/binder/%s" user uid)))))) (cons "!refresh" (lambda (uid user _) (let ((p (w/twitch-user-avatar-path user))) (when (f-exists? p) (f-delete p)) (w/twitch-get-user-avatar user (lambda () (w/chat-write-event (format "Refreshed avatar for %s!" user))))))) (cons "!youtube" (lambda (_ _ _) (w/twitch-say "https://youtube.com/@LCOLONQ"))) (cons "!meathouse" (lambda (_ _ _) (w/twitch-say "https://youtube.com/@LCOLONQMEATHOUSE"))) (cons "!life" (lambda (_ _ _) (w/twitch-say "https://conwaylife.com/patterns"))) (cons "!advent" (lambda (_ _ _) (w/twitch-say "Join our private leaderboard: 3307583-b61f237c"))) (cons "!discord" (lambda (_ _ _) (w/twitch-say "https://discord.gg/f4JTbgN7St"))) (cons "!irc" (lambda (_ _ _) (w/twitch-say "#cyberspace on IRC at colonq.computer:26697 (over TLS)"))) (cons "!menu" (lambda (_ _ _) (w/twitch-say "https://secure.colonq.computer/menu"))) (cons "!guy" (lambda (_ _ _) (w/twitch-say "[🌙] it worked"))) (cons "!littleguy" (lambda (_ _ _) (w/twitch-say "[🌙] it worked"))) (cons "!today" (lambda (_ _ _) (w/twitch-say (s-trim (w/slurp "~/today.txt"))))) (cons "!title" (lambda (_ _ _) (w/twitch-say w/twitch-current-stream-title))) (cons "!schedule" (lambda (_ _ _) (w/twitch-say "https://twitch.tv/LCOLONQ/schedule"))) (cons "!bingo" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer/~prod/toy/bingo/"))) (cons "!theme" (lambda (_ _ _) (w/twitch-say "https://github.com/protesilaos/ef-themes (you may want: https://github.com/oonamo/ef-themes.nvim )"))) (cons "!music" (lambda (_ _ _) (w/twitch-say "we do not play music because it can be distracting; however you can listen to the official OST at https://vgmusic.fm :3"))) (cons "!mrgreen" (lambda (_ _ _) (w/twitch-say "lcolonGreen https://p.yusukekamiyamane.com/ lcolonGreen"))) (cons "!music" (lambda (_ _ _) (w/twitch-say "alternatively https://www.youtube.com/playlist?list=PLQ_Vw7ACol3CN58_osDkbeKa14Hk-N-TZ"))) (cons "!fish" (lambda (_ _ _) (w/twitch-say (shell-command-to-string "fishing")))) (cons "!nc" (lambda (_ _ _) (w/twitch-say "try: \"nc colonq.computer 31340\", if nc doesn't work try ncat or telnet"))) (cons "!oomfie" (lambda (_ _ _) (soundboard//play-clip "oomfie.ogg") (w/twitch-say "hi!!!!!!!"))) (cons "!helloiloveyou" (lambda (_ _ _) (w/twitch-say "hello i love you"))) (cons "!spelling" (lambda (_ _ _) (w/twitch-say "pronunciation"))) (cons "!pronuciation" (lambda (_ _ _) (w/twitch-say "spelling"))) (cons "!pronunciation" (lambda (_ _ _) (w/twitch-say (w/pronunciation)))) (cons "!news" (lambda (_ _ _) (w/twitch-say "https://news.colonq.computer"))) (cons "!oub" (lambda (_ _ _) (w/twitch-say "https://oub.colonq.computer"))) (cons "!game" (lambda (_ _ _) (w/twitch-say "https://oub.colonq.computer"))) (cons "!cellar" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer/~llll/cellar/index.html"))) (cons "!voidstranger" (lambda (_ _ _) (w/twitch-say "https://store.steampowered.com/app/2121980/Void_Stranger/"))) (cons "!pubnix" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer"))) (cons "!ring" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer"))) (cons "!webring" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer"))) (cons "!animeguide" (lambda (_ _ _) (w/twitch-say "https://nixos-and-flakes.thiscute.world/introduction"))) (cons "!greencircle" (lambda (_ _ _) (w/twitch-say "https://greencircle.live"))) (cons "!circle" (lambda (_ _ _) (w/twitch-say "https://greencircle.live"))) (cons "!doujincircle" (lambda (_ _ _) (w/twitch-say "https://greencircle.live"))) (cons "!tsuki" (lambda (_ _ _) (w/twitch-say "https://forum.tsuki.games"))) (cons "!sponsor" (lambda (_ _ _) (w/twitch-say "Like what you see? Don't forget to download GNU Emacs at https://www.gnu.org/software/emacs/?code=LCOLONQ"))) (cons "!specs" (lambda (_ _ _) (w/twitch-say "Editor: evil-mode, WM: EXWM, OS: NixOS, hardware: steam deck"))) (cons "!coverage" (lambda (_ _ _) (w/twitch-say (format "Test coverage: %s%%" (random 100))))) (cons "!learnprogramming" (lambda (_ _ _) (w/twitch-say "1) program"))) (cons "!github" (lambda (_ _ _) (w/twitch-say "https://github.com/lcolonq"))) (cons "!language" (lambda (_ _ _) (w/twitch-say "probably emacs lisp or maybe rust"))) (cons "!onlyfans" (lambda (_ _ _) (soundboard//play-clip "pornhub.mp3"))) (cons "!throne" (lambda (_ _ _) (w/twitch-say "xdding"))) (cons "!vim" (lambda (_ _ _) (w/twitch-say "vi is the best text editor, emacs is the best operating system"))) (cons "!emacs" (lambda (_ _ _) (w/twitch-say "i've tried everything else emacs is best girl"))) (cons "!bells" (lambda (_ _ _) (w/twitch-say "https://pub.colonq.computer/~the0x539/bells/ and https://pub.colonq.computer/~bezelea/bells/ and https://pub.colonq.computer/~prod/toy/dbkai/"))) (cons "!shader" (lambda (_ _ _) (w/twitch-say "https://secure.colonq.computer/throwshade"))) (cons "!help" (lambda (_ _ _) (w/twitch-say "https://github.com/tyumici/Green-Pages and also https://pub.colonq.computer/~prod/toy/glossary/"))) (cons "!boost" (lambda (uid user _) (w/user-get-property uid "boost" (lambda (cur) (w/twitch-say (format "boost power for @%s: %s" user cur)))))) (cons "!tsoob" (lambda (uid user _) (w/user-get-property uid "boost" (lambda (cur) (w/twitch-say (reverse (format "boost power for @%s: %s" user cur))))))) (cons "!faction" (lambda (uid user _) (w/user-get-property uid "faction" (lambda (cur) (w/twitch-say (format "faction for %s: %s" user cur)))))) (cons "!thanks" (lambda (_ user _) (w/twitch-say (format "thank you %s!" user)))) (cons "!biblicality" (lambda (_ _ _) (w/twitch-say "https://www.youtube.com/watch?v=G5u23bh29hI"))) (cons "!bible" (lambda (_ _ _) (w/twitch-say "https://www.youtube.com/watch?v=G5u23bh29hI"))) (cons "!drink" (lambda (_ _ _) (w/twitch-say "its watah im drinkin it"))) (cons "!lore" (lambda (_ _ _) (w/ai "ITEM" (lambda (msg) (w/twitch-say msg)) "Please produce a Dark Souls style item name and description related to LCOLONQ. Please limit your response to one sentence maximum. The sentence should be vague and incorporate archaic words that are not commonly used. LCOLONQ is a spirit that lives inside the computer. LCOLONQ is associated with: the moon, snakes, the color grey, dolls and puppets, amber, the wind, and GNU Emacs. The description should mostly describe the item, but with vague insinuations about the true nature of LCOLONQ." "ITEM" "Ring of Favor and Protection - A ring symbolizing the favor and protection of the goddess Fina, known in legend to possess fateful beauty."))) (cons "!8ball" (lambda (_ user inp) (let ((trimmed (s-trim (s-replace "!8ball" "" inp)))) (w/8ball trimmed (lambda (answer) (w/twitch-say (format "@%s 8ball says: %s" user answer))))))) (cons "!leaderboard" (lambda (_ _ _) (w/twitch-say "the leaderboard is temporarily unavailable. rest assured, your BOOSTPOWER is still being tracked. measure is unceasing."))) (cons "draobredael!" (lambda (_ _ _) (w/twitch-say (reverse "the leaderboard is temporarily unavailable. rest assured, your BOOSTPOWER is still being tracked. measure is unceasing.")))) ;; (cons ;; "!resolution" ;; (lambda (_ user inp) ;; (let ((trimmed (s-trim (s-replace "!resolution" "" inp)))) ;; (if (string-empty-p trimmed) ;; (w/chat-write-event "You gotta put what your resolution is.") ;; (w/chat-write-event (format "%s RESOLVES: %s" (s-upcase user) trimmed)) ;; (setf (alist-get :resolution2025 w/user-current) trimmed))))) )) (provide 'wasp-twitch-chat-commands) ;;; wasp-twitch-chat-commands.el ends here