deploy: 118b5ccb02
This commit is contained in:
parent
263a4a38f5
commit
736e54366f
6 changed files with 6 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"Last.fm","description":"Show off your last.fm status on your Discord profile.","vendetta":{"icon":"ic_stage_music"},"hash":"f381fb3a15c574706b7156fca952a081f270dec17eb075001473f5dbeba6a026"}
|
||||
{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"Last.fm","description":"Show off your last.fm status on your Discord profile.","vendetta":{"icon":"ic_stage_music"},"hash":"91dc771b84ace904093fcb77e62eedfbf2ee45d55a026858b493b06c1f9fef14"}
|
||||
1
MoreConfirm/index.js
Normal file
1
MoreConfirm/index.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
(function(s,u,o){"use strict";function p(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function h(a,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}function v(a,n,e){return n&&h(a.prototype,n),e&&h(a,e),a}const y=o.findByProps("show","confirm","close"),w=o.findByProps("addRelationship"),m=o.findByProps("handleStartCall"),$=o.findByProps("hideActionSheet"),b=o.findByStoreName("UserStore");var g=new(function(){function a(){p(this,a)}return v(a,[{key:"onLoad",value:function(){var n=this;this.patches.push(u.patcher.instead("handleStartCall",m,function(e,t){const[{rawRecipients:[{username:i,discriminator:c},r]},f]=e,l=f?"video call":"call";y.show({title:r?`Start a group ${l}?`:`Start a ${l} with ${i}#${c}?`,body:r?"Are you sure you want to start the group call?":`Are you sure you want to ${l} ${i}#${c}?`,confirmText:"Yes",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){try{t(...e)}catch(d){u.logger.error("Failed to start call",d)}}})})),this.patches.push(u.patcher.instead("addRelationship",w,function(e,t){if(typeof e[0]!="object"||!e[0].userId)return t.apply(n,e);const{username:i,discriminator:c}=b.getUser(e[0].userId),r=setInterval(function(){return $.hideActionSheet()},100);setTimeout(function(){return clearInterval(r)},3e3);const f=e[0].type===2;return new Promise(function(l){y.show({title:`${f?"Block":"Friend"} ${i}#${c}?`,body:`Are you sure you want to ${f?"block":"friend"} ${i}#${c}?`,confirmText:"Yes",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){try{l(t.apply(n,e))}catch(d){u.logger.error("Failed to add relationship",d)}finally{clearInterval(r)}},onCancel:function(){return void clearInterval(r)}})})}))}},{key:"onUnload",value:function(){for(const n of this.patches)n()}}]),a}());return s.default=g,Object.defineProperty(s,"__esModule",{value:!0}),s})({},vendetta,vendetta.metro);
|
||||
1
MoreConfirm/manifest.json
Normal file
1
MoreConfirm/manifest.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"MoreConfirm","description":"Prompts confirmations before making irreversible actions.","vendetta":{"icon":"check"},"hash":"0b869eb2bd546e0bb7457d57b758cdb4f2a0448ad6ff9b11248ceba70cf430ee"}
|
||||
1
RichPresence/index.js
Normal file
1
RichPresence/index.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
(function(a,s,g,d){"use strict";function b(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function o(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,n,e){return n&&o(t.prototype,n),e&&o(t,e),t}function l(t){return t&&typeof t.length=="number"?t.length>0:t||t===0||t===!1}function h(t){return JSON.parse(JSON.stringify(t,function(n,e){if(e===t)return e;if(!(typeof n=="string"&&n.startsWith("_")))switch(typeof e){case"object":{if(Array.isArray(e)&&e.length===0)return;const r=Object.entries(e).filter(function(A){return l(A[1])});return r.length>0?Object.fromEntries(r):void 0}default:return l(e)?e:void 0}}))}var y=function(t){return t[t.PLAYING=0]="PLAYING",t[t.STREAMING=1]="STREAMING",t[t.LISTENING=2]="LISTENING",t[t.WATCHING=3]="WATCHING",t[t.COMPETING=5]="COMPETING",t}(y||{});const u=g.findByProps("getAssetIds"),c=Date.now(),i=s.plugin.storage;typeof i.selected?.length!="number"&&Object.assign(i,{selected:"default",selections:{default:I()}});function I(){return{name:"Discord",application_id:"1054951789318909972",flags:0,type:0,timestamps:{_enabled:!1,start:c},assets:{},buttons:[{},{}]}}async function f(t){if(typeof t!="object")throw new Error("Invalid activity");if(t){const n=t?.timestamps?._enabled;if(t=h(t),n?t.timestamps.start||=c:delete t.timestamps,t.assets){const e=[t.application_id,[t.assets.large_image,t.assets.small_image]];let r=u.getAssetIds(...e);r.length||(r=await u.fetchAssetIds(...e)),t.assets.large_image=r[0],t.assets.small_image=r[1]}t.buttons?.length?(t.buttons=t.buttons.filter(function(e){return e.label&&e.url}),t.buttons.length?Object.assign(t,{metadata:{button_urls:t.buttons.map(function(e){return e.url})},buttons:t.buttons.map(function(e){return e.label})}):delete t.buttons):delete t.buttons}return d.FluxDispatcher.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:t,pid:1608,socketId:"RichPresence@Vendetta"}),t}var p=new(function(){function t(){b(this,t)}return m(t,[{key:"onLoad",value:function(){s.logger.log("Sending RPC request");const n=i.selections[i.selected];if(!n)throw new Error("Selected activity does not exist");f(n).then(function(e){s.logger.log("RPC request sent"),s.logger.log(e)}).catch(function(e){s.logger.error("An error occured while sending RPC request :("),s.logger.error(e?.stack??e)})}},{key:"onUnload",value:function(){s.logger.log("Stopping RPC request"),f(null)}}]),t}());return a.default=p,Object.defineProperty(a,"__esModule",{value:!0}),a})({},vendetta,vendetta.metro,vendetta.metro.common);
|
||||
1
RichPresence/manifest.json
Normal file
1
RichPresence/manifest.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"authors":[{"name":"pylix","id":"492949202121261067"}],"main":"index.js","name":"RichPresence","description":"Sets Discord Rich Presence for your profile.","vendetta":{"icon":"games"},"hash":"f1ad2100a02c2600fc1c4206a9c8659e14718193b7acf3220d41501203c6afd9"}
|
||||
Loading…
Add table
Reference in a new issue