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