1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
(function(o,r,i){"use strict";function s(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function f(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,n,t){return n&&f(e.prototype,n),t&&f(e,t),e}const y=i.findByProps("show","confirm","close"),d=i.findByProps("handleStartCall");var m=new(function(){function e(){s(this,e)}return h(e,[{key:"onLoad",value:function(){r.logger.log("MoreConfirm: patching calls..."),r.patcher.instead("handleStartCall",d,function(n,t){const[{rawRecipients:[{username:a,discriminator:u},c]},g]=n,l=g?"video call":"call";y.show({title:c?`MoreConfirm: Start a group ${l}?`:`MoreConfirm: Start a ${l} with ${a}#${u}?`,body:c?"Are you sure you want to start the group call?":`Are you sure you want to ${l} ${a}#${u}?`,confirmText:"Yes",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){try{t(...n)}catch(w){r.logger.error("Failed to start call",w)}}})})}}]),e}());return o.default=m,Object.defineProperty(o,"__esModule",{value:!0}),o})({},vendetta,vendetta.metro);
|