From 081a44cc3497cf8384c710d40811d560a358f13b Mon Sep 17 00:00:00 2001 From: kmmiio99o <164557248+kmmiio99o@users.noreply.github.com> Date: Sat, 27 Sep 2025 19:17:53 +0200 Subject: [PATCH] deploy --- .gitignore | 1 + all-in-one/index.js | 3 +++ all-in-one/manifest.json | 1 + 3 files changed, 5 insertions(+) create mode 100644 all-in-one/index.js create mode 100644 all-in-one/manifest.json diff --git a/.gitignore b/.gitignore index 320c107..c49051a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ dist/ package-lock.json +plugins diff --git a/all-in-one/index.js b/all-in-one/index.js new file mode 100644 index 0000000..fddadd4 --- /dev/null +++ b/all-in-one/index.js @@ -0,0 +1,3 @@ +(function(u,i,p,t,S,w,c,y){"use strict";const{FormSwitchRow:o,FormIcon:l,FormSection:f,FormDivider:h}=y.Forms,r={List:c.getAssetIDByName("ic_list"),Copy:c.getAssetIDByName("ic_copy_message_link"),Settings:c.getAssetIDByName("ic_settings"),Fact:c.getAssetIDByName("ic_info")};t.storage.factSettings||(t.storage.factSettings={sendAsReply:!0,includeCitation:!1}),t.storage.listSettings||(t.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1});function A(){return w.useProxy(t.storage),React.createElement(y.ErrorBoundary,null,React.createElement(S.ReactNative.ScrollView,{style:{flex:1}},React.createElement(f,{title:"Plugin List Settings",titleStyleType:"no_border"},React.createElement(o,{label:"Always send detailed plugin list",subLabel:"Always use detailed mode when listing plugins",leading:React.createElement(l,{source:r.List}),onValueChange:function(e){t.storage.listSettings.pluginListAlwaysDetailed=e},value:t.storage.listSettings.pluginListAlwaysDetailed}),React.createElement(h,null),React.createElement(o,{label:"Always send detailed theme list",subLabel:"Always use detailed mode when listing themes",leading:React.createElement(l,{source:r.List}),onValueChange:function(e){t.storage.listSettings.themeListAlwaysDetailed=e},value:t.storage.listSettings.themeListAlwaysDetailed})),React.createElement(f,{title:"Fact Commands Settings",titleStyleType:"no_border"},React.createElement(o,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:React.createElement(l,{source:r.Copy}),onValueChange:function(e){t.storage.factSettings.sendAsReply=e},value:t.storage.factSettings.sendAsReply}),React.createElement(h,null),React.createElement(o,{label:"Include Source Citation",subLabel:"Include the source of the fact when available",leading:React.createElement(l,{source:r.Fact}),onValueChange:function(e){t.storage.factSettings.includeCitation=e},value:t.storage.factSettings.includeCitation}))))}const R=p.findByStoreName("UserStore"),b=p.findByProps("sendMessage");let s=[];t.storage.factSettings||(t.storage.factSettings={sendAsReply:!0,includeCitation:!1}),t.storage.listSettings||(t.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1});const v=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}},C=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},D=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}};async function L(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()}const g=function(e){let a=e.text;return t.storage.factSettings.includeCitation&&e.source&&(a+=` + +Source: ${e.source}`),a},d=function(e,a,n){const m=Date.now().toString(),N={content:a,...n&&t.storage.factSettings.sendAsReply?{messageReference:{messageId:n}}:{}};return b.sendMessage(e,N,void 0,{nonce:m}),{type:4}},E=function(){s.push(i.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,a){const n=await D();return d(a.channel.id,g(n),a.message?.id)}})),s.push(i.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,a){const n=await C();return d(a.channel.id,g(n),a.message?.id)}})),s.push(i.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,a){const n=await v();return d(a.channel.id,g(n),a.message?.id)}})),s.push(i.registerCommand({name:"petpet",displayName:"petpet",displayDescription:"PetPet someone",description:"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,a){const n=(await R.getUser(e[0].value)).getAvatarURL(512),m=await L(n);return d(a.channel.id,m.url,a.message?.id)},applicationId:"-1",inputType:1,type:1}))};var I={onLoad:function(){console.log("[All-In-One Commands] Plugin loaded!"),E()},onUnload:function(){console.log("[All-In-One Commands] Plugin unloaded!"),s.forEach(function(e){return e()}),s=[]},settings:A};return u.default=I,Object.defineProperty(u,"__esModule",{value:!0}),u})({},vendetta.commands,vendetta.metro,vendetta.plugin,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 new file mode 100644 index 0000000..81ca78b --- /dev/null +++ b/all-in-one/manifest.json @@ -0,0 +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":"cc98e56b08026da889adb33eda0938182c318327b4fd827369920f13346c6f4e"} \ No newline at end of file