17 lines
59 KiB
JavaScript
17 lines
59 KiB
JavaScript
(function(V,le,s,C,k,I,u,e,de,w,i,v,ue){"use strict";const ge=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}},me=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},fe=async function(){const t=await(await fetch("https://catfact.ninja/fact")).json();return{text:t.fact,length:t.length}},ye=async function(t){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${t.replace("webp","png")}`)).json()},pe=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(n){return console.error(`[Gary API] Error fetching image from ${t}:`,n),null}},U=C.findByProps("sendMessage"),O=function(t){let n=t.text;return s.storage.factSettings?.includeCitation&&t.source&&(n+=`
|
|
|
|
Source: ${t.source}`),n},he={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,n){try{const a=await fe(),o=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:o}),{type:4}}catch(a){return console.error("[CatFact] Error:",a),{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,n){try{const a=await me(),o=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:o}),{type:4}}catch(a){return console.error("[DogFact] Error:",a),{type:4}}}},Ce={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(t,n){try{const a=await ge(),o=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:o}),{type:4}}catch(a){return console.error("[UselessFact] Error:",a),{type:4}}}},S={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},we={DETAILED:"detailed"},W="",B={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:`
|
|
`},Re="Nothing to see here, huh...",H="github.com/fres621/vendetta-plugins",N={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Ie=C.findByProps("sendMessage","receiveMessage"),E=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(H)},q=function(t){return Object.values(t).find(function(n){return n.id==H})?.enabled},X=function(t){return t.find(function(n){return n.name===we.DETAILED})?.value??!1},L=function(t){return!t||!Array.isArray(t)||t.length===0?"Unknown":t.filter(function(n){return n&&(typeof n=="string"||typeof n=="object"&&n.name)}).map(function(n){return typeof n=="string"?n:n.name||"Unknown"}).join(j.SEMICOL)||"Unknown"},Y=function(t){return t.join(j.NEW_LINE).trimEnd()},P=function(t){return Y(t).length},$=async function(t,n){const a=Date.now().toString();await Ie.sendMessage(t,{content:Y(n)},void 0,{nonce:a})},J=function(t,n){return[`**My ${t} List | ${n} ${t}s**`,W]};async function ve(t,n){try{const a=X(t),o=s.storage.themeListAlwaysDetailed??!1;if(!k.themes||typeof k.themes!="object"){const p=n.channel.id;return E.sendBotMessage(p,"No themes found or themes not loaded yet."),{type:4}}const r=Object.values(k.themes),c=n.channel.id,l=J("Theme",Object.keys(k.themes).length);if(r.length)for(const p of r){if(!p||typeof p!="object")continue;const{selected:g,data:b,id:f}=p,A=b?.name||"Unknown Theme",D=b?.description||"No description",_=b?.authors;a||o?l.push(`> **Name**: ${A}`,`> **Selected**: ${g?N.SELECTED:N.NOT_SELECTED}`,`> **Description**: ${D}`,`> **Authors**: ${L(_)}`,`> **[Install!](${f||"unknown"})**`,W):l.push(`> ${g?N.SELECTED:N.NOT_SELECTED} **${A}** by ${L(_)}`)}else l.push(Re);const m=P(l)>K;if(m&&!z(I.plugins))E.sendBotMessage(c,B.SLM_NOT_INSTALLED);else if(m&&!q(I.plugins))E.sendBotMessage(c,B.SLM_NOT_ENABLED);else{if(P(l)>2e3)return u.alerts.showConfirmationAlert({content:S.CONTENT,confirmText:S.CONFIRM,cancelText:S.CANCEL,onConfirm:async function(){return await $(c,l)}});await $(c,l)}}catch(a){return console.error("[ThemeList] Error:",a),{type:4}}}async function Ne(t,n){try{const a=X(t),o=s.storage.pluginListAlwaysDetailed??!1,r=n.channel.id;if(!I.plugins||typeof I.plugins!="object")return E.sendBotMessage(r,"No plugins found or plugins not loaded yet."),{type:4};const c=J("Plugin",Object.keys(I.plugins).length);for(const m of Object.values(I.plugins)){if(!m||typeof m!="object")continue;const{enabled:p,manifest:g,id:b}=m,f=g?.name||"Unknown Plugin",A=g?.description||"No description",D=g?.authors;a||o?c.push(`> **Name**: ${f}`,`> **Status**: ${p?N.ENABLED:N.DISABLED}`,`> **Description**: ${A}`,`> **Authors**: ${L(D)}`,`> **[Install!](${b||"unknown"})**`,W):c.push(`> ${p?N.ENABLED:N.DISABLED} **${f}** by ${L(D)}`)}const l=P(c)>K;if(l&&!z(I.plugins))E.sendBotMessage(r,B.SLM_NOT_INSTALLED);else if(l&&!q(I.plugins))E.sendBotMessage(r,B.SLM_NOT_ENABLED);else{if(P(c)>2e3)return u.alerts.showConfirmationAlert({content:S.CONTENT,confirmText:S.CONFIRM,cancelText:S.CANCEL,onConfirm:async function(){return await $(r,c)}});await $(r,c)}}catch(a){return console.error("[PluginList] Error:",a),{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:Ne,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:ve,applicationId:"-1",inputType:1,type:1},Ae=C.findByStoreName("UserStore"),De=C.findByProps("sendMessage"),Te={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,n){try{const a=(await Ae.getUser(t[0].value)).getAvatarURL(512),o=await ye(a),r=Date.now().toString();return De.sendMessage(n.channel.id,{content:o.url},void 0,{nonce:r}),{type:4}}catch(a){return console.error("[PetPet] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},ke=C.findByProps("sendMessage"),Be=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),Z=async function(t){const n="https://konachan.com/post.json",a=t?"rating:explicit":"rating:safe",o=Math.floor(Math.random()*100);try{const r=await(await fetch(`${n}?tags=${a}&limit=1&page=${o}`)).json();return!Array.isArray(r)||r.length===0?null:r[0].file_url}catch(r){return console.error("[KonoChan Randomizer] Error fetching image:",r),null}},Q=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?"},Le={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,n){try{const a=new Map(t.map(function(c){return[c.name,c]})).get("nsfw")?.value||!1,o=s.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSelf] NSFW: ${a}, Channel NSFW: ${n.channel.nsfw}, Bypass: ${o}`),a&&!n.channel.nsfw&&!o)return Q(),{type:4};const r=await Z(a);return r?(Be.sendBotMessage(n.channel.id,`Here's your random image: ${r}`),{type:4}):{type:4}}catch(a){return console.error("[KonoSelf] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},Pe={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,n){try{const a=new Map(t.map(function(l){return[l.name,l]})).get("nsfw")?.value||!1,o=s.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSend] NSFW: ${a}, Channel NSFW: ${n.channel.nsfw}, Bypass: ${o}`),a&&!n.channel.nsfw&&!o)return Q(),{type:4};const r=await Z(a);if(!r)return{type:4};const c=Date.now().toString();return ke.sendMessage(n.channel.id,{content:r},void 0,{nonce:c}),{type:4}}catch(a){return console.error("[KonoSend] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},te=C.findByProps("getAPIBaseURL","get"),$e=C.findByProps("sendMessage"),x=async function(t,n,a){const o=n?`&author_id=${n}`:"",r=a?`&channel_id=${a}`:"",c=n?"":"&min_id=0";return(await te.get({url:`/guilds/${t}/messages/search`,query:`include_nsfw=true${o}${r}${c}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},ne=async function(t,n){const a=n?`&author_id=${n}`:"",o=n?"":"&min_id=0";return(await te.get({url:`/channels/${t}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${a}${o}`})).body.messages[0][0]},xe={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,n){try{const a=new Map(t.map(function(f){return[f.name,f]})),o=a.get("user")?.value,r=a.get("channel")?.value,c=a.get("send")?.value,l=n.guild?.id,m=n.channel.id,p=n.channel.type===1;let g="https://discord.com/channels/",b;if(!o&&!r)p?(b=await ne(m),g+=`@me/${m}/${b.id}`):(b=await x(l),g+=`${l}/${b.channel_id}/${b.id}`);else if(o)p?(b=await ne(m,o),g+=`@me/${m}/${b.id}`):(b=await x(l,o),g+=`${l}/${b.channel_id}/${b.id}`);else if(r){if(p)return{type:4};b=await x(l,null,r),g+=`${l}/${r}/${b.id}`}else{if(p)return{type:4};b=await x(l,o,r),g+=`${l}/${r}/${b.id}`}if(c){const f=Date.now().toString();return $e.sendMessage(n.channel.id,{content:g},void 0,{nonce:f}),{type:4}}else return e.url.openDeeplink(g),{type:4}}catch(a){return console.error("[FirstMessage] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},Me=C.findByProps("sendMessage"),_e=C.findByProps("sendBotMessage","sendMessage","receiveMessage");function Fe(){let{height:t,width:n,scale:a}=e.ReactNative.Dimensions.get("screen");return t*=a,n*=a,{width:n,height:t}}function Ve(){try{const t=new Date,n=new Date(t.getTime()+t.getTimezoneOffset()*6e4),a=n.getFullYear(),o=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0"),c=String(n.getHours()).padStart(2,"0"),l=String(n.getMinutes()).padStart(2,"0"),m=String(n.getSeconds()).padStart(2,"0");return`${a}-${o}-${r} ${c}:${l}:${m}`}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:n,cpuPercentage:a,memory:o}=t,r=a?a.toFixed(2)+"%":"N/A",c=o?parseFloat((o/1e3).toPrecision(3))+" MB":"N/A";return{cpuCoreCount:n,cpuPerc:r,memUsage:c}}catch(t){return console.warn("Hardware info unavailable:",t),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"}}}function Oe(){try{const{NativeModules:t}=e.ReactNative;return(t.InfoDictionaryManager??t.RTNClientInfoManager)||{}}catch(t){return console.warn("Discord info unavailable:",t),{}}}function We(){try{const{cpuCoreCount:t,cpuPerc:n,memUsage:a}=Ue(),o=Oe(),{vendetta:r,discord:c,react:l,hermes:m,os:p,device:g}=de.getDebugInfo(),b=Ve(),{version:f,bytecodeVersion:A}=m||{},{version:D,nativeVersion:_}=l||{},{name:oe,version:Tt,sdk:re}=p||{},{manufacturer:kt,brand:ie,model:ce,codename:Bt}=g||{},{version:Lt}=r||{},{version:Pt,build:$t}=c||{},xt=oe=="iOS"?Bt:`${ie} ${ce}`,{width:Mt,height:_t}=Fe();let F={Device:{Device:xt||"Unknown",Model:ce||"Unknown",Manufacturer:kt||"Unknown",Brand:ie||"Unknown",Display:`${Mt}x${_t}`},Hardware:{"CPU Cores":t||"N/A","CPU Usage":n,"Memory Usage":a},Software:{OS:oe||"Unknown",Version:Tt||"Unknown"},Discord:{Version:Pt||"Unknown",Build:$t||"Unknown",Vendetta:Lt||"Unknown"},React:{Version:D||"Unknown","Hermes Bytecode":A||"Unknown",Hermes:f||"Unknown",Native:_||"Unknown"},Time:{UTC:b}};return window.enmity&&(F.Discord.Enmity=window.enmity.version),window.aliucord&&(F.Discord.Aliucord=window.aliucord.version),re&&(F.Software["SDK Version"]=re),F}catch(t){throw console.error("Error generating system info:",t),t}}const ae=["device","hardware","software","discord","react","time","ephemeral"];for(const t of ae)s.storage[t]===void 0&&(s.storage[t]=!0);function Ge(t,n){try{let a=[`__System Information__
|
|
`];const o=We();Object.keys(o).forEach(function(l){const m=s.storage[l.toLowerCase()],p=t.find(function(g){return g.name==l.toLowerCase()})?.value??m;(p||m)&&!(m&&!p)&&(a.push(`[**${l}**]`),Object.keys(o[l]).forEach(function(g){a.push(`> ${g}: ${o[l][g]}`)}))});const r=s.storage.ephemeral,c=t.find(function(l){return l.name=="ephemeral"})?.value??r;if((c||r)&&!(r&&!c))return _e.sendBotMessage(n.channel.id,a.join(`
|
|
`)),{type:4};{const l=Date.now().toString();return Me.sendMessage(n.channel.id,{content:a.join(`
|
|
`)},void 0,{nonce:l}),{type:4}}}catch(a){return console.error("[Sysinfo] Error:",a),{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},...ae.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:Ge,applicationId:"-1",inputType:1,type:1},se=C.findByProps("sendMessage","receiveMessage"),He=C.findByStoreName("SpotifyStore");async function Ke(t,n){return s.storage.enabledCommands?.spotifyTrack?M(n,function(a){return`https://open.spotify.com/track/${a.id}`}):{type:4}}async function ze(t,n){return s.storage.enabledCommands?.spotifyAlbum?M(n,function(a){return`https://open.spotify.com/album/${a.album.id}`}):{type:4}}async function qe(t,n){return s.storage.enabledCommands?.spotifyArtists?M(n,function(a){return a.artists.map(function(o){return`[${o.name}](${o.external_urls.spotify})`}).join(`
|
|
`)}):{type:4}}async function Xe(t,n){return s.storage.enabledCommands?.spotifyCover?M(n,function(a){return a.album.image.url}):{type:4}}async function M(t,n){try{const a=t.channel.id,o=He?.getTrack?.();if(!o){const l=Date.now().toString();return se.sendMessage(a,{content:"You are not listening to any track."},void 0,{nonce:l}),{type:4}}const r=n(o),c=Date.now().toString();return se.sendMessage(a,{content:r},void 0,{nonce:c}),{type:4}}catch(a){return console.error("[Spotify Command] Error:",a),{type:4}}}const Ye={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:Ke},Je={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:ze},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:qe},Qe={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:Xe},et=C.findByProps("sendMessage"),tt={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,n){try{s.storage.garySettings||(s.storage.garySettings={imageSource:"gary"});const a=s.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${a}`);const o=await pe(a);if(!o)return console.log("[Gary Command] No image URL received"),{type:4};console.log(`[Gary Command] Sending image: ${o}`);const r=Date.now().toString();return et.sendMessage(n.channel.id,{content:o},void 0,{nonce:r}),{type:4}}catch(a){return console.error("[Gary] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},nt=C.findByProps("sendMessage");function T(t){if(!t)return!1;const n=t.toLowerCase();return[".jpg",".jpeg",".png",".gif",".webp",".mp4",".webm",".mov"].some(function(a){return n.includes(a)})?!0:["i.redd.it","i.imgur.com","preview.redd.it","v.redd.it","redgifs.com","gfycat.com","imgur.com"].some(function(a){return n.includes(a)})}function at(t){const n=t.data;if(n.secure_media?.reddit_video?.fallback_url)return n.secure_media.reddit_video.fallback_url;if(n.media?.reddit_video?.fallback_url)return n.media.reddit_video.fallback_url;const a=n.url;if(T(a))return a;if(n.preview?.images?.[0]){const o=n.preview.images[0];if(o.source?.url){const r=o.source.url.replace(/&/g,"&");if(T(r))return r}if(o.resolutions?.length>0){const r=o.resolutions[o.resolutions.length-1];if(r?.url){const c=r.url.replace(/&/g,"&");if(T(c))return c}}}if(n.secure_media?.oembed?.thumbnail_url){const o=n.secure_media.oembed.thumbnail_url;if(T(o))return o}return n.thumbnail&&n.thumbnail!=="self"&&n.thumbnail!=="default"&&n.thumbnail!=="nsfw"&&n.thumbnail.startsWith("http")&&T(n.thumbnail)?n.thumbnail:null}async function st(){try{console.log("[LoveFemboys] Fetching random media");const t=await fetch("https://reddit.com/r/femboys.json?limit=100&raw_json=1");if(!t.ok)return console.log("[LoveFemboys] Failed to fetch from Reddit API:",t.status,t.statusText),null;const n=await t.json();console.log(`[LoveFemboys] Fetched ${n.data.children.length} posts`);const a=[];for(const r of n.data.children){const c=r.data;if(c.selftext&&!c.url)continue;const l=at(r);l&&(console.log(`[LoveFemboys] Found valid media: ${l}`),a.push(l))}if(console.log(`[LoveFemboys] Found ${a.length} valid media posts`),a.length===0)return console.log("[LoveFemboys] No suitable media found"),null;const o=a[Math.floor(Math.random()*a.length)];return console.log(`[LoveFemboys] Selected: ${o}`),o}catch(t){return console.error("[LoveFemboys] Error fetching media:",t),null}}const ot={name:"lovefemboys",displayName:"lovefemboys",description:"Get random femboy content from r/femboys",displayDescription:"Get random femboy content from r/femboys",options:[{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,n){try{const a=t?.find?.(function(r){return r.name==="ephemeral"})?.value??!1;if(console.log(`[LoveFemboys] Command executed with ephemeral: ${a}`),!await new Promise(function(r){u.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Content Warning",content:"This command will send potentially NSFW (Not Safe For Work) content from r/femboys. Are you sure you want to continue?",confirmText:"Yes, Continue",onConfirm:function(){return r(!0)},cancelText:"Cancel",onCancel:function(){return r(!1)}})}))return console.log("[LoveFemboys] User cancelled the command"),{type:4};const o=await st();if(!o)return w.showToast("\u274C Failed to fetch femboy content",i.getAssetIDByName("CircleXIcon")),{type:4};if(a)return console.log("[LoveFemboys] Sending ephemeral response"),{type:4,data:{content:o,flags:64}};{console.log("[LoveFemboys] Sending public message");const r=Date.now().toString();return nt.sendMessage(n.channel.id,{content:o},void 0,{nonce:r}),{type:4}}}catch(a){return console.error("[LoveFemboys] Command error:",a),w.showToast("\u274C An error occurred while fetching content",i.getAssetIDByName("CircleXIcon")),{type:4}}},applicationId:"-1",inputType:1,type:1},rt=C.findByProps("sendMessage"),it=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),ct={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,n){try{const a=t.find(function(g){return g.name==="query"})?.value,o=t.find(function(g){return g.name==="send"})?.value||!1,r=t.find(function(g){return g.name==="ephemeral"})?.value||!1;if(!a){const g="\u274C Query parameter is required!";return r?{type:4,data:{content:g,flags:64}}:(w.showToast(g,i.getAssetIDByName("CircleXIcon")),{type:4})}!r&&!o&&w.showToast(`Looking up IP information for ${a}...`,i.getAssetIDByName("DownloadIcon"));const c=`http://ipwhois.app/json/${encodeURIComponent(a)}?objects=success,ip,type,as,org,isp,continent,country,country_capital,city,region,country_phone,latitude,longitude,timezone,currency,completed_requests`,l=await fetch(c);if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);const m=await l.json();if(!m.success){const g=`\u274C Failed to lookup IP information for: ${a}`;return r?{type:4,data:{content:g,flags:64}}:(w.showToast(g,i.getAssetIDByName("CircleXIcon")),{type:4})}const p=`\`\`\`json
|
|
${JSON.stringify(m,null,4)}
|
|
\`\`\``;if(r)return{type:4,data:{content:p,flags:64}};if(o){const g=Date.now().toString();return rt.sendMessage(n.channel.id,{content:p},void 0,{nonce:g}),{type:4}}else return it.sendBotMessage(n.channel.id,p),{type:4}}catch(a){console.error("[IP] Command error:",a);const o=`\u274C An error occurred while looking up IP information: ${a.message||"Unknown error"}`;return t?.find?.(function(r){return r.name==="ephemeral"})?.value??!1?{type:4,data:{content:o,flags:64}}:(w.showToast(o,i.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},lt=C.findByProps("sendMessage"),dt=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),ut=["neko","waifu","avatar","cuddle","kiss","smug","tickle","wallpaper","kemonomimi","fox_girl","classic","gecg","woof","holo","ngif","spank","nsfw_neko_gif","lewd","ero","yuri","trap","futanari","hentai","boobs","anal","blowjob","bj","cum","cum_jpg","pussy","pussy_jpg","tits","femdom","feet","feetg","gasm","kuni","holoero","hololewd","les","lewdkemo","lewdk","eron","eroyuri","erofeet","erokemo","erok","nsfw_avatar","pwankg","Random_hentai_gif","smallboobs","solo","solog"];async function gt(t,n){const a=[];for(let o=0;o<n;o++)try{o>0&&await new Promise(function(l){return setTimeout(l,1e3)});const r=await fetch(`https://nekos.life/api/v2/img/${t}`);if(!r.ok){console.error(`[NekosLife] API request failed: ${r.status}`);continue}const c=await r.json();c.url&&a.push(c.url)}catch(r){console.error(`[NekosLife] Error fetching image ${o+1}:`,r)}return a}function mt(t){return!t||typeof t!="string"?!1:["nsfw_neko_gif","lewd","ero","yuri","trap","futanari","hentai","boobs","anal","cum","pussy","tits","blowjob","bj","femdom","feet","feetg","gasm","kuni","holoero","hololewd","les","lewdkemo","lewdk","eron","eroyuri","erofeet","erokemo","erok","nsfw_avatar","pussy_jpg","pwankg","Random_hentai_gif","smallboobs","solo","solog","cum_jpg"].includes(t.toLowerCase())}function ft(t){return!t||typeof t!="string"?!1:ut.includes(t.toLowerCase())}const yt={name:"nekoslife",displayName:"nekoslife",description:"Get images/gifs from nekos.life",displayDescription:"Get images/gifs from nekos.life",options:[{name:"category",displayName:"category",description:"Category: neko, waifu, hentai, lewd, etc. (type the name)",displayDescription:"Category: neko, waifu, hentai, lewd, etc. (type the name)",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 (WARNING: Use NSFW channel for NSFW content)",displayDescription:"Send to chat (WARNING: Use NSFW channel for NSFW content)",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,n){try{console.log("[NekosLife] Command executed with args:",t);const a=t.find(function(f){return f.name==="category"})?.value,o=t.find(function(f){return f.name==="limit"})?.value,r=t.find(function(f){return f.name==="send"})?.value||!1,c=t.find(function(f){return f.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{category:a,limitValue:o,shouldSend:r,isEphemeral:c}),!a||typeof a!="string"){const f="\u274C Category is required! Examples: neko, waifu, hentai, lewd";return console.error("[NekosLife] No category provided"),c?{type:4,data:{content:f,flags:64}}:(w.showToast(f,i.getAssetIDByName("CircleXIcon")),{type:4})}const l=a.toLowerCase().trim();if(!ft(l)){const f=`\u274C Invalid category "${a}". Available: neko, waifu, hentai, lewd, yuri, etc.`;return c?{type:4,data:{content:f,flags:64}}:(w.showToast(f,i.getAssetIDByName("CircleXIcon")),{type:4})}let m=1;o!=null&&(m=parseInt(String(o))||1,m=Math.max(1,Math.min(5,m)));const p=mt(l);if(console.log("[NekosLife] Processing request:",{category:l,limit:m,isNsfw:p,shouldSend:r,isEphemeral:c}),r&&!c&&p&&!n.channel?.nsfw)return u.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Content Warning",content:"This category contains NSFW content and can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null}),{type:4};c||w.showToast(`Fetching ${m} image(s) from nekos.life...`,i.getAssetIDByName("DownloadIcon"));const g=await gt(l,m);if(g.length===0){const f="\u274C Failed to fetch images from nekos.life. Try again later!";return c?{type:4,data:{content:f,flags:64}}:(w.showToast(f,i.getAssetIDByName("CircleXIcon")),{type:4})}const b=g.join(`
|
|
`);if(c)return console.log("[NekosLife] Sending ephemeral response"),{type:4,data:{content:b,flags:64}};if(r){console.log("[NekosLife] Sending to chat");const f=Date.now().toString();return lt.sendMessage(n.channel.id,{content:b},void 0,{nonce:f}),{type:4}}else return console.log("[NekosLife] Sending as bot message"),dt.sendBotMessage(n.channel.id,b),{type:4}}catch(a){console.error("[NekosLife] Command error:",a);const o="\u274C An error occurred while fetching images.";return t?.find?.(function(r){return r.name==="ephemeral"})?.value??!1?{type:4,data:{content:o,flags:64}}:(w.showToast(o,i.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},{ScrollView:R}=e.ReactNative,{FormRow:d,FormSwitchRow:y}=ue.Forms;s.storage.factSettings??={sendAsReply:!0,includeCitation:!1},s.storage.listSettings??={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1},s.storage.garySettings??={imageSource:"gary"},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,ip:!0,lovefemboys:!1,nekoslife:!1},s.storage.pendingRestart??=!1,s.storage.hiddenSettings??={enabled:!1,visible:!1,konochanBypassNsfw:!1};function h({title:t,icon:n,children:a,padding:o=!1}){const r=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:r.titleContainer},n&&e.React.createElement(e.ReactNative.Image,{style:r.icon,source:n,resizeMode:"cover"}),e.React.createElement(e.ReactNative.Text,{style:r.titleText},t.toUpperCase())),e.React.createElement(e.ReactNative.View,{style:r.main},o?e.React.createElement(e.ReactNative.View,{style:{paddingHorizontal:16,paddingVertical:16}},a):a))}function pt({onHiddenUnlock:t}){const[n,a]=e.React.useState(0),[o,r]=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}}),l=function(){if(s.storage.hiddenSettings.enabled){s.storage.hiddenSettings.visible=!s.storage.hiddenSettings.visible,w.showToast(`Hidden settings ${s.storage.hiddenSettings.visible?"visible":"hidden"}`,i.getAssetIDByName("SettingsIcon")),t?.();return}o&&clearTimeout(o);const m=setTimeout(function(){a(0)},1e3);r(m);const p=n+1;a(p),!(p<10)&&(w.showToast("\u{1F513} Hidden settings unlocked!",i.getAssetIDByName("CheckmarkIcon")),s.storage.hiddenSettings.enabled=!0,s.storage.hiddenSettings.visible=!0,a(0),t?.())};return e.React.createElement(e.ReactNative.View,{style:c.container},e.React.createElement(e.ReactNative.Pressable,{style:c.iconContainer,onPress:l},e.React.createElement(e.ReactNative.Image,{source:i.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},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:1},categoryValue:{fontSize:14,color:u.semanticColors.TEXT_MUTED,fontFamily:"monospace",marginRight:8},nsfwBadge:{backgroundColor:u.semanticColors.STATUS_DANGER,paddingHorizontal:8,paddingVertical:4,borderRadius:12},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}}),n=[{name:"Anal",value:"anal",nsfw:!0},{name:"Avatar",value:"avatar",nsfw:!1},{name:"Boobs",value:"boobs",nsfw:!0},{name:"Blowjob Image",value:"blowjob",nsfw:!0},{name:"Blowjob GIF",value:"bj",nsfw:!0},{name:"Classic",value:"classic",nsfw:!1},{name:"Cuddle",value:"cuddle",nsfw:!1},{name:"Cum",value:"cum",nsfw:!0},{name:"Cum JPG",value:"cum_jpg",nsfw:!0},{name:"Ero",value:"ero",nsfw:!0},{name:"Ero Feet",value:"erofeet",nsfw:!0},{name:"Ero Kemo",value:"erokemo",nsfw:!0},{name:"Ero Kitsune",value:"erok",nsfw:!0},{name:"Ero Neko",value:"eron",nsfw:!0},{name:"Ero Yuri",value:"eroyuri",nsfw:!0},{name:"Femdom",value:"femdom",nsfw:!0},{name:"Feet",value:"feet",nsfw:!0},{name:"Feet GIF",value:"feetg",nsfw:!0},{name:"Fox Girl",value:"fox_girl",nsfw:!1},{name:"Futanari",value:"futanari",nsfw:!0},{name:"Gasm",value:"gasm",nsfw:!0},{name:"Gecg",value:"gecg",nsfw:!1},{name:"Kemonomimi",value:"kemonomimi",nsfw:!1},{name:"Kiss",value:"kiss",nsfw:!1},{name:"Kuni",value:"kuni",nsfw:!0},{name:"Hentai",value:"hentai",nsfw:!0},{name:"Holo",value:"holo",nsfw:!1},{name:"Holo Ero",value:"holoero",nsfw:!0},{name:"Holo Lewd",value:"hololewd",nsfw:!0},{name:"Lesbian",value:"les",nsfw:!0},{name:"Lewd",value:"lewd",nsfw:!0},{name:"Lewd Kemo",value:"lewdkemo",nsfw:!0},{name:"Lewd Kitsune",value:"lewdk",nsfw:!0},{name:"Neko",value:"neko",nsfw:!1},{name:"Neko GIF",value:"ngif",nsfw:!1},{name:"NSFW Neko GIF",value:"nsfw_neko_gif",nsfw:!0},{name:"NSFW Avatar",value:"nsfw_avatar",nsfw:!0},{name:"Pussy",value:"pussy",nsfw:!0},{name:"Pussy JPG",value:"pussy_jpg",nsfw:!0},{name:"Pwank",value:"pwankg",nsfw:!0},{name:"Random Hentai GIF",value:"Random_hentai_gif",nsfw:!0},{name:"Small Boobs",value:"smallboobs",nsfw:!0},{name:"Smug",value:"smug",nsfw:!1},{name:"Solo",value:"solo",nsfw:!0},{name:"Solo GIF",value:"solog",nsfw:!0},{name:"Spank",value:"spank",nsfw:!1},{name:"Tits",value:"tits",nsfw:!0},{name:"Tickle",value:"tickle",nsfw:!1},{name:"Trap",value:"trap",nsfw:!0},{name:"Waifu",value:"waifu",nsfw:!1},{name:"Wallpaper",value:"wallpaper",nsfw:!1},{name:"Woof",value:"woof",nsfw:!1},{name:"Yuri",value:"yuri",nsfw:!0}],a=n.sort(function(c,l){return c.nsfw!==l.nsfw?c.nsfw?1:-1:c.name.localeCompare(l.name)}),o=n.filter(function(c){return!c.nsfw}).length,r=n.filter(function(c){return c.nsfw}).length;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:i.getAssetIDByName("ChartIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:t.infoText},"Total Categories: ",n.length,`
|
|
`,"SFW Categories: ",o,`
|
|
`,"NSFW Categories: ",r,`
|
|
|
|
`,"Use these category names with the /nekoslife command. Green = SFW, Red = NSFW")),e.React.createElement(h,{title:"\u{1F4CB} All Categories",icon:i.getAssetIDByName("ListViewIcon")},a.map(function(c,l){return e.React.createElement(e.ReactNative.View,{key:l,style:t.categoryItem},e.React.createElement(e.ReactNative.Text,{style:t.categoryName},c.name),e.React.createElement(e.ReactNative.Text,{style:t.categoryValue},c.value),e.React.createElement(e.ReactNative.View,{style:c.nsfw?t.nsfwBadge:t.sfwBadge},e.React.createElement(e.ReactNative.Text,{style:t.badgeText},c.nsfw?"NSFW":"SFW")))}))))}function bt(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(o){return o+1},0),n=e.NavigationNative.useNavigation(),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:i.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:i.getAssetIDByName("EyeIcon")},e.React.createElement(y,{label:"/lovefemboys",subLabel:"Get random femboy images from r/femboys (NSFW content available)",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("HeartIcon")}),value:s.storage.enabledCommands.lovefemboys,onValueChange:function(o){s.storage.enabledCommands.lovefemboys=o,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/nekoslife",subLabel:"Get images/gifs from nekos.life (NSFW content available)",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:s.storage.enabledCommands.nekoslife,onValueChange:function(o){s.storage.enabledCommands.nekoslife=o,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"NekosLife Reference",icon:i.getAssetIDByName("BookOpenIcon")},e.React.createElement(d,{label:"View All Categories",subLabel:"See all 52 available nekos.life categories with SFW/NSFW status",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ListViewIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return n.push("VendettaCustomPage",{title:"NekosLife Categories",render:ht})}})),e.React.createElement(h,{title:"NSFW Bypass Options",icon:i.getAssetIDByName("WarningIcon")},e.React.createElement(y,{label:"KonoChan NSFW Bypass",subLabel:"Allow NSFW KonoChan content in non-NSFW channels (USE WITH CAUTION)",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ShieldIcon")}),value:s.storage.hiddenSettings.konochanBypassNsfw,onValueChange:function(o){o?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(){s.storage.hiddenSettings.konochanBypassNsfw=!0,t()},onCancel:function(){}}):(s.storage.hiddenSettings.konochanBypassNsfw=!1,t())}})),e.React.createElement(h,{title:"Hidden Settings Control",icon:i.getAssetIDByName("SettingsIcon")},e.React.createElement(y,{label:"Keep Hidden Settings Visible",subLabel:"Keep this section visible even when navigating away",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("EyeIcon")}),value:s.storage.hiddenSettings.visible,onValueChange:function(o){s.storage.hiddenSettings.visible=o}}),e.React.createElement(d,{label:"Reset Hidden Settings",subLabel:"Hide this section and disable all hidden commands",leading:e.React.createElement(d.Icon,{source:i.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(){s.storage.hiddenSettings.enabled=!1,s.storage.hiddenSettings.visible=!1,s.storage.hiddenSettings.konochanBypassNsfw=!1,s.storage.enabledCommands.lovefemboys=!1,s.storage.enabledCommands.nekoslife=!1,s.storage.pendingRestart=!0,w.showToast("Hidden settings reset",i.getAssetIDByName("CheckmarkIcon"))},cancelText:"Cancel"})}}))))}function Ct(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(n){return n+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:i.getAssetIDByName("SettingsIcon")},e.React.createElement(y,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ArrowAngleLeftUpIcon")}),value:s.storage.factSettings.sendAsReply,onValueChange:function(n){s.storage.factSettings.sendAsReply=n}}),e.React.createElement(y,{label:"Include Source Citation",subLabel:"Include the source of facts when available",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("LinkIcon")}),value:s.storage.factSettings.includeCitation,onValueChange:function(n){s.storage.factSettings.includeCitation=n}})),e.React.createElement(h,{title:"Available Fact Commands",icon:i.getAssetIDByName("BookmarkIcon")},e.React.createElement(y,{label:"/catfact",subLabel:"Get random cat facts",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("BookCheckIcon")}),value:s.storage.enabledCommands.catfact,onValueChange:function(n){s.storage.enabledCommands.catfact=n,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/dogfact",subLabel:"Get random dog facts",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("BookCheckIcon")}),value:s.storage.enabledCommands.dogfact,onValueChange:function(n){s.storage.enabledCommands.dogfact=n,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/useless",subLabel:"Get random useless facts",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("BookCheckIcon")}),value:s.storage.enabledCommands.useless,onValueChange:function(n){s.storage.enabledCommands.useless=n,s.storage.pendingRestart=!0,t()}}))))}function wt(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(o){return o+1},0),n=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"}}),a=s.storage.garySettings.imageSource;return e.React.createElement(R,{style:n.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(h,{title:"Gary Command Settings",icon:i.getAssetIDByName("SettingsIcon")},e.React.createElement(y,{label:"/gary",subLabel:"Send random Gary images to channel",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("AttachmentIcon")}),value:s.storage.enabledCommands.gary,onValueChange:function(o){s.storage.enabledCommands.gary=o,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"Image Source Selection",icon:i.getAssetIDByName("DownloadIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:n.infoText},"Choose which API the /gary command should use to fetch images.")),e.React.createElement(h,{title:"API Options",icon:i.getAssetIDByName("CloudIcon")},e.React.createElement(y,{label:"Gary API",subLabel:"Original Gary the cat images from api.garythe.cat",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:a==="gary",onValueChange:function(o){o&&(s.storage.garySettings.imageSource="gary",t())}}),e.React.createElement(y,{label:"Cat API",subLabel:"Random cat pictures from thecatapi.com",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:a==="catapi",onValueChange:function(o){o&&(s.storage.garySettings.imageSource="catapi",t())}}),e.React.createElement(y,{label:"Minker API",subLabel:"Minky images from minky.materii.dev",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:a==="minker",onValueChange:function(o){o&&(s.storage.garySettings.imageSource="minker",t())}}),e.React.createElement(y,{label:"Goober API",subLabel:"Goober images from api.garythe.cat/goober",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:a==="goober",onValueChange:function(o){o&&(s.storage.garySettings.imageSource="goober",t())}})),e.React.createElement(h,{title:"Current Selection",icon:i.getAssetIDByName("CheckmarkIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:n.currentText},"Currently using: ",a==="gary"?"Gary API":a==="catapi"?"Cat API":a==="minker"?"Minker API":a==="goober"?"Goober API":"Gary API"))))}function Rt(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(n){return n+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:i.getAssetIDByName("SettingsIcon")},e.React.createElement(y,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("PuzzlePieceIcon")}),value:s.storage.listSettings.pluginListAlwaysDetailed,onValueChange:function(n){s.storage.listSettings.pluginListAlwaysDetailed=n}}),e.React.createElement(y,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("PaintPaletteIcon")}),value:s.storage.listSettings.themeListAlwaysDetailed,onValueChange:function(n){s.storage.listSettings.themeListAlwaysDetailed=n}})),e.React.createElement(h,{title:"Available List Commands",icon:i.getAssetIDByName("ListViewIcon")},e.React.createElement(y,{label:"/plugin-list",subLabel:"List all installed plugins",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("PuzzlePieceIcon")}),value:s.storage.enabledCommands.pluginList,onValueChange:function(n){s.storage.enabledCommands.pluginList=n,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/theme-list",subLabel:"List all installed themes",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("PaintPaletteIcon")}),value:s.storage.enabledCommands.themeList,onValueChange:function(n){s.storage.enabledCommands.themeList=n,s.storage.pendingRestart=!0,t()}}))))}function It(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(n){return n+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:i.getAssetIDByName("ImageIcon")},e.React.createElement(y,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("HandRequestSpeakIcon")}),value:s.storage.enabledCommands.petpet,onValueChange:function(n){s.storage.enabledCommands.petpet=n,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"KonoChan Commands",icon:i.getAssetIDByName("ImageIcon")},e.React.createElement(y,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("EyeIcon")}),value:s.storage.enabledCommands.konoself,onValueChange:function(n){s.storage.enabledCommands.konoself=n,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:s.storage.enabledCommands.konosend,onValueChange:function(n){s.storage.enabledCommands.konosend=n,s.storage.pendingRestart=!0,t()}}))))}function vt(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(a){return a+1},0),n=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:i.getAssetIDByName("SpotifyNeutralIcon")},e.React.createElement(y,{label:"/spotify track",subLabel:"Share your current Spotify track",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),value:s.storage.enabledCommands.spotifyTrack,onValueChange:function(a){s.storage.enabledCommands.spotifyTrack=a,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/spotify album",subLabel:"Share your current track's album",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),value:s.storage.enabledCommands.spotifyAlbum,onValueChange:function(a){s.storage.enabledCommands.spotifyAlbum=a,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/spotify artists",subLabel:"Share your current track's artists",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),value:s.storage.enabledCommands.spotifyArtists,onValueChange:function(a){s.storage.enabledCommands.spotifyArtists=a,s.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/spotify cover",subLabel:"Share your current track's cover",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),value:s.storage.enabledCommands.spotifyCover,onValueChange:function(a){s.storage.enabledCommands.spotifyCover=a,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"About Spotify Commands",icon:i.getAssetIDByName("InfoIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:n.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 Nt(){v.useProxy(s.storage);const[,t]=e.React.useReducer(function(n){return n+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:i.getAssetIDByName("ChatIcon")},e.React.createElement(y,{label:"/firstmessage",subLabel:"Get the first message in a channel",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ChatIcon")}),value:s.storage.enabledCommands.firstmessage,onValueChange:function(n){s.storage.enabledCommands.firstmessage=n,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"System Commands",icon:i.getAssetIDByName("SettingsIcon")},e.React.createElement(y,{label:"/sysinfo",subLabel:"Display system information",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SettingsIcon")}),value:s.storage.enabledCommands.sysinfo,onValueChange:function(n){s.storage.enabledCommands.sysinfo=n,s.storage.pendingRestart=!0,t()}})),e.React.createElement(h,{title:"Network Commands",icon:i.getAssetIDByName("GlobeEarthIcon")},e.React.createElement(y,{label:"/ip",subLabel:"IP address and domain lookup",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("GlobeEarthIcon")}),value:s.storage.enabledCommands.ip,onValueChange:function(n){s.storage.enabledCommands.ip=n,s.storage.pendingRestart=!0,t()}}))))}function St(){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}}),n=[{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/Zach11111.png",github:"https://github.com/Zach11111"},{command:"IP & NekosLife Commands",author:"scruzism",avatar:"https://github.com/scruzism.png",github:"https://github.com/scruzism"}],a=function(o){e.ReactNative.Linking.openURL(o)};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:i.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.")),n.map(function(o,r){return e.React.createElement(e.ReactNative.Pressable,{key:r,style:t.creditItem,onPress:function(){return a(o.github)},android_ripple:{color:u.semanticColors.ANDROID_RIPPLE,radius:200}},e.React.createElement(e.ReactNative.Image,{source:{uri:o.avatar},style:t.avatar}),e.React.createElement(e.ReactNative.View,{style:t.textContainer},e.React.createElement(e.ReactNative.Text,{style:t.commandText},o.command),e.React.createElement(e.ReactNative.Text,{style:t.authorText},"by ",o.author),e.React.createElement(e.ReactNative.Text,{style:t.linkText},o.github.replace("https://github.com/","@"))))}),e.React.createElement(h,{title:"About",icon:i.getAssetIDByName("InfoIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:t.versionText},"Commands Plugin Collection",`
|
|
`,"Version 1.1.0"))))}function Et(){v.useProxy(s.storage);const t=e.NavigationNative.useNavigation(),[,n]=e.React.useReducer(function(a){return a+1},0);return e.React.useEffect(function(){return function(){s.storage.pendingRestart&&(s.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:n}),e.React.createElement(h,{title:"Command Categories",icon:i.getAssetIDByName("ChannelListIcon")},e.React.createElement(d,{label:"Facts Commands",subLabel:"Cat facts, dog facts, and useless facts",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("BookmarkIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Facts Commands",render:Ct})}}),e.React.createElement(d,{label:"List Commands",subLabel:"Plugin lists and theme lists",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ListViewIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"List Commands",render:Rt})}}),e.React.createElement(d,{label:"Image Commands",subLabel:"PetPet, KonoChan, and image utilities",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("ImageIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Image Commands",render:It})}}),e.React.createElement(d,{label:"Gary Commands",subLabel:`Gary images - Current: ${s.storage.garySettings.imageSource==="gary"?"Gary API":s.storage.garySettings.imageSource==="catapi"?"Cat API":s.storage.garySettings.imageSource==="minker"?"Minker API":s.storage.garySettings.imageSource==="goober"?"Goober API":"Gary API"}`,leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("CameraIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Gary Commands",render:wt})}}),e.React.createElement(d,{label:"Spotify Commands",subLabel:"Share your Spotify activity",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Spotify Commands",render:vt})}}),e.React.createElement(d,{label:"Other Commands",subLabel:"System info, network tools, and miscellaneous",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("MoreHorizontalIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Other Commands",render:Nt})}})),s.storage.hiddenSettings?.enabled&&s.storage.hiddenSettings?.visible&&e.React.createElement(h,{title:"\u{1F513} Hidden Settings",icon:i.getAssetIDByName("EyeIcon")},e.React.createElement(d,{label:"Hidden Commands",subLabel:"Experimental and mature content commands",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("WarningIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Hidden Settings",render:bt})}})),e.React.createElement(h,{title:"More Options",icon:i.getAssetIDByName("SettingsIcon")},e.React.createElement(d,{label:"Credits",subLabel:"View original authors of the plugins",leading:e.React.createElement(d.Icon,{source:i.getAssetIDByName("HeartIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Credits",render:St})}})),e.React.createElement(e.ReactNative.View,{style:{height:32}}))}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,ip:!0,lovefemboys:!1,nekoslife:!1}),s.storage.hiddenSettings||(s.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1});const At={catfact:he,dogfact:be,useless:Ce,petpet:Te,pluginList:Se,themeList:Ee,konoself:Le,konosend:Pe,firstmessage:xe,sysinfo:je,spotifyTrack:Ye,spotifyAlbum:Je,spotifyArtists:Ze,spotifyCover:Qe,gary:tt,ip:ct,lovefemboys:ot,nekoslife:yt};let G=[];var Dt={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[t,n]of Object.entries(At))s.storage.enabledCommands[t]&&(G.push(le.registerCommand(n)),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:Et};return V.default=Dt,Object.defineProperty(V,"__esModule",{value:!0}),V})({},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);
|