vd-plugins/Commands/index.js

18 lines
59 KiB
JavaScript
Raw Normal View History

(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+=`
2025-09-27 19:17:53 +02:00
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
`];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:"
${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.showConfirmat
`);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},categoryN
`,"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 s
`,"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,use