Skip to content

Instantly share code, notes, and snippets.

@kharmabum
Last active December 26, 2016 09:04
Show Gist options
  • Save kharmabum/3443c3dbc7a5a00aeb401035e4042ccc to your computer and use it in GitHub Desktop.
Save kharmabum/3443c3dbc7a5a00aeb401035e4042ccc to your computer and use it in GitHub Desktop.
const {Feature} = require('other')
const wordSnippetMap = {
"1/2": [
{text: "½"}
],
"1/3": [
{text:"⅓"}
],
"1/4": [
{text: "¼"}
],
"alpha": [
{text: "α"}
],
"alt": [
{text: "⌥"}
],
"beta": [
{text: "β"}
],
"cmd": [
{text: "⌘"}
],
"cntrl": [
{text:"^"}
],
"delta": [
{text: "δ"}
],
"ellipsis": [
{text: "…"}
],
"fist": [
{text: "👊"}
],
"flex": [
{text: "୧(˵ ° ~ ° ˵ )୨"}
],
"jammin": [
{text: "\\m/d(^_^)b\\m/"}
],
"lambda": [
{text: "λ"}
],
"mu": [
{text: "μ"}
],
"shift": [
{text: "⇧"}
],
"shrug": [
{text: "¯\\_(ツ)_/¯"},
{media: {type: "image", url: "https://i.imgur.com/hJa0v7n.gif"}}
],
"thanks": [
{text: "Thank you but I must decline for secret reasons."}
],
"disapprove": [
{text: "ಠ_ಠ"},
{text: "ಠ_ರೃ"}
],
"d": [
{text: "ʕノ•ᴥ•ʔノ ︵ ┻━┻"},
{text: "( ƅ°ਉ°)ƅ \"/h1 LOL\""}
]
}
const wordMediaMap = {
"hehe": [
{media: {type: "image", url: "https://media0.giphy.com/media/5EKhlRDFCOnYI/giphy.gif"}},
{media: {type: "image", url: "https://i.imgur.com/wePL78h.gif"}}
],
"boom": [
{media: {type: "image", url: "https://i.imgur.com/pgKgXDo.png"}},
{media: {type: "image", url: "https://i.imgur.com/brQqWfg.jpg"}},
{media: {type: "image", url: "https://i.imgur.com/VMZ6nTe.gif"}},
{media: {type: "image", url:"https://i.imgur.com/Dd4FO2B.jpg"}}
],
"glitter": [
{media: {type: "image", url: "https://i.imgur.com/EB6KZCg.gif"}},
{media: {type: "image", url: "https://i.imgur.com/b4luQg9.gif"}}
],
"shocked": [{media: {type: "image", url: "https://media.giphy.com/media/5i7umUqAOYYEw/giphy.gif"}}],
"sneaky": [{media: {type: "image", url: "https://media.tenor.co/images/e872a30aa7b59b43e1c70ed72587daae/tenor.gif"}}],
"oyes": [{media: {type: "image", url: "https://i.imgur.com/0WrG8vS.png"}}],
"pizza": [{media: {type: "image", url: "https://chat.other.wtf/2003fa682e294604bc0f8a1354556878/C031D6DD-D7F6-4F6E-992F-3C6991DA0D0D.jpg"}}],
"farewell": [{media: {type: "image", url: "https://i.imgur.com/N4WQyA5.jpg"}}],
"heavy": [{media: {type: "image", url: "https://i.imgur.com/Bgl5kpE.gif"}}],
"soundsgood": [{media: {type: "image", url: "https://i.imgur.com/vdcmS6j.png"}}],
"10": [{media: {type: "image", url: "https://i.imgur.com/FqvpB3h.gif"}}],
"burn": [{media: {type: "image", url: "https://i.imgur.com/RFdf0tV.gif"}}],
"getshitdone": [{media: {type: "image", url: "https://i.imgur.com/y3tGyaY.gif"}}],
"seent": [{media: {type: "image", url: "https://i.imgur.com/7lK1wE5.gif"}}],
"cheers": [{media: {type: "image", url: "https://i.imgur.com/xGBUa09.gif"}}],
"lies": [
{media: {type: "image", url: "https://i.imgur.com/wAipoUz.gif"}},
{media: {type: "image", url: "https://i.imgur.com/3ivgshm.gif"}}
],
"feastyoureyes": [{media: {type: "image", url: "https://i.imgur.com/xsGY0nL.gif"}}],
"winning": [
{media: {type: "image", url: "https://i.imgur.com/kk3dEvT.gif"}},
{media: {type: "image", url: "https://i.imgur.com/kbErctM.gif"}},
{media: {type: "image", url: "https://i.imgur.com/BUvMaR7.gif"}}
],
"wtf": [
{media: {type: "image", url: "https://i.imgur.com/kk3dEvT.gif"}},
{media: {type: "image", url: "https://i.imgur.com/fIeN3nG.gif"}},
{media: {type: "image", url: "https://i.imgur.com/BsSqDZs.gif"}},
],
"magic": [{media: {type: "image", url: "https://i.imgur.com/3cO0z8T.gif"}}],
"brain": [{media: {type: "image", url: "https://i.imgur.com/rptuofQ.gif"}}],
"evolution": [{media: {type: "image", url: "https://i.imgur.com/gfZiNVB.gif"}}],
"shh": [{media: {type: "image", url: "https://i.imgur.com/aWCMR0u.gif"}}],
"soon": [{media: {type: "image", url: "https://i.imgur.com/DZIqyEQ.gif"}}],
"yo": [
{media: {type: "image", url: "https://i.imgur.com/NflsHI1.gif"}}
],
"no": [
{media: {type: "image", url: "https://i.imgur.com/QtTQwYF.gif"}},
{media: {type: "image", url: "https://i.imgur.com/mnwCWCI.gif"}},
{media: {type: "image", url: "https://i.imgur.com/ButLr4Z.gif"}},
{media: {type: "image", url: "https://i.imgur.com/pIoVxvc.gif"}}
],
"yes": [
{media: {type: "image", url: "https://i.imgur.com/wbxqAhh.gif"}},
{media: {type: "image", url: "https://i.imgur.com/ucfjeTk.gif"}},
{media: {type: "image", url: "https://i.imgur.com/aPePGrf.gif"}},
{media: {type: "image", url: "https://i.imgur.com/PeKcis8.gif"}},
{media: {type: "image", url: "https://i.imgur.com/uOkBLQp.gif"}},
{media: {type: "image", url: "https://i.imgur.com/qiwoXMQ.gif"}},
{media: {type: "image", url: "https://i.imgur.com/hdpx8lo.gif"}},
{media: {type: "image", url: "https://i.imgur.com/S0uEojM.gif"}},
{media: {type: "image", url: "https://i.imgur.com/ykn9Itg.gif"}},
{media: {type: "image", url: "https://i.imgur.com/JUXPIOD.gif"}},
{media: {type: "image", url: "https://i.imgur.com/IhvmxhV.gif"}}
],
}
const feature = new Feature({
name: 'juanxaccelerateyourlife.other.js',
version: '0.0.0-beta.af',
dependencies: {
otherjs: '^3.2.x'
}
})
feature.listen({
to: {words: Object.keys(wordSnippetMap)},
on({word, rest}) {
return {chatCompletions: wordSnippetMap[word]}
}
})
feature.listen({
to: {words: Object.keys(wordMediaMap)},
on({word, rest}) {
return {chatCompletions: wordMediaMap[word]}
}
})
feature.listen({
to: {words: ["test"]},
on({word, rest}) {
feature.chatternet.emit("ADD_MESSAGE", "629aa160115047b29f2d83d07e210e86", {text: "foo8", format: "code"})
}
})
module.exports = feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment