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