Skip to content

Instantly share code, notes, and snippets.

@boxp
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxp/0f64e28ed42e83091356 to your computer and use it in GitHub Desktop.
Save boxp/0f64e28ed42e83091356 to your computer and use it in GitHub Desktop.
Yo for Grimoire
(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