vd-plugins/Commands/index.js
2025-10-04 09:03:00 +00:00

17 lines
57 KiB
JavaScript

(function(F,de,r,C,D,S,u,e,ue,b,o,N,ge){"use strict";const ye=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}},fe=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},me=async function(){const t=await(await fetch("https://catfact.ninja/fact")).json();return{text:t.fact,length:t.length}},pe=async function(t){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${t.replace("webp","png")}`)).json()},he=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}},O=C.findByProps("sendMessage"),U=function(t){let a=t.text;return r.storage.factSettings?.includeCitation&&t.source&&(a+=`
Source: ${t.source}`),a},Ce={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 n=await me(),s=Date.now().toString();return O.sendMessage(a.channel.id,{content:U(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[CatFact] Error:",n),{type:4}}}},be={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 n=await fe(),s=Date.now().toString();return O.sendMessage(a.channel.id,{content:U(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[DogFact] Error:",n),{type:4}}}},Re={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 n=await ye(),s=Date.now().toString();return O.sendMessage(a.channel.id,{content:U(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[UselessFact] Error:",n),{type:4}}}},v={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},Ie={DETAILED:"detailed"},W="",k={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."},H={SEMICOL:"; ",NEW_LINE:`
`},Ne="Nothing to see here, huh...",j="github.com/fres621/vendetta-plugins",E={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Se=C.findByProps("sendMessage","receiveMessage"),w=C.findByProps("sendBotMessage"),K=function(){try{return C.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),z=function(t){return Object.keys(t).includes(j)},q=function(t){return Object.values(t).find(function(a){return a.id==j})?.enabled},X=function(t){return t.find(function(a){return a.name===Ie.DETAILED})?.value??!1},B=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(H.SEMICOL)||"Unknown"},Y=function(t){return t.join(H.NEW_LINE).trimEnd()},L=function(t){return Y(t).length},P=async function(t,a){const n=Date.now().toString();await Se.sendMessage(t,{content:Y(a)},void 0,{nonce:n})},J=function(t,a){return[`**My ${t} List | ${a} ${t}s**`,W]};async function Ee(t,a){try{const n=X(t),s=r.storage.themeListAlwaysDetailed??!1;if(!D.themes||typeof D.themes!="object"){const p=a.channel.id;return w.sendBotMessage(p,"No themes found or themes not loaded yet."),{type:4}}const i=Object.values(D.themes),c=a.channel.id,d=J("Theme",Object.keys(D.themes).length);if(i.length)for(const p of i){if(!p||typeof p!="object")continue;const{selected:f,data:y,id:I}=p,A=y?.name||"Unknown Theme",T=y?.description||"No description",_=y?.authors;n||s?d.push(`> **Name**: ${A}`,`> **Selected**: ${f?E.SELECTED:E.NOT_SELECTED}`,`> **Description**: ${T}`,`> **Authors**: ${B(_)}`,`> **[Install!](${I||"unknown"})**`,W):d.push(`> ${f?E.SELECTED:E.NOT_SELECTED} **${A}** by ${B(_)}`)}else d.push(Ne);const g=L(d)>K;if(g&&!z(S.plugins))w.sendBotMessage(c,k.SLM_NOT_INSTALLED);else if(g&&!q(S.plugins))w.sendBotMessage(c,k.SLM_NOT_ENABLED);else{if(L(d)>2e3)return u.alerts.showConfirmationAlert({content:v.CONTENT,confirmText:v.CONFIRM,cancelText:v.CANCEL,onConfirm:async function(){return await P(c,d)}});await P(c,d)}}catch(n){return console.error("[ThemeList] Error:",n),{type:4}}}async function ve(t,a){try{const n=X(t),s=r.storage.pluginListAlwaysDetailed??!1,i=a.channel.id;if(!S.plugins||typeof S.plugins!="object")return w.sendBotMessage(i,"No plugins found or plugins not loaded yet."),{type:4};const c=J("Plugin",Object.keys(S.plugins).length);for(const g of Object.values(S.plugins)){if(!g||typeof g!="object")continue;const{enabled:p,manifest:f,id:y}=g,I=f?.name||"Unknown Plugin",A=f?.description||"No description",T=f?.authors;n||s?c.push(`> **Name**: ${I}`,`> **Status**: ${p?E.ENABLED:E.DISABLED}`,`> **Description**: ${A}`,`> **Authors**: ${B(T)}`,`> **[Install!](${y||"unknown"})**`,W):c.push(`> ${p?E.ENABLED:E.DISABLED} **${I}** by ${B(T)}`)}const d=L(c)>K;if(d&&!z(S.plugins))w.sendBotMessage(i,k.SLM_NOT_INSTALLED);else if(d&&!q(S.plugins))w.sendBotMessage(i,k.SLM_NOT_ENABLED);else{if(L(c)>2e3)return u.alerts.showConfirmationAlert({content:v.CONTENT,confirmText:v.CONFIRM,cancelText:v.CANCEL,onConfirm:async function(){return await P(i,c)}});await P(i,c)}}catch(n){return console.error("[PluginList] Error:",n),{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:ve,applicationId:"-1",inputType:1,type:1},Ae={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:Ee,applicationId:"-1",inputType:1,type:1},Te=C.findByStoreName("UserStore"),De=C.findByProps("sendMessage"),ke={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 n=(await Te.getUser(t[0].value)).getAvatarURL(512),s=await pe(n),i=Date.now().toString();return De.sendMessage(a.channel.id,{content:s.url},void 0,{nonce:i}),{type:4}}catch(n){return console.error("[PetPet] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},Be=C.findByProps("sendMessage"),Le=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),Q=async function(t){const a="https://konachan.com/post.json",n=t?"rating:explicit":"rating:safe",s=Math.floor(Math.random()*100);try{const i=await(await fetch(`${a}?tags=${n}&limit=1&page=${s}`)).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}},Z=function(){return u.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},ee={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},Pe={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[ee],execute:async function(t,a){try{const n=new Map(t.map(function(c){return[c.name,c]})).get("nsfw")?.value||!1,s=r.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSelf] NSFW: ${n}, Channel NSFW: ${a.channel.nsfw}, Bypass: ${s}`),n&&!a.channel.nsfw&&!s)return Z(),{type:4};const i=await Q(n);return i?(Le.sendBotMessage(a.channel.id,`Here's your random image: ${i}`),{type:4}):{type:4}}catch(n){return console.error("[KonoSelf] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},xe={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:[ee],execute:async function(t,a){try{const n=new Map(t.map(function(d){return[d.name,d]})).get("nsfw")?.value||!1,s=r.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSend] NSFW: ${n}, Channel NSFW: ${a.channel.nsfw}, Bypass: ${s}`),n&&!a.channel.nsfw&&!s)return Z(),{type:4};const i=await Q(n);if(!i)return{type:4};const c=Date.now().toString();return Be.sendMessage(a.channel.id,{content:i},void 0,{nonce:c}),{type:4}}catch(n){return console.error("[KonoSend] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},te=C.findByProps("getAPIBaseURL","get"),$e=C.findByProps("sendMessage"),x=async function(t,a,n){const s=a?`&author_id=${a}`:"",i=n?`&channel_id=${n}`:"",c=a?"":"&min_id=0";return(await te.get({url:`/guilds/${t}/messages/search`,query:`include_nsfw=true${s}${i}${c}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},ae=async function(t,a){const n=a?`&author_id=${a}`:"",s=a?"":"&min_id=0";return(await te.get({url:`/channels/${t}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${n}${s}`})).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(t,a){try{const n=new Map(t.map(function(I){return[I.name,I]})),s=n.get("user")?.value,i=n.get("channel")?.value,c=n.get("send")?.value,d=a.guild?.id,g=a.channel.id,p=a.channel.type===1;let f="https://discord.com/channels/",y;if(!s&&!i)p?(y=await ae(g),f+=`@me/${g}/${y.id}`):(y=await x(d),f+=`${d}/${y.channel_id}/${y.id}`);else if(s)p?(y=await ae(g,s),f+=`@me/${g}/${y.id}`):(y=await x(d,s),f+=`${d}/${y.channel_id}/${y.id}`);else if(i){if(p)return{type:4};y=await x(d,null,i),f+=`${d}/${i}/${y.id}`}else{if(p)return{type:4};y=await x(d,s,i),f+=`${d}/${i}/${y.id}`}if(c){const I=Date.now().toString();return $e.sendMessage(a.channel.id,{content:f},void 0,{nonce:I}),{type:4}}else return e.url.openDeeplink(f),{type:4}}catch(n){return console.error("[FirstMessage] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},_e=C.findByProps("sendMessage"),Ve=C.findByProps("sendBotMessage","sendMessage","receiveMessage");function Fe(){let{height:t,width:a,scale:n}=e.ReactNative.Dimensions.get("screen");return t*=n,a*=n,{width:a,height:t}}function Oe(){try{const t=new Date,a=new Date(t.getTime()+t.getTimezoneOffset()*6e4),n=a.getFullYear(),s=String(a.getMonth()+1).padStart(2,"0"),i=String(a.getDate()).padStart(2,"0"),c=String(a.getHours()).padStart(2,"0"),d=String(a.getMinutes()).padStart(2,"0"),g=String(a.getSeconds()).padStart(2,"0");return`${n}-${s}-${i} ${c}:${d}:${g}`}catch{return"Unknown"}}function Ue(){try{const t=C.findByProps("memory");if(!t)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"};const{cpuCoreCount:a,cpuPercentage:n,memory:s}=t,i=n?n.toFixed(2)+"%":"N/A",c=s?parseFloat((s/1e3).toPrecision(3))+" MB":"N/A";return{cpuCoreCount:a,cpuPerc:i,memUsage:c}}catch(t){return console.warn("Hardware info unavailable:",t),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"}}}function We(){try{const{NativeModules:t}=e.ReactNative;return(t.InfoDictionaryManager??t.RTNClientInfoManager)||{}}catch(t){return console.warn("Discord info unavailable:",t),{}}}function Ge(){try{const{cpuCoreCount:t,cpuPerc:a,memUsage:n}=Ue(),s=We(),{vendetta:i,discord:c,react:d,hermes:g,os:p,device:f}=ue.getDebugInfo(),y=Oe(),{version:I,bytecodeVersion:A}=g||{},{version:T,nativeVersion:_}=d||{},{name:ie,version:kt,sdk:oe}=p||{},{manufacturer:Bt,brand:ce,model:le,codename:Lt}=f||{},{version:Pt}=i||{},{version:xt,build:$t}=c||{},Mt=ie=="iOS"?Lt:`${ce} ${le}`,{width:_t,height:Vt}=Fe(),V={Device:{Device:Mt||"Unknown",Model:le||"Unknown",Manufacturer:Bt||"Unknown",Brand:ce||"Unknown",Display:`${_t}x${Vt}`},Hardware:{"CPU Cores":t||"N/A","CPU Usage":a,"Memory Usage":n},Software:{OS:ie||"Unknown",Version:kt||"Unknown"},Discord:{Version:xt||"Unknown",Build:$t||"Unknown",Vendetta:Pt||"Unknown"},React:{Version:T||"Unknown","Hermes Bytecode":A||"Unknown",Hermes:I||"Unknown",Native:_||"Unknown"},Time:{UTC:y}};return window.enmity&&(V.Discord.Enmity=window.enmity.version),window.aliucord&&(V.Discord.Aliucord=window.aliucord.version),oe&&(V.Software["SDK Version"]=oe),V}catch(t){throw console.error("Error generating system info:",t),t}}const ne=["device","hardware","software","discord","react","time","ephemeral"];for(const t of ne)r.storage[t]===void 0&&(r.storage[t]=!0);function He(t,a){try{const n=[`__System Information__
`],s=Ge();Object.keys(s).forEach(function(d){const g=r.storage[d.toLowerCase()],p=t.find(function(f){return f.name==d.toLowerCase()})?.value??g;(p||g)&&!(g&&!p)&&(n.push(`[**${d}**]`),Object.keys(s[d]).forEach(function(f){n.push(`> ${f}: ${s[d][f]}`)}))});const i=r.storage.ephemeral,c=t.find(function(d){return d.name=="ephemeral"})?.value??i;if((c||i)&&!(i&&!c))return Ve.sendBotMessage(a.channel.id,n.join(`
`)),{type:4};{const d=Date.now().toString();return _e.sendMessage(a.channel.id,{content:n.join(`
`)},void 0,{nonce:d}),{type:4}}}catch(n){return console.error("[Sysinfo] Error:",n),{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},...ne.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:He,applicationId:"-1",inputType:1,type:1},re=C.findByProps("sendMessage","receiveMessage"),Ke=C.findByStoreName("SpotifyStore");async function ze(t,a){return r.storage.enabledCommands?.spotifyTrack?$(a,function(n){return`https://open.spotify.com/track/${n.id}`}):{type:4}}async function qe(t,a){return r.storage.enabledCommands?.spotifyAlbum?$(a,function(n){return`https://open.spotify.com/album/${n.album.id}`}):{type:4}}async function Xe(t,a){return r.storage.enabledCommands?.spotifyArtists?$(a,function(n){return n.artists.map(function(s){return`[${s.name}](${s.external_urls.spotify})`}).join(`
`)}):{type:4}}async function Ye(t,a){return r.storage.enabledCommands?.spotifyCover?$(a,function(n){return n.album.image.url}):{type:4}}async function $(t,a){try{const n=t.channel.id,s=Ke?.getTrack?.();if(!s){const d=Date.now().toString();return re.sendMessage(n,{content:"You are not listening to any track."},void 0,{nonce:d}),{type:4}}const i=a(s),c=Date.now().toString();return re.sendMessage(n,{content:i},void 0,{nonce:c}),{type:4}}catch(n){return console.error("[Spotify Command] Error:",n),{type:4}}}const Je={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:ze},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:qe},Ze={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:Xe},et={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:Ye},tt=C.findByProps("sendMessage"),at={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{r.storage.garySettings||(r.storage.garySettings={imageSource:"gary"});const n=r.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${n}`);const s=await he(n);if(!s)return console.log("[Gary Command] No image URL received"),{type:4};console.log(`[Gary Command] Sending image: ${s}`);const i=Date.now().toString();return tt.sendMessage(a.channel.id,{content:s},void 0,{nonce:i}),{type:4}}catch(n){return console.error("[Gary] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},se=C.findByProps("sendMessage","receiveMessage"),nt=C.findByProps("getLastSelectedChannelId"),rt=C.findByProps("createBotMessage"),st=C.findByProps("BOT_AVATARS");function M(t,a,n){const s=t??nt?.getChannelId?.(),i=rt.createBotMessage({channelId:s,content:"",embeds:n});i.author.username="Astolfo",i.author.avatar="Astolfo",st.BOT_AVATARS.Astolfo="https://i.pinimg.com/736x/50/77/1f/50771f45b1c015cfbb8b0853ba7b8521.jpg",typeof a=="string"?i.content=a:Object.assign(i,a),se.receiveMessage(s,i)}const it={name:"lovefemboys",displayName:"lovefemboys",description:"Get an image of a femboy",displayDescription:"Get an image of a femboy",options:[{name:"nsfw",displayName:"nsfw",description:"Get the result from r/femboys instead of r/femboy (NSFW)",displayDescription:"Get the result from r/femboys instead of r/femboy (NSFW)",required:!1,type:5},{name:"sort",displayName:"sort",description:"Changes the way reddit sorts.",displayDescription:"Changes the way reddit sorts",required:!1,type:3},{name:"silent",displayName:"silent",description:"Makes it so only you can see the message.",displayDescription:"Makes it so only you can see the message.",required:!1,type:5}],applicationId:"-1",inputType:1,type:1,execute:async function(t,a){try{let n=t.find(function(g){return g.name==="nsfw"})?.value,s=t.find(function(g){return g.name==="sort"})?.value,i=t.find(function(g){return g.name==="silent"})?.value;if(typeof s>"u"&&(s=r.storage.sortdefs),!["best","hot","new","rising","top","controversial"].includes(s)){M(a.channel.id,"Incorrect sorting type. Valid options are\n`best`, `hot`, `new`, `rising`, `top`, `controversial`.",[]);return}if(n&&!await new Promise(function(g){u.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Content Warning",content:"This command will send NSFW (Not Safe For Work) content from r/femboys. Are you sure you want to continue?",confirmText:"Yes, Continue",onConfirm:function(){return g(!0)},cancelText:"Cancel",onCancel:function(){return g(!1)}})}))return{type:4};let c=await fetch(`https://www.reddit.com/r/femboy/${s}.json?limit=100`).then(function(g){return g.json()});if(!a.channel.nsfw_&&n&&r.storage.nsfwwarn&&!(i??!0)){M(a.channel.id,`This channel is not marked as NSFW
(You can disable this check in plugin settings)`,[]);return}n&&(c=await fetch(`https://www.reddit.com/r/femboys/${s}.json?limit=100`).then(function(g){return g.json()})),c=c.data?.children?.[Math.floor(Math.random()*c.data?.children?.length)]?.data;let d=await fetch(`https://www.reddit.com/u/${c?.author}/about.json`).then(function(g){return g.json()});if(i??!0)M(a.channel.id,"",[{type:"rich",title:c?.title,url:`https://reddit.com${c?.permalink}`,author:{name:`u/${c?.author} \u2022 r/${c?.subreddit}`,proxy_icon_url:d?.data.icon_img.split("?")[0],icon_url:d?.data.icon_img.split("?")[0]},image:{proxy_url:c?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??c?.url.replace(/.gifv$/g,".gif"),url:c?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??c?.url?.replace(/.gifv$/g,".gif"),width:c?.preview?.images?.[0]?.source?.width,height:c?.preview?.images?.[0]?.source?.height},color:"0xf4b8e4"}]);else{const g=Date.now().toString();se.sendMessage(a.channel.id,{content:c?.url_overridden_by_dest??c?.url},void 0,{nonce:g})}}catch(n){console.error("[LoveFemboys] Error:",n),M(a.channel.id,"ERROR !!!!!!!!!!!! \u{1F62D}\u{1F62D}\u{1F62D} Check debug logs!! \u{1F97A}\u{1F97A}\u{1F97A}",[])}}},ot=C.findByProps("sendMessage"),ct=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),lt={name:"ip",displayName:"ip",description:"IP address and domain lookup",displayDescription:"IP address and domain lookup",options:[{name:"query",displayName:"query",description:"Enter IPv4/IPv6 address or domain name",displayDescription:"Enter IPv4/IPv6 address or domain name",type:3,required:!0},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(t,a){try{const n=t.find(function(f){return f.name==="query"})?.value,s=t.find(function(f){return f.name==="send"})?.value||!1,i=t.find(function(f){return f.name==="ephemeral"})?.value||!1;if(!n){const f="\u274C Query parameter is required!";return i?{type:4,data:{content:f,flags:64}}:(b.showToast(f,o.getAssetIDByName("CircleXIcon")),{type:4})}!i&&!s&&b.showToast(`Looking up IP information for ${n}...`,o.getAssetIDByName("DownloadIcon"));const c=`http://ipwhois.app/json/${encodeURIComponent(n)}?objects=success,ip,type,as,org,isp,continent,country,country_capital,city,region,country_phone,latitude,longitude,timezone,currency,completed_requests`,d=await fetch(c);if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const g=await d.json();if(!g.success){const f=`\u274C Failed to lookup IP information for: ${n}`;return i?{type:4,data:{content:f,flags:64}}:(b.showToast(f,o.getAssetIDByName("CircleXIcon")),{type:4})}const p=`\`\`\`json
${JSON.stringify(g,null,4)}
\`\`\``;if(i)return{type:4,data:{content:p,flags:64}};if(s){const f=Date.now().toString();return ot.sendMessage(a.channel.id,{content:p},void 0,{nonce:f}),{type:4}}else return ct.sendBotMessage(a.channel.id,p),{type:4}}catch(n){console.error("[IP] Command error:",n);const s=`\u274C An error occurred while looking up IP information: ${n.message||"Unknown error"}`;return t?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(b.showToast(s,o.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},dt=C.findByProps("sendMessage"),ut=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),gt=["avatar","classic","cuddle","fox_girl","gecg","holo","kemonomimi","kiss","neko","ngif","smug","spank","tickle","waifu","wallpaper","woof"];async function yt(t,a){const n=[];for(let s=0;s<a;s++)try{s>0&&await new Promise(function(d){return setTimeout(d,1e3)});const i=await fetch(`https://nekos.life/api/v2/img/${t}`);if(!i.ok){console.error(`[NekosLife] API request failed: ${i.status}`);continue}const c=await i.json();c.url&&n.push(c.url)}catch(i){console.error(`[NekosLife] Error fetching image ${s+1}:`,i)}return n}function ft(t){return!t||typeof t!="string"?!1:gt.includes(t.toLowerCase().trim())}const mt={name:"nekoslife",displayName:"nekoslife",description:"Get SFW images/gifs from nekos.life",displayDescription:"Get SFW images/gifs from nekos.life",options:[{name:"category",displayName:"category",description:"Category name (e.g. neko, waifu, cuddle, etc.)",displayDescription:"Category name (e.g. neko, waifu, cuddle, etc.)",type:3,required:!0},{name:"limit",displayName:"limit",description:"Number of images (1-5, default: 1)",displayDescription:"Number of images (1-5, default: 1)",type:4,required:!1},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(t,a){try{console.log("[NekosLife] Command executed with args:",t);const n=t.find(function(y){return y.name==="category"})?.value,s=t.find(function(y){return y.name==="limit"})?.value,i=t.find(function(y){return y.name==="send"})?.value||!1,c=t.find(function(y){return y.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{categoryInput:n,limitInput:s,shouldSend:i,isEphemeral:c}),!n||typeof n!="string"){const y="\u274C Category is required! Examples: neko, waifu, cuddle, kiss";return console.error("[NekosLife] No category provided"),c?{type:4,data:{content:y,flags:64}}:(b.showToast(y,o.getAssetIDByName("CircleXIcon")),{type:4})}const d=n.toLowerCase().trim();if(!ft(d)){const y=`\u274C Invalid SFW category "${n}". Valid: neko, waifu, cuddle, kiss, holo, etc.`;return c?{type:4,data:{content:y,flags:64}}:(b.showToast(y,o.getAssetIDByName("CircleXIcon")),{type:4})}let g=1;s!=null&&(g=parseInt(String(s))||1,g=Math.max(1,Math.min(5,g))),console.log("[NekosLife] Processing SFW request:",{category:d,limit:g,shouldSend:i,isEphemeral:c}),c||b.showToast(`Fetching ${g} SFW image(s) from nekos.life...`,o.getAssetIDByName("DownloadIcon"));const p=await yt(d,g);if(p.length===0){const y="\u274C Failed to fetch images from nekos.life. Try again later!";return c?{type:4,data:{content:y,flags:64}}:(b.showToast(y,o.getAssetIDByName("CircleXIcon")),{type:4})}const f=p.join(`
`);if(c)return console.log("[NekosLife] Sending ephemeral response"),{type:4,data:{content:f,flags:64}};if(i){console.log("[NekosLife] Sending to chat");const y=Date.now().toString();return dt.sendMessage(a.channel.id,{content:f},void 0,{nonce:y}),{type:4}}else return console.log("[NekosLife] Sending as bot message"),ut.sendBotMessage(a.channel.id,f),{type:4}}catch(n){console.error("[NekosLife] Command error:",n);const s="\u274C An error occurred while fetching images.";return t?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(b.showToast(s,o.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},{ScrollView:R}=e.ReactNative,{FormRow:l,FormSwitchRow:m}=ge.Forms;r.storage.factSettings??={sendAsReply:!0,includeCitation:!1},r.storage.listSettings??={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1},r.storage.garySettings??={imageSource:"gary"},r.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,ip:!0,lovefemboys:!1,nekoslife:!1},r.storage.pendingRestart??=!1,r.storage.hiddenSettings??={enabled:!1,visible:!1,konochanBypassNsfw:!1};function h({title:t,icon:a,children:n,padding:s=!1}){const i=e.stylesheet.createThemedStyleSheet({main:{backgroundColor:u.semanticColors.CARD_PRIMARY_BG,borderColor:u.semanticColors.BORDER_FAINT,borderWidth:1,borderRadius:16,overflow:"hidden",flex:1},titleContainer:{marginBottom:8,marginHorizontal:0,marginTop:8,gap:4,flexDirection:"row",alignItems:"center"},icon:{width:16,height:16,marginTop:1.5,tintColor:u.semanticColors.TEXT_MUTED},titleText:{fontSize:14,fontWeight:"600",color:u.semanticColors.TEXT_MUTED}});return e.React.createElement(e.ReactNative.View,{style:{marginHorizontal:16,marginTop:16}},t&&e.React.createElement(e.ReactNative.View,{style:i.titleContainer},a&&e.React.createElement(e.ReactNative.Image,{style:i.icon,source:a,resizeMode:"cover"}),e.React.createElement(e.ReactNative.Text,{style:i.titleText},t.toUpperCase())),e.React.createElement(e.ReactNative.View,{style:i.main},s?e.React.createElement(e.ReactNative.View,{style:{paddingHorizontal:16,paddingVertical:16}},n):n))}function pt({onHiddenUnlock:t}){const[a,n]=e.React.useState(0),[s,i]=e.React.useState(null),c=e.stylesheet.createThemedStyleSheet({container:{flexDirection:"column",alignItems:"center",paddingVertical:24,paddingHorizontal:16},title:{fontSize:28,fontWeight:"700",color:u.semanticColors.TEXT_NORMAL,marginBottom:4},subtitle:{fontSize:16,fontWeight:"500",color:u.semanticColors.TEXT_MUTED},iconContainer:{backgroundColor:u.semanticColors.BACKGROUND_SECONDARY,borderRadius:16,padding:12,marginBottom:16},icon:{width:32,height:32,tintColor:u.semanticColors.TEXT_NORMAL}}),d=function(){if(r.storage.hiddenSettings.enabled){r.storage.hiddenSettings.visible=!r.storage.hiddenSettings.visible,b.showToast(`Hidden settings ${r.storage.hiddenSettings.visible?"visible":"hidden"}`,o.getAssetIDByName("SettingsIcon")),t?.();return}s&&clearTimeout(s);const g=setTimeout(function(){n(0)},1e3);i(g);const p=a+1;n(p),!(p<10)&&(b.showToast("\u{1F513} Hidden settings unlocked!",o.getAssetIDByName("CheckmarkIcon")),r.storage.hiddenSettings.enabled=!0,r.storage.hiddenSettings.visible=!0,n(0),t?.())};return e.React.createElement(e.ReactNative.View,{style:c.container},e.React.createElement(e.ReactNative.Pressable,{style:c.iconContainer,onPress:d},e.React.createElement(e.ReactNative.Image,{source:o.getAssetIDByName("SettingsIcon"),style:c.icon})),e.React.createElement(e.ReactNative.Text,{style:c.title},"Commands"),e.React.createElement(e.ReactNative.Text,{style:c.subtitle},"A collection of useful commands"))}function ht(){const t=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY},tableHeader:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16,backgroundColor:u.semanticColors.BACKGROUND_MODIFIER_ACCENT,borderBottomWidth:2,borderBottomColor:u.semanticColors.BORDER_STRONG},headerText:{fontSize:14,fontWeight:"700",color:u.semanticColors.TEXT_NORMAL,textTransform:"uppercase"},nameHeader:{flex:2},codeHeader:{flex:2,textAlign:"center"},badgeHeader:{flex:1,textAlign:"center"},categoryItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16,borderBottomWidth:1,borderBottomColor:u.semanticColors.BORDER_FAINT},categoryName:{fontSize:16,fontWeight:"500",color:u.semanticColors.TEXT_NORMAL,flex:2},categoryValue:{fontSize:14,color:u.semanticColors.TEXT_MUTED,fontFamily:"monospace",flex:2,textAlign:"center"},sfwBadgeContainer:{flex:1,alignItems:"center"},sfwBadge:{backgroundColor:u.semanticColors.STATUS_POSITIVE,paddingHorizontal:8,paddingVertical:4,borderRadius:12},badgeText:{fontSize:12,fontWeight:"600",color:u.semanticColors.WHITE},infoText:{fontSize:14,color:u.semanticColors.TEXT_MUTED,textAlign:"center",lineHeight:20}}),a=[{name:"Avatar",value:"avatar"},{name:"Classic",value:"classic"},{name:"Cuddle",value:"cuddle"},{name:"Fox Girl",value:"fox_girl"},{name:"Gecg",value:"gecg"},{name:"Holo",value:"holo"},{name:"Kemonomimi",value:"kemonomimi"},{name:"Kiss",value:"kiss"},{name:"Neko",value:"neko"},{name:"Neko GIF",value:"ngif"},{name:"Smug",value:"smug"},{name:"Spank",value:"spank"},{name:"Tickle",value:"tickle"},{name:"Waifu",value:"waifu"},{name:"Wallpaper",value:"wallpaper"},{name:"Woof",value:"woof"}],n=a.sort(function(s,i){return s.name.localeCompare(i.name)});return e.React.createElement(R,{style:t.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"\u{1F4CA} Category Statistics",icon:o.getAssetIDByName("ChartIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:t.infoText},"Total SFW Categories: ",a.length,`
`,"Use these category names with the /nekoslife command.",`
`,"All categories are Safe For Work (SFW).")),e.React.createElement(h,{title:"\u{1F4CB} SFW Categories",icon:o.getAssetIDByName("ListViewIcon")},e.React.createElement(e.ReactNative.View,{style:t.tableHeader},e.React.createElement(e.ReactNative.Text,{style:[t.headerText,t.nameHeader]},"Category Name"),e.React.createElement(e.ReactNative.Text,{style:[t.headerText,t.codeHeader]},"Command Code"),e.React.createElement(e.ReactNative.Text,{style:[t.headerText,t.badgeHeader]},"Type")),n.map(function(s,i){return e.React.createElement(e.ReactNative.View,{key:i,style:t.categoryItem},e.React.createElement(e.ReactNative.Text,{style:t.categoryName},s.name),e.React.createElement(e.ReactNative.Text,{style:t.categoryValue},s.value),e.React.createElement(e.ReactNative.View,{style:t.sfwBadgeContainer},e.React.createElement(e.ReactNative.View,{style:t.sfwBadge},e.React.createElement(e.ReactNative.Text,{style:t.badgeText},"SFW"))))}))))}function Ct(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(n){return n+1},0);e.NavigationNative.useNavigation();const a=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY},warningText:{fontSize:14,color:u.semanticColors.TEXT_DANGER,textAlign:"center",lineHeight:20,fontWeight:"600"},infoText:{fontSize:14,color:u.semanticColors.TEXT_MUTED,textAlign:"center",lineHeight:20,marginTop:8}});return e.React.createElement(R,{style:a.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"\u26A0\uFE0F Warning",icon:o.getAssetIDByName("WarningIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:a.warningText},"These are hidden commands that may contain mature content or experimental features."),e.React.createElement(e.ReactNative.Text,{style:a.infoText},"Use at your own discretion. Commands in this section are disabled by default.")),e.React.createElement(h,{title:"Hidden Commands",icon:o.getAssetIDByName("EyeIcon")},e.React.createElement(m,{label:"/lovefemboys",subLabel:"Get random femboy images from r/femboys (NSFW content available)",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("HeartIcon")}),value:r.storage.enabledCommands.lovefemboys,onValueChange:function(n){r.storage.enabledCommands.lovefemboys=n,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"NSFW Bypass Options",icon:o.getAssetIDByName("WarningIcon")},e.React.createElement(m,{label:"KonoChan NSFW Bypass",subLabel:"Allow NSFW KonoChan content in non-NSFW channels (USE WITH CAUTION)",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ShieldIcon")}),value:r.storage.hiddenSettings.konochanBypassNsfw,onValueChange:function(n){n?u.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Bypass Warning",content:"Enabling this allows NSFW content from KonoChan to be sent in any channel, including non-NSFW channels. This could violate server rules or Discord ToS. Use responsibly!",confirmText:"I Understand",cancelText:"Cancel",onConfirm:function(){r.storage.hiddenSettings.konochanBypassNsfw=!0,t()},onCancel:function(){}}):(r.storage.hiddenSettings.konochanBypassNsfw=!1,t())}})),e.React.createElement(h,{title:"Hidden Settings Control",icon:o.getAssetIDByName("SettingsIcon")},e.React.createElement(m,{label:"Keep Hidden Settings Visible",subLabel:"Keep this section visible even when navigating away",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("EyeIcon")}),value:r.storage.hiddenSettings.visible,onValueChange:function(n){r.storage.hiddenSettings.visible=n}}),e.React.createElement(l,{label:"Reset Hidden Settings",subLabel:"Hide this section and disable all hidden commands",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("TrashIcon")}),onPress:function(){u.alerts.showConfirmationAlert({title:"Reset Hidden Settings",content:"This will hide the hidden settings section and disable all hidden commands. Are you sure?",confirmText:"Reset",onConfirm:function(){r.storage.hiddenSettings.enabled=!1,r.storage.hiddenSettings.visible=!1,r.storage.hiddenSettings.konochanBypassNsfw=!1,r.storage.enabledCommands.lovefemboys=!1,r.storage.pendingRestart=!0,b.showToast("Hidden settings reset",o.getAssetIDByName("CheckmarkIcon"))},cancelText:"Cancel"})}}))))}function bt(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(a){return a+1},0);return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Fact Display Settings",icon:o.getAssetIDByName("SettingsIcon")},e.React.createElement(m,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ArrowAngleLeftUpIcon")}),value:r.storage.factSettings.sendAsReply,onValueChange:function(a){r.storage.factSettings.sendAsReply=a}}),e.React.createElement(m,{label:"Include Source Citation",subLabel:"Include the source of facts when available",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("LinkIcon")}),value:r.storage.factSettings.includeCitation,onValueChange:function(a){r.storage.factSettings.includeCitation=a}})),e.React.createElement(h,{title:"Available Fact Commands",icon:o.getAssetIDByName("BookmarkIcon")},e.React.createElement(m,{label:"/catfact",subLabel:"Get random cat facts",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("BookCheckIcon")}),value:r.storage.enabledCommands.catfact,onValueChange:function(a){r.storage.enabledCommands.catfact=a,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/dogfact",subLabel:"Get random dog facts",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("BookCheckIcon")}),value:r.storage.enabledCommands.dogfact,onValueChange:function(a){r.storage.enabledCommands.dogfact=a,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/useless",subLabel:"Get random useless facts",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("BookCheckIcon")}),value:r.storage.enabledCommands.useless,onValueChange:function(a){r.storage.enabledCommands.useless=a,r.storage.pendingRestart=!0,t()}}))))}function Rt(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(s){return s+1},0),a=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY},infoText:{fontSize:14,color:u.semanticColors.TEXT_MUTED,marginBottom:16,textAlign:"center"},currentText:{fontSize:14,color:u.semanticColors.TEXT_NORMAL,textAlign:"center",fontWeight:"600"}}),n=r.storage.garySettings.imageSource;return e.React.createElement(R,{style:a.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Gary Command Settings",icon:o.getAssetIDByName("SettingsIcon")},e.React.createElement(m,{label:"/gary",subLabel:"Send random Gary images to channel",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("AttachmentIcon")}),value:r.storage.enabledCommands.gary,onValueChange:function(s){r.storage.enabledCommands.gary=s,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"Image Source Selection",icon:o.getAssetIDByName("DownloadIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:a.infoText},"Choose which API the /gary command should use to fetch images.")),e.React.createElement(h,{title:"API Options",icon:o.getAssetIDByName("CloudIcon")},e.React.createElement(m,{label:"Gary API",subLabel:"Original Gary the cat images from api.garythe.cat",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:n==="gary",onValueChange:function(s){s&&(r.storage.garySettings.imageSource="gary",t())}}),e.React.createElement(m,{label:"Cat API",subLabel:"Random cat pictures from thecatapi.com",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:n==="catapi",onValueChange:function(s){s&&(r.storage.garySettings.imageSource="catapi",t())}}),e.React.createElement(m,{label:"Minker API",subLabel:"Minky images from minky.materii.dev",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:n==="minker",onValueChange:function(s){s&&(r.storage.garySettings.imageSource="minker",t())}}),e.React.createElement(m,{label:"Goober API",subLabel:"Goober images from api.garythe.cat/goober",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:n==="goober",onValueChange:function(s){s&&(r.storage.garySettings.imageSource="goober",t())}})),e.React.createElement(h,{title:"Current Selection",icon:o.getAssetIDByName("CheckmarkIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:a.currentText},"Currently using:"," ",n==="gary"?"Gary API":n==="catapi"?"Cat API":n==="minker"?"Minker API":n==="goober"?"Goober API":"Gary API"))))}function It(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(a){return a+1},0);return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"List Display Settings",icon:o.getAssetIDByName("SettingsIcon")},e.React.createElement(m,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("PuzzlePieceIcon")}),value:r.storage.listSettings.pluginListAlwaysDetailed,onValueChange:function(a){r.storage.listSettings.pluginListAlwaysDetailed=a}}),e.React.createElement(m,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("PaintPaletteIcon")}),value:r.storage.listSettings.themeListAlwaysDetailed,onValueChange:function(a){r.storage.listSettings.themeListAlwaysDetailed=a}})),e.React.createElement(h,{title:"Available List Commands",icon:o.getAssetIDByName("ListViewIcon")},e.React.createElement(m,{label:"/plugin-list",subLabel:"List all installed plugins",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("PuzzlePieceIcon")}),value:r.storage.enabledCommands.pluginList,onValueChange:function(a){r.storage.enabledCommands.pluginList=a,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/theme-list",subLabel:"List all installed themes",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("PaintPaletteIcon")}),value:r.storage.enabledCommands.themeList,onValueChange:function(a){r.storage.enabledCommands.themeList=a,r.storage.pendingRestart=!0,t()}}))))}function Nt(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(a){return a+1},0);return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Image Commands",icon:o.getAssetIDByName("ImageIcon")},e.React.createElement(m,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("HandRequestSpeakIcon")}),value:r.storage.enabledCommands.petpet,onValueChange:function(a){r.storage.enabledCommands.petpet=a,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"KonoChan Commands",icon:o.getAssetIDByName("ImageIcon")},e.React.createElement(m,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("EyeIcon")}),value:r.storage.enabledCommands.konoself,onValueChange:function(a){r.storage.enabledCommands.konoself=a,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:r.storage.enabledCommands.konosend,onValueChange:function(a){r.storage.enabledCommands.konosend=a,r.storage.pendingRestart=!0,t()}}))))}function St(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(n){return n+1},0),a=e.stylesheet.createThemedStyleSheet({infoText:{fontSize:14,color:u.semanticColors.TEXT_MUTED,textAlign:"center",lineHeight:20}});return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Spotify Commands",icon:o.getAssetIDByName("SpotifyNeutralIcon")},e.React.createElement(m,{label:"/spotify track",subLabel:"Share your current Spotify track",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SpotifyNeutralIcon")}),value:r.storage.enabledCommands.spotifyTrack,onValueChange:function(n){r.storage.enabledCommands.spotifyTrack=n,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/spotify album",subLabel:"Share your current track's album",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SpotifyNeutralIcon")}),value:r.storage.enabledCommands.spotifyAlbum,onValueChange:function(n){r.storage.enabledCommands.spotifyAlbum=n,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/spotify artists",subLabel:"Share your current track's artists",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SpotifyNeutralIcon")}),value:r.storage.enabledCommands.spotifyArtists,onValueChange:function(n){r.storage.enabledCommands.spotifyArtists=n,r.storage.pendingRestart=!0,t()}}),e.React.createElement(m,{label:"/spotify cover",subLabel:"Share your current track's cover",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SpotifyNeutralIcon")}),value:r.storage.enabledCommands.spotifyCover,onValueChange:function(n){r.storage.enabledCommands.spotifyCover=n,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"About Spotify Commands",icon:o.getAssetIDByName("InfoIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:a.infoText},"These commands allow you to share your current Spotify activity in Discord. Make sure you have Spotify connected to Discord for these commands to work properly."))))}function Et(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(a){return a+1},0);return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Message Commands",icon:o.getAssetIDByName("ChatIcon")},e.React.createElement(m,{label:"/firstmessage",subLabel:"Get the first message in a channel",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ChatIcon")}),value:r.storage.enabledCommands.firstmessage,onValueChange:function(a){r.storage.enabledCommands.firstmessage=a,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"System Commands",icon:o.getAssetIDByName("SettingsIcon")},e.React.createElement(m,{label:"/sysinfo",subLabel:"Display system information",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SettingsIcon")}),value:r.storage.enabledCommands.sysinfo,onValueChange:function(a){r.storage.enabledCommands.sysinfo=a,r.storage.pendingRestart=!0,t()}}))))}function vt(){N.useProxy(r.storage);const[,t]=e.React.useReducer(function(n){return n+1},0),a=e.NavigationNative.useNavigation();return e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(h,{title:"IP Commands",icon:o.getAssetIDByName("GlobeEarthIcon")},e.React.createElement(m,{label:"/ip",subLabel:"Get your current IP address",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("GlobeEarthIcon")}),value:r.storage.enabledCommands.ip,onValueChange:function(n){r.storage.enabledCommands.ip=n,r.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"NekosLife Commands",icon:o.getAssetIDByName("ImageIcon")},e.React.createElement(m,{label:"/nekoslife",subLabel:"Get images/gifs from nekos.life",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),value:r.storage.enabledCommands.nekoslife,onValueChange:function(n){r.storage.enabledCommands.nekoslife=n,r.storage.pendingRestart=!0,t()}}),e.React.createElement(l,{label:"View Categories",subLabel:"See all 16 available categories",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("BookOpenIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return a.push("VendettaCustomPage",{title:"NekosLife Categories",render:ht})}})),e.React.createElement(e.ReactNative.View,{style:{height:32}}))}function wt(){const t=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY},creditItem:{flexDirection:"row",alignItems:"center",paddingVertical:16,paddingHorizontal:20,backgroundColor:u.semanticColors.CARD_PRIMARY_BG,borderRadius:12,marginHorizontal:16,marginVertical:6,shadowColor:u.semanticColors.BLACK,shadowOffset:{width:0,height:1},shadowOpacity:.1,shadowRadius:2,elevation:2},avatar:{width:48,height:48,borderRadius:24,marginRight:16,backgroundColor:u.semanticColors.BACKGROUND_SECONDARY},textContainer:{flex:1},commandText:{fontSize:17,fontWeight:"600",color:u.semanticColors.TEXT_NORMAL,marginBottom:4},authorText:{fontSize:15,color:u.semanticColors.TEXT_MUTED,marginBottom:2},linkText:{fontSize:13,color:u.semanticColors.TEXT_BRAND,fontWeight:"500"},infoText:{fontSize:14,color:u.semanticColors.TEXT_MUTED,marginBottom:20,textAlign:"center",lineHeight:20},versionText:{fontSize:15,color:u.semanticColors.TEXT_NORMAL,textAlign:"center",fontWeight:"600",lineHeight:22}}),a=[{command:"Facts Commands",author:"jdev082",avatar:"https://github.com/jdev082.png",github:"https://github.com/jdev082"},{command:"List Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"PetPet",author:"wolfieeee",avatar:"https://github.com/WolfPlugs.png",github:"https://github.com/WolfPlugs"},{command:"KonoChan Commands",author:"btmc727 & Rico040",avatar:"https://github.com/OTKUSteyler.png",github:"https://github.com/OTKUSteyler"},{command:"FirstMessage Command",author:"sapphire",avatar:"https://github.com/aeongdesu.png",github:"https://github.com/aeongdesu"},{command:"Sysinfo Command",author:"mugman",avatar:"https://github.com/mugman174.png",github:"https://github.com/mugman174"},{command:"Spotify Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"Gary Command",author:"Zach Orange",avatar:"https://github.com/IAmGaryTheCat.png",github:"https://github.com/IAmGaryTheCat"},{command:"IP & NekosLife Commands",author:"scruzism",avatar:"https://github.com/scrazzz.png",github:"https://github.com/scrazzz"}],n=function(s){e.ReactNative.Linking.openURL(s)};return e.React.createElement(R,{style:t.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Plugin Authors",icon:o.getAssetIDByName("HeartIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:t.infoText},"Thanks to this developers for creating such a nice plugins!",`
`,"Tap on any developer to visit their GitHub profile.")),a.map(function(s,i){return e.React.createElement(e.ReactNative.Pressable,{key:i,style:t.creditItem,onPress:function(){return n(s.github)},android_ripple:{color:u.semanticColors.ANDROID_RIPPLE,radius:200}},e.React.createElement(e.ReactNative.Image,{source:{uri:s.avatar},style:t.avatar}),e.React.createElement(e.ReactNative.View,{style:t.textContainer},e.React.createElement(e.ReactNative.Text,{style:t.commandText},s.command),e.React.createElement(e.ReactNative.Text,{style:t.authorText},"by ",s.author),e.React.createElement(e.ReactNative.Text,{style:t.linkText},s.github.replace("https://github.com/","@"))))}),e.React.createElement(h,{title:"About",icon:o.getAssetIDByName("InfoIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:t.versionText},"Commands Plugin Collection",`
`,"Version 1.2.0"))))}function At(){N.useProxy(r.storage);const t=e.NavigationNative.useNavigation(),[,a]=e.React.useReducer(function(n){return n+1},0);return e.React.useEffect(function(){return function(){r.storage.pendingRestart&&(r.storage.pendingRestart=!1,u.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]),e.React.createElement(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(pt,{onHiddenUnlock:a}),e.React.createElement(h,{title:"Command Categories",icon:o.getAssetIDByName("ChannelListIcon")},e.React.createElement(l,{label:"Facts Commands",subLabel:"Cat facts, dog facts, and useless facts",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("BookmarkIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Facts Commands",render:bt})}}),e.React.createElement(l,{label:"List Commands",subLabel:"Plugin lists and theme lists",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ListViewIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"List Commands",render:It})}}),e.React.createElement(l,{label:"Image Commands",subLabel:"PetPet, KonoChan, and image utilities",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("ImageIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Image Commands",render:Nt})}}),e.React.createElement(l,{label:"Gary Commands",subLabel:`Gary images - Current: ${r.storage.garySettings.imageSource==="gary"?"Gary API":r.storage.garySettings.imageSource==="catapi"?"Cat API":r.storage.garySettings.imageSource==="minker"?"Minker API":r.storage.garySettings.imageSource==="goober"?"Goober API":"Gary API"}`,leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("CameraIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Gary Commands",render:Rt})}}),e.React.createElement(l,{label:"Spotify Commands",subLabel:"Share your Spotify activity",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("SpotifyNeutralIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Spotify Commands",render:St})}}),e.React.createElement(l,{label:"Aliucord Commands",subLabel:"Commands from Aliucord",leading:e.React.createElement(l.Icon,{source:{uri:"https://avatars.githubusercontent.com/u/78881422?s=200&v=4"}}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Aliucord",render:vt})}}),e.React.createElement(l,{label:"Other Commands",subLabel:"Utility and system commands",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("WrenchIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Other Commands",render:Et})}})),r.storage.hiddenSettings?.visible&&e.React.createElement(h,{title:"\u{1F513} Hidden Settings",icon:o.getAssetIDByName("EyeIcon")},e.React.createElement(l,{label:"Hidden Commands",subLabel:"Access to experimental and NSFW commands",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("EyeIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Hidden Settings",render:Ct})}})),e.React.createElement(h,{title:"\u{1F3F7}\uFE0F Other",icon:o.getAssetIDByName("InformationIcon")},e.React.createElement(l,{label:"Credits",subLabel:"View original authors of the plugins",leading:e.React.createElement(l.Icon,{source:o.getAssetIDByName("HeartIcon")}),trailing:e.React.createElement(l.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Credits",render:wt})}})),e.React.createElement(e.ReactNative.View,{style:{height:32}}))}r.storage.factSettings||(r.storage.factSettings={sendAsReply:!0,includeCitation:!1}),r.storage.listSettings||(r.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),r.storage.garySettings||(r.storage.garySettings={imageSource:"gary"}),r.storage.enabledCommands||(r.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,ip:!0,lovefemboys:!1,nekoslife:!1}),r.storage.hiddenSettings||(r.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1});const Tt={catfact:Ce,dogfact:be,useless:Re,petpet:ke,pluginList:we,themeList:Ae,konoself:Pe,konosend:xe,firstmessage:Me,sysinfo:je,spotifyTrack:Je,spotifyAlbum:Qe,spotifyArtists:Ze,spotifyCover:et,gary:at,ip:lt,lovefemboys:it,nekoslife:mt};let G=[];var Dt={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[t,a]of Object.entries(Tt))r.storage.enabledCommands[t]&&(G.push(de.registerCommand(a)),console.log(`[All-In-One Commands] Registered command: ${t}`));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),G.forEach(function(t){return t()}),G=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:At};return F.default=Dt,Object.defineProperty(F,"__esModule",{value:!0}),F})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.ui.toasts,vendetta.ui.assets,vendetta.storage,vendetta.ui.components);