deploy: ba5c4fe706
This commit is contained in:
parent
edcbc5412c
commit
2b1a729f7a
2 changed files with 2 additions and 0 deletions
1
Moyai/index.js
Normal file
1
Moyai/index.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
(function(o,E,r,n,d){"use strict";const{ScrollView:R}=r.findByProps("ScrollView"),{TableRowGroup:S,TableSwitchRow:b,Stack:w}=r.findByProps("TableSwitchRow","TableRowGroup","Stack");function m(){const[,e]=n.React.useReducer(function(t){return~t},0);return n.React.createElement(R,{style:{flex:1}},n.React.createElement(w,{style:{padding:16},spacing:16},n.React.createElement(S,{title:"General"},n.React.createElement(b,{label:"Play on reactions",subLabel:"Play the sound when someone reacts with moyai",value:d.plugin.storage.allowReactions??!0,onValueChange:function(t){d.plugin.storage.allowReactions=t,e()}}))))}const{DCDSoundManager:c}=n.ReactNative.NativeModules,f=r.findByStoreName("SelectedChannelStore"),D="https://raw.githubusercontent.com/Metastruct/garrysmod-chatsounds/master/sound/chatsounds/autoadd/memes/overused%20thud.ogg",i=6969;let h=-1;const T=function(){return new Promise(function(e){try{c.prepare(D,"media",i,function(t,s){return e(s)})}catch{e({duration:1e3})}})};let u=null,a=!1;async function g(){if(l)try{a&&(u!=null&&clearTimeout(u),c.stop(i),a=!1),a=!0,await c.play(i),u=setTimeout(function(){a=!1,l&&c.stop(i),u=null},h)}catch{a=!1}}const A=/🗿|<a?:.*?moy?ai.*?:\d+>/gi;function p(e){try{if(e.message?.content&&e.channelId==f.getChannelId()&&!e.message.state){const t=e.message.content.match(A);if(t)for(let s=0;s<t.length;s++)setTimeout(g,s*350)}}catch{}}function y(e){try{if((E.storage.allowReactions??!0)&&e.channelId==f.getChannelId()&&!e.optimistic){const t=e.emoji?.name;(t==="\u{1F5FF}"||t&&/moy?ai/i.test(t))&&g()}}catch{}}let l=!1;var v={onLoad:function(){l||T().then(function(e){l=!0,h=e.duration}),n.FluxDispatcher.subscribe("MESSAGE_CREATE",p),n.FluxDispatcher.subscribe("MESSAGE_REACTION_ADD",y)},onUnload:function(){n.FluxDispatcher.unsubscribe("MESSAGE_CREATE",p),n.FluxDispatcher.unsubscribe("MESSAGE_REACTION_ADD",y)},settings:m};return o.default=v,Object.defineProperty(o,"__esModule",{value:!0}),o})({},vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta);
|
||||
1
Moyai/manifest.json
Normal file
1
Moyai/manifest.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"authors":[{"name":"Cynosphere","id":"150745989836308480"},{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","vendetta":{"icon":"ic_speaker"},"name":"🗿","description":"🗿","hash":"ceffdb379c988b91431d4d7478f79614b3b834cdf9c9edae781a27d824be37c5"}
|
||||
Loading…
Add table
Reference in a new issue