From 9e660096f1e4f5b1188de6f10b16e47cdf881980 Mon Sep 17 00:00:00 2001 From: kmmiio99o <164557248+kmmiio99o@users.noreply.github.com> Date: Sat, 27 Sep 2025 19:50:21 +0200 Subject: [PATCH] deploy --- all-in-one/index.js | 10 +++++----- all-in-one/manifest.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/all-in-one/index.js b/all-in-one/index.js index 27a659e..226e67b 100644 --- a/all-in-one/index.js +++ b/all-in-one/index.js @@ -1,6 +1,6 @@ -(function(C,l,T,a,$,d,B,U,V,r,P){"use strict";const{FormSwitchRow:u,FormIcon:p,FormSection:N,FormDivider:W}=P.Forms,g={List:r.getAssetIDByName("ic_list"),Message:r.getAssetIDByName("ic_message"),Copy:r.getAssetIDByName("ic_copy_message_link"),Info:r.getAssetIDByName("ic_info"),Theme:r.getAssetIDByName("ic_theme"),Plugin:r.getAssetIDByName("ic_plugins")};function k(){return V.useProxy(a.storage),a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),React.createElement(P.ErrorBoundary,null,React.createElement(U.ReactNative.ScrollView,{style:{flex:1}},React.createElement(N,{title:"Fact Commands",titleStyleType:"no_border"},React.createElement(u,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:React.createElement(p,{source:g.Message}),onValueChange:function(e){a.storage.factSettings.sendAsReply=e},value:a.storage.factSettings.sendAsReply}),React.createElement(W,null),React.createElement(u,{label:"Include Source Citation",subLabel:"Include the source of facts when available",leading:React.createElement(p,{source:g.Info}),onValueChange:function(e){a.storage.factSettings.includeCitation=e},value:a.storage.factSettings.includeCitation})),React.createElement(N,{title:"Plugin List",titleStyleType:"no_border"},React.createElement(u,{label:"Always Send Detailed List",subLabel:"Always use detailed mode when listing plugins",leading:React.createElement(p,{source:g.Plugin}),onValueChange:function(e){a.storage.listSettings.pluginListAlwaysDetailed=e},value:a.storage.listSettings.pluginListAlwaysDetailed})),React.createElement(N,{title:"Theme List",titleStyleType:"no_border"},React.createElement(u,{label:"Always Send Detailed List",subLabel:"Always use detailed mode when listing themes",leading:React.createElement(p,{source:g.Theme}),onValueChange:function(e){a.storage.listSettings.themeListAlwaysDetailed=e},value:a.storage.listSettings.themeListAlwaysDetailed}))))}const M=T.findByStoreName("UserStore"),x=T.findByProps("sendMessage"),m=T.findByProps("sendBotMessage"),_=M.getCurrentUser()?.premiumType===2?4e3:2e3;let i=[];const o={ENABLED:"\u{1F7E2}",DISABLED:"\u{1F534}",SELECTED:"\u{1F536}",NOT_SELECTED:"\u{1F537}"},h="https://vd-plugins.github.io/proxy/actuallythesun.github.io/vendetta-plugins/SplitLargeMessages/",q=async function(){const e=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:e.text,source:e.source,language:e.language}},z=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},G=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}};async function H(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()}const I=function(e){let t=e.text;return a.storage.factSettings?.includeCitation&&e.source&&(t+=` +(function(v,r,C,a,R,u,$,Y,U,c,B){"use strict";const{FormSwitchRow:p,FormIcon:g,FormSection:T,FormDivider:V}=B.Forms,h={List:c.getAssetIDByName("ic_list"),Message:c.getAssetIDByName("ic_message"),Copy:c.getAssetIDByName("ic_copy_message_link"),Info:c.getAssetIDByName("ic_info"),Theme:c.getAssetIDByName("ic_theme"),Plugin:c.getAssetIDByName("ic_plugins")};function W(){return U.useProxy(a.storage),a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),React.createElement(B.ErrorBoundary,null,React.createElement(Y.ReactNative.ScrollView,{style:{flex:1}},React.createElement(T,{title:"Fact Commands",titleStyleType:"no_border"},React.createElement(p,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:React.createElement(g,{source:h.Message}),onValueChange:function(e){a.storage.factSettings.sendAsReply=e},value:a.storage.factSettings.sendAsReply}),React.createElement(V,null),React.createElement(p,{label:"Include Source Citation",subLabel:"Include the source of facts when available",leading:React.createElement(g,{source:h.Info}),onValueChange:function(e){a.storage.factSettings.includeCitation=e},value:a.storage.factSettings.includeCitation})),React.createElement(T,{title:"Plugin List",titleStyleType:"no_border"},React.createElement(p,{label:"Always Send Detailed List",subLabel:"Always use detailed mode when listing plugins",leading:React.createElement(g,{source:h.Plugin}),onValueChange:function(e){a.storage.listSettings.pluginListAlwaysDetailed=e},value:a.storage.listSettings.pluginListAlwaysDetailed})),React.createElement(T,{title:"Theme List",titleStyleType:"no_border"},React.createElement(p,{label:"Always Send Detailed List",subLabel:"Always use detailed mode when listing themes",leading:React.createElement(g,{source:h.Theme}),onValueChange:function(e){a.storage.listSettings.themeListAlwaysDetailed=e},value:a.storage.listSettings.themeListAlwaysDetailed}))))}const P=C.findByStoreName("UserStore"),k=C.findByProps("sendMessage"),x=C.findByProps("sendBotMessage"),_=P.getCurrentUser()?.premiumType===2?4e3:2e3;let o=[];const l={ENABLED:"\u{1F7E2}",DISABLED:"\u{1F534}",SELECTED:"\u{1F536}",NOT_SELECTED:"\u{1F537}"},m="https://vd-plugins.github.io/proxy/actuallythesun.github.io/vendetta-plugins/SplitLargeMessages/",q=async function(){const e=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:e.text,source:e.source,language:e.language}},z=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},G=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}};async function H(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()}const N=function(e){let t=e.text;return a.storage.factSettings?.includeCitation&&e.source&&(t+=` -Source: ${e.source}`),t},y=function(e,t,s){const n={content:t,...s&&a.storage.factSettings?.sendAsReply?{messageReference:{messageId:s}}:{}};return x.sendMessage(e,n,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}},f=function(e){return e.map(function(t){return t.name}).join(", ")},j=function(e){return e.join(` -`).trimEnd()},S=function(e){return j(e).length},D=async function(e,t){x.sendMessage(e,{content:j(t)},void 0,{nonce:(Date.now()*4194304).toString()})},O=function(){return Object.keys(d.plugins).includes(h)},F=function(){return Object.values(d.plugins).find(function(e){return e.id===h})?.enabled??!1};async function J(e,t){const s=a.storage.themeListAlwaysDetailed??!1,n=[`**My Theme List | ${Object.keys($.themes).length} Themes**`,""],c=Object.values($.themes);if(c.length)for(const E of c){const{selected:b,data:R,id:v}=E,{name:L,description:A,authors:Y}=R;e||s?n.push(`> **Name**: ${L}`,`> **Selected**: ${b?o.SELECTED:o.NOT_SELECTED}`,`> **Description**: ${A}`,`> **Authors**: ${f(Y)}`,`> **[Install!](${v})**`,""):n.push(`> ${b?o.SELECTED:o.NOT_SELECTED} **${L}** by ${f(Y)}`)}else n.push("Nothing to see here, huh...");const w=S(n)>_;return w&&!O()?(m.sendBotMessage(t.channel.id,`Your list is too long to send it! Please install the [Split Large Messages](${h}) plugin.`,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}):w&&!F()?(m.sendBotMessage(t.channel.id,`Your list is too long to send it! You have the Split Large Messages plugin installed, but it's not enabled! -> Please enable it in order to send the list.`,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}):S(n)>2e3?B.alerts.showConfirmationAlert({content:"Your list is over than 2000 characters. Are you sure?",confirmText:"Yes",cancelText:"No",onConfirm:async function(){return await D(t.channel.id,n)}}):(await D(t.channel.id,n),{type:4})}async function K(e,t){const s=a.storage.pluginListAlwaysDetailed??!1,n=[`**My Plugin List | ${Object.keys(d.plugins).length} Plugins**`,""];for(const w of Object.values(d.plugins)){const{enabled:E,manifest:b,id:R}=w,{name:v,description:L,authors:A}=b;e||s?n.push(`> **Name**: ${v}`,`> **Status**: ${E?o.ENABLED:o.DISABLED}`,`> **Description**: ${L}`,`> **Authors**: ${f(A)}`,`> **[Install!](${R})**`,""):n.push(`> ${E?o.ENABLED:o.DISABLED} **${v}** by ${f(A)}`)}const c=S(n)>_;return c&&!O()?(m.sendBotMessage(t.channel.id,`Your list is too long to send it! Please install the [Split Large Messages](${h}) plugin.`,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}):c&&!F()?(m.sendBotMessage(t.channel.id,`Your list is too long to send it! You have the Split Large Messages plugin installed, but it's not enabled! -> Please enable it in order to send the list.`,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}):S(n)>2e3?B.alerts.showConfirmationAlert({content:"Your list is over than 2000 characters. Are you sure?",confirmText:"Yes",cancelText:"No",onConfirm:async function(){return await D(t.channel.id,n)}}):(await D(t.channel.id,n),{type:4})}const Q=function(){i.push(l.registerCommand({name:"catfact",displayName:"catfact",description:"Sends a random cat fact.",displayDescription:"Sends a random cat fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await G();return y(t.channel.id,I(s),t.message?.id)}})),i.push(l.registerCommand({name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await z();return y(t.channel.id,I(s),t.message?.id)}})),i.push(l.registerCommand({name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await q();return y(t.channel.id,I(s),t.message?.id)}})),i.push(l.registerCommand({name:"petpet",displayName:"petpet",description:"PetPet someone",displayDescription:"PetPet someone",options:[{name:"user",description:"The user(or their id) to be patted",type:6,required:!0,displayName:"user",displayDescription:"The user(or their id) to be patted"}],execute:async function(e,t){const s=(await M.getUser(e[0].value)).getAvatarURL(512),n=await H(s);return y(t.channel.id,n.url,t.message?.id)},applicationId:"-1",inputType:1,type:1})),i.push(l.registerCommand({name:"plugin-list",displayName:"plugin list",description:"Send your plugin list to the current channel",displayDescription:"Send your plugin list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:async function(e,t){const s=e.find(function(n){return n.name==="detailed"})?.value??!1;return K(s,t)},applicationId:"-1",inputType:1,type:1})),i.push(l.registerCommand({name:"theme-list",displayName:"theme list",description:"Send your theme list to the current channel",displayDescription:"Send your theme list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:async function(e,t){const s=e.find(function(n){return n.name==="detailed"})?.value??!1;return J(s,t)},applicationId:"-1",inputType:1,type:1}))};a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1});var X={onLoad:function(){console.log("[All-In-One Commands] Plugin loaded!"),Q()},onUnload:function(){console.log("[All-In-One Commands] Plugin unloaded!"),i.forEach(function(e){return e()}),i=[]},settings:k};return C.default=X,Object.defineProperty(C,"__esModule",{value:!0}),C})({},vendetta.commands,vendetta.metro,vendetta.plugin,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.storage,vendetta.ui.assets,vendetta.ui.components); +Source: ${e.source}`),t},i=function(e,t,s){const n={content:t,...s&&a.storage.factSettings?.sendAsReply?{messageReference:{messageId:s}}:{}};return k.sendMessage(e,n,void 0,{nonce:BigInt(Date.now())<<22n}),{type:4}},y=function(e){return e.map(function(t){return t.name}).join(", ")},f=function(e){return e.join(` +`).trimEnd()},S=function(e){return f(e).length},M=async function(e,t){return i(e,f(t))},j=function(){return Object.keys(u.plugins).includes(m)},O=function(){return Object.values(u.plugins).find(function(e){return e.id===m})?.enabled??!1};async function J(e,t){const s=a.storage.themeListAlwaysDetailed??!1,n=[`**My Theme List | ${Object.keys(R.themes).length} Themes**`,""],d=Object.values(R.themes);if(d.length)for(const E of d){const{selected:b,data:I,id:w}=E,{name:L,description:A,authors:F}=I;e||s?n.push(`> **Name**: ${L}`,`> **Selected**: ${b?l.SELECTED:l.NOT_SELECTED}`,`> **Description**: ${A}`,`> **Authors**: ${y(F)}`,`> **[Install!](${w})**`,""):n.push(`> ${b?l.SELECTED:l.NOT_SELECTED} **${L}** by ${y(F)}`)}else n.push("Nothing to see here, huh...");const D=S(n)>_;return D&&!j()?(x.sendBotMessage(t.channel.id,`Your list is too long to send it! Please install the [Split Large Messages](${m}) plugin.`),{type:4}):D&&!O()?(x.sendBotMessage(t.channel.id,`Your list is too long to send it! You have the Split Large Messages plugin installed, but it's not enabled! +> Please enable it in order to send the list.`),{type:4}):S(n)>2e3?$.alerts.showConfirmationAlert({content:"Your list is over than 2000 characters. Are you sure?",confirmText:"Yes",cancelText:"No",onConfirm:async function(){return M(t.channel.id,n)}}):M(t.channel.id,n)}async function K(e,t){const s=a.storage.pluginListAlwaysDetailed??!1,n=[`**My Plugin List | ${Object.keys(u.plugins).length} Plugins**`,""];for(const D of Object.values(u.plugins)){const{enabled:E,manifest:b,id:I}=D,{name:w,description:L,authors:A}=b;e||s?n.push(`> **Name**: ${w}`,`> **Status**: ${E?l.ENABLED:l.DISABLED}`,`> **Description**: ${L}`,`> **Authors**: ${y(A)}`,`> **[Install!](${I})**`,""):n.push(`> ${E?l.ENABLED:l.DISABLED} **${w}** by ${y(A)}`)}const d=S(n)>_;return d&&!j()?i(t.channel.id,`Your list is too long to send it! Please install the [Split Large Messages](${m}) plugin.`):d&&!O()?i(t.channel.id,`Your list is too long to send it! You have the Split Large Messages plugin installed, but it's not enabled! +> Please enable it in order to send the list.`):S(n)>2e3?$.alerts.showConfirmationAlert({content:"Your list is over than 2000 characters. Are you sure?",confirmText:"Yes",cancelText:"No",onConfirm:async function(){return i(t.channel.id,f(n))}}):i(t.channel.id,f(n))}const Q=function(){o.push(r.registerCommand({name:"catfact",displayName:"catfact",description:"Sends a random cat fact.",displayDescription:"Sends a random cat fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await G();return i(t.channel.id,N(s),t.message?.id)}})),o.push(r.registerCommand({name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await z();return i(t.channel.id,N(s),t.message?.id)}})),o.push(r.registerCommand({name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){const s=await q();return i(t.channel.id,N(s),t.message?.id)}})),o.push(r.registerCommand({name:"petpet",displayName:"petpet",description:"PetPet someone",displayDescription:"PetPet someone",options:[{name:"user",description:"The user(or their id) to be patted",type:6,required:!0,displayName:"user",displayDescription:"The user(or their id) to be patted"}],execute:async function(e,t){const s=(await P.getUser(e[0].value)).getAvatarURL(512),n=await H(s);return i(t.channel.id,n.url,t.message?.id)},applicationId:"-1",inputType:1,type:1})),o.push(r.registerCommand({name:"plugin-list",displayName:"plugin list",description:"Send your plugin list to the current channel",displayDescription:"Send your plugin list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:async function(e,t){const s=e.find(function(n){return n.name==="detailed"})?.value??!1;return K(s,t)},applicationId:"-1",inputType:1,type:1})),o.push(r.registerCommand({name:"theme-list",displayName:"theme list",description:"Send your theme list to the current channel",displayDescription:"Send your theme list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:async function(e,t){const s=e.find(function(n){return n.name==="detailed"})?.value??!1;return J(s,t)},applicationId:"-1",inputType:1,type:1}))};a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1});var X={onLoad:function(){console.log("[All-In-One Commands] Plugin loaded!"),Q()},onUnload:function(){console.log("[All-In-One Commands] Plugin unloaded!"),o.forEach(function(e){return e()}),o=[]},settings:W};return v.default=X,Object.defineProperty(v,"__esModule",{value:!0}),v})({},vendetta.commands,vendetta.metro,vendetta.plugin,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.storage,vendetta.ui.assets,vendetta.ui.components); diff --git a/all-in-one/manifest.json b/all-in-one/manifest.json index 501f34b..faaf2c3 100644 --- a/all-in-one/manifest.json +++ b/all-in-one/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"All Commands","description":"A collection of useful commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"d7dec0fbc5af09a719bfa21040cb27027bfabd4ce68bee31f074906956327cb8"} \ No newline at end of file +{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"All Commands","description":"A collection of useful commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"4947e5cc6647dbea8dcbeb6093f4da3a3ee251f525d31ed9dc06d14e3b03727e"} \ No newline at end of file