Last active
August 29, 2015 14:03
-
-
Save boxp/0f64e28ed42e83091356 to your computer and use it in GitHub Desktop.
Yo for Grimoire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(do | |
(import '(javafx.scene.media AudioClip)) | |
(let [yo (AudioClip. "http://archbox.dip.jp/res/Yo.mp3")] | |
(reify Plugin | |
(get-name [this] "Yo") | |
(on-status [this status] | |
(if (re-find #"yo|Yo|YO" (. status getText)) | |
(. yo play))) | |
(on-reply [this status] nil) | |
(on-rt [this status] nil) | |
(on-unrt [this status] nil) | |
(on-fav [this source target status] nil) | |
(on-unfav [this source target status] nil) | |
(on-del [this status] nil) | |
(on-follow [this source user] nil) | |
(on-dm [this dm] nil) | |
(on-start [this] | |
(defn yo [] (post "Yo"))) | |
(on-click [this e] | |
(reply (.indexOf @tweets (focused-status)) "Yo"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment