From f84fb0d6f91317c5fa1df667150944590f2c473f Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Wed, 1 Oct 2025 13:54:35 +0000 Subject: [PATCH] deploy: 9a0a6dc224aa73c5fb08c8a883b3f4b4a3597687 --- Commands/index.js | 12 ++++++------ Commands/manifest.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Commands/index.js b/Commands/index.js index 036a505..75739e3 100644 --- a/Commands/index.js +++ b/Commands/index.js @@ -1,8 +1,8 @@ -(function(P,se,s,p,D,b,L,o,re,oe,ie){"use strict";const ce=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}},le=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},de=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}},ue=async function(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()},ye=async function(e="gary"){try{switch(e){case"gary":return(await(await fetch("https://api.garythe.cat/gary")).json()).url;case"goober":return(await(await fetch("https://api.garythe.cat/goober")).json()).url;case"catapi":return(await(await fetch("https://api.thecatapi.com/v1/images/search")).json())[0].url;case"minker":return"https://minky.materii.dev/";default:throw new Error("Invalid Gary image source value")}}catch(n){return console.error(`[Gary API] Error fetching image from ${e}:`,n),null}},B=p.findByProps("sendMessage"),x=function(e){let n=e.text;return s.storage.factSettings?.includeCitation&&e.source&&(n+=` +(function(P,se,s,p,D,b,S,o,re,oe,ie){"use strict";const ce=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}},le=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},de=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}},ue=async function(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()},ye=async function(e="gary"){try{switch(e){case"gary":return(await(await fetch("https://api.garythe.cat/gary")).json()).url;case"goober":return(await(await fetch("https://api.garythe.cat/goober")).json()).url;case"catapi":return(await(await fetch("https://api.thecatapi.com/v1/images/search")).json())[0].url;case"minker":return"https://minky.materii.dev/";default:throw new Error("Invalid Gary image source value")}}catch(n){return console.error(`[Gary API] Error fetching image from ${e}:`,n),null}},B=p.findByProps("sendMessage"),x=function(e){let n=e.text;return s.storage.factSettings?.includeCitation&&e.source&&(n+=` -Source: ${e.source}`),n},pe={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,n){try{const t=await de(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[CatFact] Error:",t),{type:4}}}},fe={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,n){try{const t=await le(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[DogFact] Error:",t),{type:4}}}},me={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,n){try{const t=await ce(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[UselessFact] Error:",t),{type:4}}}},w={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},ge={DETAILED:"detailed"},U="",N={SLM_NOT_INSTALLED:"This list is over 2000 characters. Install the Split Large Messages plugin to send it.",SLM_NOT_ENABLED:"This list is over 2000 characters. Enable the Split Large Messages plugin to send it."},_={SEMICOL:"; ",NEW_LINE:` -`},he="Nothing to see here, huh...",j="github.com/fres621/vendetta-plugins",C={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},be=p.findByProps("sendMessage","receiveMessage"),S=p.findByProps("sendBotMessage"),V=function(){try{return p.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),F=function(e){return Object.keys(e).includes(j)},G=function(e){return Object.values(e).find(function(n){return n.id==j})?.enabled},K=function(e){return e.find(function(n){return n.name===ge.DETAILED})?.value??!1},A=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.filter(function(n){return n&&(typeof n=="string"||typeof n=="object"&&n.name)}).map(function(n){return typeof n=="string"?n:n.name||"Unknown"}).join(_.SEMICOL)||"Unknown"},W=function(e){return e.join(_.NEW_LINE).trimEnd()},$=function(e){return W(e).length},k=async function(e,n){const t=Date.now().toString();await be.sendMessage(e,{content:W(n)},void 0,{nonce:t})},q=function(e,n){return[`**My ${e} List | ${n} ${e}s**`,U]};async function Ce(e,n){try{const t=K(e),r=s.storage.themeListAlwaysDetailed??!1;if(!D.themes||typeof D.themes!="object"){const y=n.channel.id;return S.sendBotMessage(y,"No themes found or themes not loaded yet."),{type:4}}const i=Object.values(D.themes),a=n.channel.id,c=q("Theme",Object.keys(D.themes).length);if(i.length)for(const y of i){if(!y||typeof y!="object")continue;const{selected:l,data:d,id:m}=y,E=d?.name||"Unknown Theme",v=d?.description||"No description",M=d?.authors;t||r?c.push(`> **Name**: ${E}`,`> **Selected**: ${l?C.SELECTED:C.NOT_SELECTED}`,`> **Description**: ${v}`,`> **Authors**: ${A(M)}`,`> **[Install!](${m||"unknown"})**`,U):c.push(`> ${l?C.SELECTED:C.NOT_SELECTED} **${E}** by ${A(M)}`)}else c.push(he);const u=$(c)>V;if(u&&!F(b.plugins))S.sendBotMessage(a,N.SLM_NOT_INSTALLED);else if(u&&!G(b.plugins))S.sendBotMessage(a,N.SLM_NOT_ENABLED);else{if($(c)>2e3)return L.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(a,c)}});await k(a,c)}}catch(t){return console.error("[ThemeList] Error:",t),{type:4}}}async function we(e,n){try{const t=K(e),r=s.storage.pluginListAlwaysDetailed??!1,i=n.channel.id;if(!b.plugins||typeof b.plugins!="object")return S.sendBotMessage(i,"No plugins found or plugins not loaded yet."),{type:4};const a=q("Plugin",Object.keys(b.plugins).length);for(const u of Object.values(b.plugins)){if(!u||typeof u!="object")continue;const{enabled:y,manifest:l,id:d}=u,m=l?.name||"Unknown Plugin",E=l?.description||"No description",v=l?.authors;t||r?a.push(`> **Name**: ${m}`,`> **Status**: ${y?C.ENABLED:C.DISABLED}`,`> **Description**: ${E}`,`> **Authors**: ${A(v)}`,`> **[Install!](${d||"unknown"})**`,U):a.push(`> ${y?C.ENABLED:C.DISABLED} **${m}** by ${A(v)}`)}const c=$(a)>V;if(c&&!F(b.plugins))S.sendBotMessage(i,N.SLM_NOT_INSTALLED);else if(c&&!G(b.plugins))S.sendBotMessage(i,N.SLM_NOT_ENABLED);else{if($(a)>2e3)return L.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(i,a)}});await k(i,a)}}catch(t){return console.error("[PluginList] Error:",t),{type:4}}}const Se={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:we,applicationId:"-1",inputType:1,type:1},Ee={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:Ce,applicationId:"-1",inputType:1,type:1},ve=p.findByStoreName("UserStore"),Le=p.findByProps("sendMessage"),De={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,n){try{const t=(await ve.getUser(e[0].value)).getAvatarURL(512),r=await ue(t),i=Date.now().toString();return Le.sendMessage(n.channel.id,{content:r.url},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[PetPet] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},Ne=p.findByProps("sendMessage"),Ae=p.findByProps("sendBotMessage","sendMessage","receiveMessage"),H=async function(e){const n="https://konachan.com/post.json",t=e?"rating:explicit":"rating:safe",r=Math.floor(Math.random()*100);try{const i=await(await fetch(`${n}?tags=${t}&limit=1&page=${r}`)).json();return!Array.isArray(i)||i.length===0?null:i[0].file_url}catch(i){return console.error("[KonoChan Randomizer] Error fetching image:",i),null}},Y=function(){return L.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},z={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},$e={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[z],execute:async function(e,n){try{const t=new Map(e.map(function(i){return[i.name,i]})).get("nsfw")?.value||!1;if(t&&!n.channel.nsfw)return Y(),{type:4};const r=await H(t);return r?(Ae.sendBotMessage(n.channel.id,`Here's your random image: ${r}`),{type:4}):{type:4}}catch(t){return console.error("[KonoSelf] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},ke={name:"konosend",displayName:"konosend",description:"Fetch a random image from KonoChan and send it to the channel.",displayDescription:"Fetch a random image from KonoChan and send it to the channel.",options:[z],execute:async function(e,n){try{const t=new Map(e.map(function(a){return[a.name,a]})).get("nsfw")?.value||!1;if(t&&!n.channel.nsfw)return Y(),{type:4};const r=await H(t);if(!r)return{type:4};const i=Date.now().toString();return Ne.sendMessage(n.channel.id,{content:r},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[KonoSend] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},X=p.findByProps("getAPIBaseURL","get"),Te=p.findByProps("sendMessage"),T=async function(e,n,t){const r=n?`&author_id=${n}`:"",i=t?`&channel_id=${t}`:"",a=n?"":"&min_id=0";return(await X.get({url:`/guilds/${e}/messages/search`,query:`include_nsfw=true${r}${i}${a}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},Z=async function(e,n){const t=n?`&author_id=${n}`:"",r=n?"":"&min_id=0";return(await X.get({url:`/channels/${e}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${t}${r}`})).body.messages[0][0]},Re={name:"firstmessage",displayName:"firstmessage",description:"Tired of scrolling to first message?",displayDescription:"Tired of scrolling to first message?",options:[{name:"user",displayName:"user",description:"Target user to get their first message in this server/dm",displayDescription:"Target user to get their first message in this server/dm",type:6,required:!1},{name:"channel",displayName:"channel",description:"Target channel to get first message of",displayDescription:"Target channel to get first message of",type:7,required:!1},{name:"send",displayName:"send",description:"Whether to send the resulting url",displayDescription:"Whether to send the resulting url",type:5,required:!1}],execute:async function(e,n){try{const t=new Map(e.map(function(m){return[m.name,m]})),r=t.get("user")?.value,i=t.get("channel")?.value,a=t.get("send")?.value,c=n.guild?.id,u=n.channel.id,y=n.channel.type===1;let l="https://discord.com/channels/",d;if(!r&&!i)y?(d=await Z(u),l+=`@me/${u}/${d.id}`):(d=await T(c),l+=`${c}/${d.channel_id}/${d.id}`);else if(r)y?(d=await Z(u,r),l+=`@me/${u}/${d.id}`):(d=await T(c,r),l+=`${c}/${d.channel_id}/${d.id}`);else if(i){if(y)return{type:4};d=await T(c,null,i),l+=`${c}/${i}/${d.id}`}else{if(y)return{type:4};d=await T(c,r,i),l+=`${c}/${i}/${d.id}`}if(a){const m=Date.now().toString();return Te.sendMessage(n.channel.id,{content:l},void 0,{nonce:m}),{type:4}}else return o.url.openDeeplink(l),{type:4}}catch(t){return console.error("[FirstMessage] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},Me=p.findByProps("sendMessage"),Ie=p.findByProps("sendBotMessage","sendMessage","receiveMessage");function Pe(){let{height:e,width:n,scale:t}=o.ReactNative.Dimensions.get("screen");return e*=t,n*=t,{width:n,height:e}}function Be(){try{const e=p.findByProps("memory");if(!e)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"};const{cpuCoreCount:n,cpuPercentage:t,memory:r}=e,i=t?t.toFixed(2)+"%":"N/A",a=r?parseFloat((r/1e3).toPrecision(3))+" MB":"N/A";let c="N/A";try{const u=p.findByProps("useNetInfo");if(u){const y=Object.values(u.fetch()).filter(function(l){return l?.type})[0];if(y){const{type:l,details:d}=y;c={wifi:"WiFi",ethernet:"Ethernet",other:"Unknown",bluetooth:"Bluetooth",wimax:"WiMAX",vpn:"VPN",cellular:d?.cellularGeneration?.toUpperCase()||"Cellular"}[l]??l}}}catch(u){console.warn("Network info unavailable:",u)}return{cpuCoreCount:n,cpuPerc:i,memUsage:a,netInfo:c}}catch(e){return console.warn("Hardware info unavailable:",e),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"}}}function xe(){try{const{NativeModules:e}=o.ReactNative;return(e.InfoDictionaryManager??e.RTNClientInfoManager)||{}}catch(e){return console.warn("Discord info unavailable:",e),{}}}function Ue(){try{const{cpuCoreCount:e,cpuPerc:n,memUsage:t,netInfo:r}=Be(),i=xe(),{vendetta:a,discord:c,react:u,hermes:y,os:l,device:d}=re.getDebugInfo(),{version:m,bytecodeVersion:E}=y||{},{version:v,nativeVersion:M}=u||{},{name:ee,version:nt,sdk:te}=l||{},{manufacturer:at,brand:ne,model:ae,codename:st}=d||{},{version:rt}=a||{},{version:ot,build:it}=c||{},{ReleaseChannel:ct}=i,lt=ee=="iOS"?st:`${ne} ${ae}`,{width:dt,height:ut}=Pe();let I={Device:{Device:lt||"Unknown",Model:ae||"Unknown",Manufacturer:at||"Unknown",Brand:ne||"Unknown",Display:`${dt}x${ut}`},Hardware:{"CPU Cores":e||"N/A",Network:r},Software:{OS:ee||"Unknown",Version:nt||"Unknown"},Discord:{Branch:ct||"Unknown",Version:ot||"Unknown",Build:it||"Unknown",Vendetta:rt||"Unknown","CPU Usage":n,"Memory Usage":t},React:{Version:v||"Unknown","Hermes Bytecode":E||"Unknown",Hermes:m||"Unknown",Native:M||"Unknown"}};return window.enmity&&(I.Discord.Enmity=window.enmity.version),window.aliucord&&(I.Discord.Aliucord=window.aliucord.version),te&&(I.Software["SDK Version"]=te),I}catch(e){throw console.error("Error generating system info:",e),e}}const J=["device","hardware","software","discord","react","ephemeral"];for(const e of J)s.storage[e]===void 0&&(s.storage[e]=!0);function Oe(e,n){try{let t=[`__System Information__ -`];const r=Ue();Object.keys(r).forEach(function(c){const u=s.storage[c.toLowerCase()],y=e.find(function(l){return l.name==c.toLowerCase()})?.value??u;(y||u)&&!(u&&!y)&&(t.push(`[**${c}**]`),Object.keys(r[c]).forEach(function(l){t.push(`> ${l}: ${r[c][l]}`)}))});const i=s.storage.ephemeral,a=e.find(function(c){return c.name=="ephemeral"})?.value??i;if((a||i)&&!(i&&!a))return Ie.sendBotMessage(n.channel.id,t.join(` +Source: ${e.source}`),n},pe={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,n){try{const t=await de(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[CatFact] Error:",t),{type:4}}}},fe={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,n){try{const t=await le(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[DogFact] Error:",t),{type:4}}}},me={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,n){try{const t=await ce(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[UselessFact] Error:",t),{type:4}}}},w={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},ge={DETAILED:"detailed"},O="",N={SLM_NOT_INSTALLED:"This list is over 2000 characters. Install the Split Large Messages plugin to send it.",SLM_NOT_ENABLED:"This list is over 2000 characters. Enable the Split Large Messages plugin to send it."},_={SEMICOL:"; ",NEW_LINE:` +`},he="Nothing to see here, huh...",j="github.com/fres621/vendetta-plugins",C={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},be=p.findByProps("sendMessage","receiveMessage"),E=p.findByProps("sendBotMessage"),V=function(){try{return p.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),F=function(e){return Object.keys(e).includes(j)},G=function(e){return Object.values(e).find(function(n){return n.id==j})?.enabled},K=function(e){return e.find(function(n){return n.name===ge.DETAILED})?.value??!1},A=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.filter(function(n){return n&&(typeof n=="string"||typeof n=="object"&&n.name)}).map(function(n){return typeof n=="string"?n:n.name||"Unknown"}).join(_.SEMICOL)||"Unknown"},W=function(e){return e.join(_.NEW_LINE).trimEnd()},$=function(e){return W(e).length},k=async function(e,n){const t=Date.now().toString();await be.sendMessage(e,{content:W(n)},void 0,{nonce:t})},q=function(e,n){return[`**My ${e} List | ${n} ${e}s**`,O]};async function Ce(e,n){try{const t=K(e),r=s.storage.themeListAlwaysDetailed??!1;if(!D.themes||typeof D.themes!="object"){const y=n.channel.id;return E.sendBotMessage(y,"No themes found or themes not loaded yet."),{type:4}}const i=Object.values(D.themes),a=n.channel.id,c=q("Theme",Object.keys(D.themes).length);if(i.length)for(const y of i){if(!y||typeof y!="object")continue;const{selected:l,data:d,id:m}=y,v=d?.name||"Unknown Theme",L=d?.description||"No description",M=d?.authors;t||r?c.push(`> **Name**: ${v}`,`> **Selected**: ${l?C.SELECTED:C.NOT_SELECTED}`,`> **Description**: ${L}`,`> **Authors**: ${A(M)}`,`> **[Install!](${m||"unknown"})**`,O):c.push(`> ${l?C.SELECTED:C.NOT_SELECTED} **${v}** by ${A(M)}`)}else c.push(he);const u=$(c)>V;if(u&&!F(b.plugins))E.sendBotMessage(a,N.SLM_NOT_INSTALLED);else if(u&&!G(b.plugins))E.sendBotMessage(a,N.SLM_NOT_ENABLED);else{if($(c)>2e3)return S.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(a,c)}});await k(a,c)}}catch(t){return console.error("[ThemeList] Error:",t),{type:4}}}async function Se(e,n){try{const t=K(e),r=s.storage.pluginListAlwaysDetailed??!1,i=n.channel.id;if(!b.plugins||typeof b.plugins!="object")return E.sendBotMessage(i,"No plugins found or plugins not loaded yet."),{type:4};const a=q("Plugin",Object.keys(b.plugins).length);for(const u of Object.values(b.plugins)){if(!u||typeof u!="object")continue;const{enabled:y,manifest:l,id:d}=u,m=l?.name||"Unknown Plugin",v=l?.description||"No description",L=l?.authors;t||r?a.push(`> **Name**: ${m}`,`> **Status**: ${y?C.ENABLED:C.DISABLED}`,`> **Description**: ${v}`,`> **Authors**: ${A(L)}`,`> **[Install!](${d||"unknown"})**`,O):a.push(`> ${y?C.ENABLED:C.DISABLED} **${m}** by ${A(L)}`)}const c=$(a)>V;if(c&&!F(b.plugins))E.sendBotMessage(i,N.SLM_NOT_INSTALLED);else if(c&&!G(b.plugins))E.sendBotMessage(i,N.SLM_NOT_ENABLED);else{if($(a)>2e3)return S.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(i,a)}});await k(i,a)}}catch(t){return console.error("[PluginList] Error:",t),{type:4}}}const we={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:Se,applicationId:"-1",inputType:1,type:1},Ee={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:Ce,applicationId:"-1",inputType:1,type:1},ve=p.findByStoreName("UserStore"),Le=p.findByProps("sendMessage"),De={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,n){try{const t=(await ve.getUser(e[0].value)).getAvatarURL(512),r=await ue(t),i=Date.now().toString();return Le.sendMessage(n.channel.id,{content:r.url},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[PetPet] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},Ne=p.findByProps("sendMessage"),Ae=p.findByProps("sendBotMessage","sendMessage","receiveMessage"),H=async function(e){const n="https://konachan.com/post.json",t=e?"rating:explicit":"rating:safe",r=Math.floor(Math.random()*100);try{const i=await(await fetch(`${n}?tags=${t}&limit=1&page=${r}`)).json();return!Array.isArray(i)||i.length===0?null:i[0].file_url}catch(i){return console.error("[KonoChan Randomizer] Error fetching image:",i),null}},Y=function(){return S.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},z={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},$e={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[z],execute:async function(e,n){try{const t=new Map(e.map(function(i){return[i.name,i]})).get("nsfw")?.value||!1;if(t&&!n.channel.nsfw)return Y(),{type:4};const r=await H(t);return r?(Ae.sendBotMessage(n.channel.id,`Here's your random image: ${r}`),{type:4}):{type:4}}catch(t){return console.error("[KonoSelf] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},ke={name:"konosend",displayName:"konosend",description:"Fetch a random image from KonoChan and send it to the channel.",displayDescription:"Fetch a random image from KonoChan and send it to the channel.",options:[z],execute:async function(e,n){try{const t=new Map(e.map(function(a){return[a.name,a]})).get("nsfw")?.value||!1;if(t&&!n.channel.nsfw)return Y(),{type:4};const r=await H(t);if(!r)return{type:4};const i=Date.now().toString();return Ne.sendMessage(n.channel.id,{content:r},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[KonoSend] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},X=p.findByProps("getAPIBaseURL","get"),Te=p.findByProps("sendMessage"),T=async function(e,n,t){const r=n?`&author_id=${n}`:"",i=t?`&channel_id=${t}`:"",a=n?"":"&min_id=0";return(await X.get({url:`/guilds/${e}/messages/search`,query:`include_nsfw=true${r}${i}${a}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},Z=async function(e,n){const t=n?`&author_id=${n}`:"",r=n?"":"&min_id=0";return(await X.get({url:`/channels/${e}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${t}${r}`})).body.messages[0][0]},Re={name:"firstmessage",displayName:"firstmessage",description:"Tired of scrolling to first message?",displayDescription:"Tired of scrolling to first message?",options:[{name:"user",displayName:"user",description:"Target user to get their first message in this server/dm",displayDescription:"Target user to get their first message in this server/dm",type:6,required:!1},{name:"channel",displayName:"channel",description:"Target channel to get first message of",displayDescription:"Target channel to get first message of",type:7,required:!1},{name:"send",displayName:"send",description:"Whether to send the resulting url",displayDescription:"Whether to send the resulting url",type:5,required:!1}],execute:async function(e,n){try{const t=new Map(e.map(function(m){return[m.name,m]})),r=t.get("user")?.value,i=t.get("channel")?.value,a=t.get("send")?.value,c=n.guild?.id,u=n.channel.id,y=n.channel.type===1;let l="https://discord.com/channels/",d;if(!r&&!i)y?(d=await Z(u),l+=`@me/${u}/${d.id}`):(d=await T(c),l+=`${c}/${d.channel_id}/${d.id}`);else if(r)y?(d=await Z(u,r),l+=`@me/${u}/${d.id}`):(d=await T(c,r),l+=`${c}/${d.channel_id}/${d.id}`);else if(i){if(y)return{type:4};d=await T(c,null,i),l+=`${c}/${i}/${d.id}`}else{if(y)return{type:4};d=await T(c,r,i),l+=`${c}/${i}/${d.id}`}if(a){const m=Date.now().toString();return Te.sendMessage(n.channel.id,{content:l},void 0,{nonce:m}),{type:4}}else return o.url.openDeeplink(l),{type:4}}catch(t){return console.error("[FirstMessage] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},Me=p.findByProps("sendMessage"),Ie=p.findByProps("sendBotMessage","sendMessage","receiveMessage");function Pe(){let{height:e,width:n,scale:t}=o.ReactNative.Dimensions.get("screen");return e*=t,n*=t,{width:n,height:e}}function Be(){try{const e=p.findByProps("memory");if(!e)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"};const{cpuCoreCount:n,cpuPercentage:t,memory:r}=e,i=t?t.toFixed(2)+"%":"N/A",a=r?parseFloat((r/1e3).toPrecision(3))+" MB":"N/A";let c="N/A";try{const u=p.findByProps("useNetInfo");if(u){const y=Object.values(u.fetch()).filter(function(l){return l?.type})[0];if(y){const{type:l,details:d}=y;c={wifi:"WiFi",ethernet:"Ethernet",other:"Unknown",bluetooth:"Bluetooth",wimax:"WiMAX",vpn:"VPN",cellular:d?.cellularGeneration?.toUpperCase()||"Cellular"}[l]??l}}}catch(u){console.warn("Network info unavailable:",u)}return{cpuCoreCount:n,cpuPerc:i,memUsage:a,netInfo:c}}catch(e){return console.warn("Hardware info unavailable:",e),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"}}}function xe(){try{const{NativeModules:e}=o.ReactNative;return(e.InfoDictionaryManager??e.RTNClientInfoManager)||{}}catch(e){return console.warn("Discord info unavailable:",e),{}}}function Oe(){try{const{cpuCoreCount:e,cpuPerc:n,memUsage:t,netInfo:r}=Be(),i=xe(),{vendetta:a,discord:c,react:u,hermes:y,os:l,device:d}=re.getDebugInfo(),{version:m,bytecodeVersion:v}=y||{},{version:L,nativeVersion:M}=u||{},{name:ee,version:nt,sdk:te}=l||{},{manufacturer:at,brand:ne,model:ae,codename:st}=d||{},{version:rt}=a||{},{version:ot,build:it}=c||{},{ReleaseChannel:ct}=i,lt=ee=="iOS"?st:`${ne} ${ae}`,{width:dt,height:ut}=Pe();let I={Device:{Device:lt||"Unknown",Model:ae||"Unknown",Manufacturer:at||"Unknown",Brand:ne||"Unknown",Display:`${dt}x${ut}`},Hardware:{"CPU Cores":e||"N/A",Network:r},Software:{OS:ee||"Unknown",Version:nt||"Unknown"},Discord:{Branch:ct||"Unknown",Version:ot||"Unknown",Build:it||"Unknown",Vendetta:rt||"Unknown","CPU Usage":n,"Memory Usage":t},React:{Version:L||"Unknown","Hermes Bytecode":v||"Unknown",Hermes:m||"Unknown",Native:M||"Unknown"}};return window.enmity&&(I.Discord.Enmity=window.enmity.version),window.aliucord&&(I.Discord.Aliucord=window.aliucord.version),te&&(I.Software["SDK Version"]=te),I}catch(e){throw console.error("Error generating system info:",e),e}}const J=["device","hardware","software","discord","react","ephemeral"];for(const e of J)s.storage[e]===void 0&&(s.storage[e]=!0);function Ue(e,n){try{let t=[`__System Information__ +`];const r=Oe();Object.keys(r).forEach(function(c){const u=s.storage[c.toLowerCase()],y=e.find(function(l){return l.name==c.toLowerCase()})?.value??u;(y||u)&&!(u&&!y)&&(t.push(`[**${c}**]`),Object.keys(r[c]).forEach(function(l){t.push(`> ${l}: ${r[c][l]}`)}))});const i=s.storage.ephemeral,a=e.find(function(c){return c.name=="ephemeral"})?.value??i;if((a||i)&&!(i&&!a))return Ie.sendBotMessage(n.channel.id,t.join(` `)),{type:4};{const c=Date.now().toString();return Me.sendMessage(n.channel.id,{content:t.join(` -`)},void 0,{nonce:c}),{type:4}}}catch(t){return console.error("[Sysinfo] Error:",t),{type:4}}}const _e={name:"sysinfo",displayName:"sysinfo",description:"Display system information",displayDescription:"Display system information",options:[{name:"ephemeral",displayName:"ephemeral",description:"Keep sysinfo ephemeral (default: true)",displayDescription:"Keep sysinfo ephemeral (default: true)",type:5,required:!1},...J.slice(0,-1).map(function(e){return{name:e,displayName:e,description:`Display the ${e} section. Set default in settings.`,displayDescription:`Display the ${e} section. Set default in settings.`,type:5,required:!1}})],execute:Oe,applicationId:"-1",inputType:1,type:1},Q=p.findByProps("sendMessage","receiveMessage"),je=p.findByStoreName("SpotifyStore");async function Ve(e,n){return s.storage.enabledCommands?.spotifyTrack?R(n,function(t){return`https://open.spotify.com/track/${t.id}`}):{type:4}}async function Fe(e,n){return s.storage.enabledCommands?.spotifyAlbum?R(n,function(t){return`https://open.spotify.com/album/${t.album.id}`}):{type:4}}async function Ge(e,n){return s.storage.enabledCommands?.spotifyArtists?R(n,function(t){return t.artists.map(function(r){return`[${r.name}](${r.external_urls.spotify})`}).join(` -`)}):{type:4}}async function Ke(e,n){return s.storage.enabledCommands?.spotifyCover?R(n,function(t){return t.album.image.url}):{type:4}}async function R(e,n){try{const t=e.channel.id,r=je?.getTrack?.();if(!r){const c=Date.now().toString();return Q.sendMessage(t,{content:"You are not listening to any track."},void 0,{nonce:c}),{type:4}}const i=n(r),a=Date.now().toString();return Q.sendMessage(t,{content:i},void 0,{nonce:a}),{type:4}}catch(t){return console.error("[Spotify Command] Error:",t),{type:4}}}const We={name:"spotify track",displayName:"spotify track",description:"Sends your current Spotify track",displayDescription:"Sends your current Spotify track",applicationId:"-1",inputType:1,type:1,execute:Ve},qe={name:"spotify album",displayName:"spotify album",description:"Sends your current track's album",displayDescription:"Sends your current track's album",applicationId:"-1",inputType:1,type:1,execute:Fe},He={name:"spotify artists",displayName:"spotify artists",description:"Sends your current track's artists",displayDescription:"Sends your current track's artists",applicationId:"-1",inputType:1,type:1,execute:Ge},Ye={name:"spotify cover",displayName:"spotify cover",description:"Sends your current track's cover",displayDescription:"Sends your current track's cover",applicationId:"-1",inputType:1,type:1,execute:Ke},ze=p.findByProps("sendMessage"),Xe={name:"gary",displayName:"gary",description:"Send a random Gary image to the channel.",displayDescription:"Send a random Gary image to the channel.",options:[],execute:async function(e,n){try{const t=s.storage.garySettings?.imageSource||"gary",r=await ye(t);if(!r)return{type:4};const i=Date.now().toString();return ze.sendMessage(n.channel.id,{content:r},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[Gary] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},{ScrollView:Ze}=p.findByProps("ScrollView"),{TableRowGroup:g,TableSwitchRow:f,Stack:Je,TableRow:h}=p.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");s.storage.factSettings||(s.storage.factSettings={sendAsReply:!0,includeCitation:!1}),s.storage.listSettings||(s.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),s.storage.garySettings||(s.storage.garySettings={imageSource:"gary"}),s.storage.enabledCommands||(s.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0}),s.storage.pendingRestart||(s.storage.pendingRestart=!1);function Qe(){oe.useProxy(s.storage);const[e,n]=o.React.useReducer(function(a){return a+1},0);o.React.useEffect(function(){return function(){s.storage.pendingRestart&&(s.storage.pendingRestart=!1,L.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const t=function(a,c){s.storage.enabledCommands[a]=c,s.storage.pendingRestart=!0,n()},r=function(a){s.storage.garySettings.imageSource=a,n()},i=function(){L.alerts.showInputAlert({title:"Choose Gary Image Source",content:"Select an image source:",placeholder:"",confirmText:"Cancel",confirmColor:"grey",onConfirm:function(){},extraOptions:[{text:"Gary API",onPress:function(){return r("gary")}},{text:"Cat API",onPress:function(){return r("catapi")}},{text:"Minker API",onPress:function(){return r("minker")}},{text:"Goober API",onPress:function(){return r("goober")}}]})};return o.React.createElement(ie.View,{style:{flex:1}},o.React.createElement(Ze,{style:{flex:1},contentContainerStyle:{paddingBottom:38}},o.React.createElement(Je,{spacing:8},o.React.createElement(g,{title:"Facts Commands"},o.React.createElement(f,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:s.storage.factSettings?.sendAsReply??!0,onValueChange:function(a){s.storage.factSettings.sendAsReply=a,n()}}),o.React.createElement(f,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:s.storage.factSettings?.includeCitation??!1,onValueChange:function(a){s.storage.factSettings.includeCitation=a,n()}}),o.React.createElement(f,{label:"/catfact",subLabel:"Get random cat facts",value:s.storage.enabledCommands?.catfact??!0,onValueChange:function(a){return t("catfact",a)}}),o.React.createElement(f,{label:"/dogfact",subLabel:"Get random dog facts",value:s.storage.enabledCommands?.dogfact??!0,onValueChange:function(a){return t("dogfact",a)}}),o.React.createElement(f,{label:"/useless",subLabel:"Get random useless facts",value:s.storage.enabledCommands?.useless??!0,onValueChange:function(a){return t("useless",a)}})),o.React.createElement(g,{title:"List Commands"},o.React.createElement(f,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:s.storage.listSettings?.pluginListAlwaysDetailed??!1,onValueChange:function(a){s.storage.listSettings.pluginListAlwaysDetailed=a,n()}}),o.React.createElement(f,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:s.storage.listSettings?.themeListAlwaysDetailed??!1,onValueChange:function(a){s.storage.listSettings.themeListAlwaysDetailed=a,n()}}),o.React.createElement(f,{label:"/plugin-list",subLabel:"List all installed plugins",value:s.storage.enabledCommands?.pluginList??!0,onValueChange:function(a){return t("pluginList",a)}}),o.React.createElement(f,{label:"/theme-list",subLabel:"List all installed themes",value:s.storage.enabledCommands?.themeList??!0,onValueChange:function(a){return t("themeList",a)}})),o.React.createElement(g,{title:"Petpet Commands"},o.React.createElement(f,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:s.storage.enabledCommands?.petpet??!0,onValueChange:function(a){return t("petpet",a)}})),o.React.createElement(g,{title:"Gary Commands"},o.React.createElement(f,{label:"/gary",subLabel:"Send random Gary images to channel",value:s.storage.enabledCommands?.gary??!0,onValueChange:function(a){return t("gary",a)}}),o.React.createElement(h,{label:"Gary Image Source",subLabel:`Current: ${s.storage.garySettings?.imageSource==="gary"?"Gary API":s.storage.garySettings?.imageSource==="catapi"?"Cat API":s.storage.garySettings?.imageSource==="minker"?"Minker API":s.storage.garySettings?.imageSource==="goober"?"Goober API":"Gary API"}`,onPress:i})),o.React.createElement(g,{title:"KonoChan Commands"},o.React.createElement(f,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:s.storage.enabledCommands?.konoself??!0,onValueChange:function(a){return t("konoself",a)}}),o.React.createElement(f,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:s.storage.enabledCommands?.konosend??!0,onValueChange:function(a){return t("konosend",a)}})),o.React.createElement(g,{title:"Message Commands"},o.React.createElement(f,{label:"/firstmessage",subLabel:"Get the first message in a channel",value:s.storage.enabledCommands?.firstmessage??!0,onValueChange:function(a){return t("firstmessage",a)}})),o.React.createElement(g,{title:"System Commands"},o.React.createElement(f,{label:"/sysinfo",subLabel:"Display system information",value:s.storage.enabledCommands?.sysinfo??!0,onValueChange:function(a){return t("sysinfo",a)}})),o.React.createElement(g,{title:"Spotify Commands"},o.React.createElement(f,{label:"/spotify track",subLabel:"Share your current Spotify track",value:s.storage.enabledCommands?.spotifyTrack??!0,onValueChange:function(a){return t("spotifyTrack",a)}}),o.React.createElement(f,{label:"/spotify album",subLabel:"Share your current track's album",value:s.storage.enabledCommands?.spotifyAlbum??!0,onValueChange:function(a){return t("spotifyAlbum",a)}}),o.React.createElement(f,{label:"/spotify artists",subLabel:"Share your current track's artists",value:s.storage.enabledCommands?.spotifyArtists??!0,onValueChange:function(a){return t("spotifyArtists",a)}}),o.React.createElement(f,{label:"/spotify cover",subLabel:"Share your current track's cover",value:s.storage.enabledCommands?.spotifyCover??!0,onValueChange:function(a){return t("spotifyCover",a)}})),o.React.createElement(g,{title:"Credits"},o.React.createElement(h,{label:"Facts Commands",subLabel:"by jdev082"}),o.React.createElement(h,{label:"List Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"PetPet Command",subLabel:"by wolfieeee"}),o.React.createElement(h,{label:"KonoChan Commands",subLabel:"by btmc727 & Rico040"}),o.React.createElement(h,{label:"FirstMessage Command",subLabel:"by sapphire"}),o.React.createElement(h,{label:"Sysinfo Command",subLabel:"by mugman"}),o.React.createElement(h,{label:"Spotify Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"Gary Command",subLabel:"by Zach Orange"})),o.React.createElement(g,{title:"About"},o.React.createElement(h,{label:"Commands",subLabel:"A collection of commands"})))))}s.storage.factSettings||(s.storage.factSettings={sendAsReply:!0,includeCitation:!1}),s.storage.listSettings||(s.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),s.storage.garySettings||(s.storage.garySettings={imageSource:"gary"}),s.storage.enabledCommands||(s.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0});const et={catfact:pe,dogfact:fe,useless:me,petpet:De,pluginList:Se,themeList:Ee,konoself:$e,konosend:ke,firstmessage:Re,sysinfo:_e,spotifyTrack:We,spotifyAlbum:qe,spotifyArtists:He,spotifyCover:Ye,gary:Xe};let O=[];var tt={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[e,n]of Object.entries(et))s.storage.enabledCommands[e]&&O.push(se.registerCommand(n));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),O.forEach(function(e){return e()}),O=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:Qe};return P.default=tt,Object.defineProperty(P,"__esModule",{value:!0}),P})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.storage,vendetta.metro.common.ReactNative); +`)},void 0,{nonce:c}),{type:4}}}catch(t){return console.error("[Sysinfo] Error:",t),{type:4}}}const _e={name:"sysinfo",displayName:"sysinfo",description:"Display system information",displayDescription:"Display system information",options:[{name:"ephemeral",displayName:"ephemeral",description:"Keep sysinfo ephemeral (default: true)",displayDescription:"Keep sysinfo ephemeral (default: true)",type:5,required:!1},...J.slice(0,-1).map(function(e){return{name:e,displayName:e,description:`Display the ${e} section. Set default in settings.`,displayDescription:`Display the ${e} section. Set default in settings.`,type:5,required:!1}})],execute:Ue,applicationId:"-1",inputType:1,type:1},Q=p.findByProps("sendMessage","receiveMessage"),je=p.findByStoreName("SpotifyStore");async function Ve(e,n){return s.storage.enabledCommands?.spotifyTrack?R(n,function(t){return`https://open.spotify.com/track/${t.id}`}):{type:4}}async function Fe(e,n){return s.storage.enabledCommands?.spotifyAlbum?R(n,function(t){return`https://open.spotify.com/album/${t.album.id}`}):{type:4}}async function Ge(e,n){return s.storage.enabledCommands?.spotifyArtists?R(n,function(t){return t.artists.map(function(r){return`[${r.name}](${r.external_urls.spotify})`}).join(` +`)}):{type:4}}async function Ke(e,n){return s.storage.enabledCommands?.spotifyCover?R(n,function(t){return t.album.image.url}):{type:4}}async function R(e,n){try{const t=e.channel.id,r=je?.getTrack?.();if(!r){const c=Date.now().toString();return Q.sendMessage(t,{content:"You are not listening to any track."},void 0,{nonce:c}),{type:4}}const i=n(r),a=Date.now().toString();return Q.sendMessage(t,{content:i},void 0,{nonce:a}),{type:4}}catch(t){return console.error("[Spotify Command] Error:",t),{type:4}}}const We={name:"spotify track",displayName:"spotify track",description:"Sends your current Spotify track",displayDescription:"Sends your current Spotify track",applicationId:"-1",inputType:1,type:1,execute:Ve},qe={name:"spotify album",displayName:"spotify album",description:"Sends your current track's album",displayDescription:"Sends your current track's album",applicationId:"-1",inputType:1,type:1,execute:Fe},He={name:"spotify artists",displayName:"spotify artists",description:"Sends your current track's artists",displayDescription:"Sends your current track's artists",applicationId:"-1",inputType:1,type:1,execute:Ge},Ye={name:"spotify cover",displayName:"spotify cover",description:"Sends your current track's cover",displayDescription:"Sends your current track's cover",applicationId:"-1",inputType:1,type:1,execute:Ke},ze=p.findByProps("sendMessage"),Xe={name:"gary",displayName:"gary",description:"Send a random Gary image to the channel.",displayDescription:"Send a random Gary image to the channel.",options:[],execute:async function(e,n){try{const t=s.storage.garySettings?.imageSource||"gary",r=await ye(t);if(!r)return{type:4};const i=Date.now().toString();return ze.sendMessage(n.channel.id,{content:r},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[Gary] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},{ScrollView:Ze}=p.findByProps("ScrollView"),{TableRowGroup:g,TableSwitchRow:f,Stack:Je,TableRow:h}=p.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");s.storage.factSettings||(s.storage.factSettings={sendAsReply:!0,includeCitation:!1}),s.storage.listSettings||(s.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),s.storage.garySettings||(s.storage.garySettings={imageSource:"gary"}),s.storage.enabledCommands||(s.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0}),s.storage.pendingRestart||(s.storage.pendingRestart=!1);function Qe(){oe.useProxy(s.storage);const[e,n]=o.React.useReducer(function(a){return a+1},0);o.React.useEffect(function(){return function(){s.storage.pendingRestart&&(s.storage.pendingRestart=!1,S.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const t=function(a,c){s.storage.enabledCommands[a]=c,s.storage.pendingRestart=!0,n()},r=function(a){s.storage.garySettings.imageSource=a,n()},i=function(){S.alerts.showConfirmationAlert({title:"Choose Gary Image Source",content:"Select an image source for the Gary command:",confirmText:"Gary API",cancelText:"Other Options",confirmColor:"brand",onConfirm:function(){return r("gary")},onCancel:function(){S.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from remaining options:",confirmText:"Cat API",cancelText:"More Options",confirmColor:"brand",onConfirm:function(){return r("catapi")},onCancel:function(){S.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from final options:",confirmText:"Minker API",cancelText:"Goober API",confirmColor:"brand",onConfirm:function(){return r("minker")},onCancel:function(){return r("goober")}})}})}})};return o.React.createElement(ie.View,{style:{flex:1}},o.React.createElement(Ze,{style:{flex:1},contentContainerStyle:{paddingBottom:38}},o.React.createElement(Je,{spacing:8},o.React.createElement(g,{title:"Facts Commands"},o.React.createElement(f,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:s.storage.factSettings?.sendAsReply??!0,onValueChange:function(a){s.storage.factSettings.sendAsReply=a,n()}}),o.React.createElement(f,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:s.storage.factSettings?.includeCitation??!1,onValueChange:function(a){s.storage.factSettings.includeCitation=a,n()}}),o.React.createElement(f,{label:"/catfact",subLabel:"Get random cat facts",value:s.storage.enabledCommands?.catfact??!0,onValueChange:function(a){return t("catfact",a)}}),o.React.createElement(f,{label:"/dogfact",subLabel:"Get random dog facts",value:s.storage.enabledCommands?.dogfact??!0,onValueChange:function(a){return t("dogfact",a)}}),o.React.createElement(f,{label:"/useless",subLabel:"Get random useless facts",value:s.storage.enabledCommands?.useless??!0,onValueChange:function(a){return t("useless",a)}})),o.React.createElement(g,{title:"List Commands"},o.React.createElement(f,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:s.storage.listSettings?.pluginListAlwaysDetailed??!1,onValueChange:function(a){s.storage.listSettings.pluginListAlwaysDetailed=a,n()}}),o.React.createElement(f,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:s.storage.listSettings?.themeListAlwaysDetailed??!1,onValueChange:function(a){s.storage.listSettings.themeListAlwaysDetailed=a,n()}}),o.React.createElement(f,{label:"/plugin-list",subLabel:"List all installed plugins",value:s.storage.enabledCommands?.pluginList??!0,onValueChange:function(a){return t("pluginList",a)}}),o.React.createElement(f,{label:"/theme-list",subLabel:"List all installed themes",value:s.storage.enabledCommands?.themeList??!0,onValueChange:function(a){return t("themeList",a)}})),o.React.createElement(g,{title:"Petpet Commands"},o.React.createElement(f,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:s.storage.enabledCommands?.petpet??!0,onValueChange:function(a){return t("petpet",a)}})),o.React.createElement(g,{title:"Gary Commands"},o.React.createElement(f,{label:"/gary",subLabel:"Send random Gary images to channel",value:s.storage.enabledCommands?.gary??!0,onValueChange:function(a){return t("gary",a)}}),o.React.createElement(h,{label:"Gary Image Source",subLabel:`Current: ${s.storage.garySettings?.imageSource==="gary"?"Gary API":s.storage.garySettings?.imageSource==="catapi"?"Cat API":s.storage.garySettings?.imageSource==="minker"?"Minker API":s.storage.garySettings?.imageSource==="goober"?"Goober API":"Gary API"}`,onPress:i})),o.React.createElement(g,{title:"KonoChan Commands"},o.React.createElement(f,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:s.storage.enabledCommands?.konoself??!0,onValueChange:function(a){return t("konoself",a)}}),o.React.createElement(f,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:s.storage.enabledCommands?.konosend??!0,onValueChange:function(a){return t("konosend",a)}})),o.React.createElement(g,{title:"Message Commands"},o.React.createElement(f,{label:"/firstmessage",subLabel:"Get the first message in a channel",value:s.storage.enabledCommands?.firstmessage??!0,onValueChange:function(a){return t("firstmessage",a)}})),o.React.createElement(g,{title:"System Commands"},o.React.createElement(f,{label:"/sysinfo",subLabel:"Display system information",value:s.storage.enabledCommands?.sysinfo??!0,onValueChange:function(a){return t("sysinfo",a)}})),o.React.createElement(g,{title:"Spotify Commands"},o.React.createElement(f,{label:"/spotify track",subLabel:"Share your current Spotify track",value:s.storage.enabledCommands?.spotifyTrack??!0,onValueChange:function(a){return t("spotifyTrack",a)}}),o.React.createElement(f,{label:"/spotify album",subLabel:"Share your current track's album",value:s.storage.enabledCommands?.spotifyAlbum??!0,onValueChange:function(a){return t("spotifyAlbum",a)}}),o.React.createElement(f,{label:"/spotify artists",subLabel:"Share your current track's artists",value:s.storage.enabledCommands?.spotifyArtists??!0,onValueChange:function(a){return t("spotifyArtists",a)}}),o.React.createElement(f,{label:"/spotify cover",subLabel:"Share your current track's cover",value:s.storage.enabledCommands?.spotifyCover??!0,onValueChange:function(a){return t("spotifyCover",a)}})),o.React.createElement(g,{title:"Credits"},o.React.createElement(h,{label:"Facts Commands",subLabel:"by jdev082"}),o.React.createElement(h,{label:"List Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"PetPet Command",subLabel:"by wolfieeee"}),o.React.createElement(h,{label:"KonoChan Commands",subLabel:"by btmc727 & Rico040"}),o.React.createElement(h,{label:"FirstMessage Command",subLabel:"by sapphire"}),o.React.createElement(h,{label:"Sysinfo Command",subLabel:"by mugman"}),o.React.createElement(h,{label:"Spotify Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"Gary Command",subLabel:"by Zach Orange"})),o.React.createElement(g,{title:"About"},o.React.createElement(h,{label:"Commands",subLabel:"A collection of commands"})))))}s.storage.factSettings||(s.storage.factSettings={sendAsReply:!0,includeCitation:!1}),s.storage.listSettings||(s.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),s.storage.garySettings||(s.storage.garySettings={imageSource:"gary"}),s.storage.enabledCommands||(s.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0});const et={catfact:pe,dogfact:fe,useless:me,petpet:De,pluginList:we,themeList:Ee,konoself:$e,konosend:ke,firstmessage:Re,sysinfo:_e,spotifyTrack:We,spotifyAlbum:qe,spotifyArtists:He,spotifyCover:Ye,gary:Xe};let U=[];var tt={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[e,n]of Object.entries(et))s.storage.enabledCommands[e]&&U.push(se.registerCommand(n));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),U.forEach(function(e){return e()}),U=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:Qe};return P.default=tt,Object.defineProperty(P,"__esModule",{value:!0}),P})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.storage,vendetta.metro.common.ReactNative); diff --git a/Commands/manifest.json b/Commands/manifest.json index b8f08f8..b69b8cf 100644 --- a/Commands/manifest.json +++ b/Commands/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"Commands","description":"A collection of fixed commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"a3ee7e7d68a0140fc23d7ba94510cc6118c003c9ccc41a49b1bd2244b26a46aa"} \ No newline at end of file +{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"Commands","description":"A collection of fixed commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"1a671acdb5b2063691d513e8ea1088f765fe2dcffea204ad69fd1cfb00e991c2"} \ No newline at end of file