vd-plugins/Commands/index.js

17 lines
56 KiB
JavaScript
Raw Normal View History

(function(V,le,o,C,k,S,u,e,de,b,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}},ye=async function(){const t=await(await fetch("https://catfact.ninja/fact")).json();return{text:t.fact,length:t.length}},fe=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(a){return console.error(`[Gary API] Error fetching image from ${t}:`,a),null}},U=C.findByProps("sendMessage"),O=function(t){let a=t.text;return o.storage.factSettings?.includeCitation&&t.source&&(a+=`
2025-09-27 19:17:53 +02:00
Source: ${t.source}`),a},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,a){try{const n=await ye(),s=Date.now().toString();return U.sendMessage(a.channel.id,{content:O(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[CatFact] Error:",n),{type:4}}}},Ce={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 me(),s=Date.now().toString();return U.sendMessage(a.channel.id,{content:O(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[DogFact] Error:",n),{type:4}}}},be={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 ge(),s=Date.now().toString();return U.sendMessage(a.channel.id,{content:O(n)},void 0,{nonce:s}),{type:4}}catch(n){return console.error("[UselessFact] Error:",n),{type:4}}}},E={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},Re={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:`
`},Ie="Nothing to see here, huh...",K="github.com/fres621/vendetta-plugins",N={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Se=C.findByProps("sendMessage","receiveMessage"),w=C.findByProps("sendBotMessage"),H=function(){try{return C.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),z=function(t){return Object.keys(t).includes(K)},q=function(t){return Object.values(t).find(function(a){return a.id==K})?.enabled},X=function(t){return t.find(function(a){return a.name===Re.DETAILED})?.value??!1},L=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(j.SEMICOL)||"Unknown"},Y=function(t){return t.join(j.NEW_LINE).trimEnd()},P=function(t){return Y(t).length},$=async function(t,a){const n=Date.now().toString();await Se.sendMessage(t,{content:Y(a)},void 0,{nonce:n})},Z=function(t,a){return[`**My ${t} List | ${a} ${t}s**`,W]};async function ve(t,a){try{const n=X(t),s=o.storage.themeListAlwaysDetailed??!1;if(!k.themes||typeof k.themes!="object"){const g=a.channel.id;return w.sendBotMessage(g,"No themes found or themes not loaded yet."),{type:4}}const r=Object.values(k.themes),l=a.channel.id,d=Z("Theme",Object.keys(k.themes).length);if(r.length)for(const g of r){if(!g||typeof g!="object")continue;const{selected:m,data:h,id:R}=g,A=h?.name||"Unknown Theme",D=h?.description||"No description",F=h?.authors;n||s?d.push(`> **Name**: ${A}`,`> **Selected**: ${m?N.SELECTED:N.NOT_SELECTED}`,`> **Description**: ${D}`,`> **Authors**: ${L(F)}`,`> **[Install!](${R||"unknown"})**`,W):d.push(`> ${m?N.SELECTED:N.NOT_SELECTED} **${A}** by ${L(F)}`)}else d.push(Ie);const f=P(d)>H;if(f&&!z(S.plugins))w.sendBotMessage(l,B.SLM_NOT_INSTALLED);else if(f&&!q(S.plugins))w.sendBotMessage(l,B.SLM_NOT_ENABLED);else{if(P(d)>2e3)return u.alerts.showConfirmationAlert({content:E.CONTENT,confirmText:E.CONFIRM,cancelText:E.CANCEL,onConfirm:async function(){return await $(l,d)}});await $(l,d)}}catch(n){return console.error("[ThemeList] Error:",n),{type:4}}}async function Ne(t,a){try{const n=X(t),s=o.storage.pluginListAlwaysDetailed??!1,r=a.channel.id;if(!S.plugins||typeof S.plugins!="object")return w.sendBotMessage(r,"No plugins found or plugins not loaded yet."),{type:4};const l=Z("Plugin",Object.keys(S.plugins).length);for(const f of Object.values(S.plugins)){if(!f||typeof f!="object")continue;const{enabled:g,manifest:m,id:h}=f,R=m?.name||"Unknown Plugin",A=m?.description||"No description",D=m?.authors;n||s?l.push(`> **Name**: ${R}`,`> **Status**: ${g?N.ENABLED:N.DISABLED}`,`> **Description**: ${A}`,`> **Authors**: ${L(D)}`,`> **[Install!](${h||"unknown"})**`,W):l.push(`> ${g?N.ENABLED:N.DISABLED} **${R}** by ${L(D)}`)}const d=P(l)>H;if(d&&!z(S.plugins))w.sendBotMessage(r,B.SLM_NOT_INSTALLED);else if(d&&!q(S.plugins))w.sendBotMessage(r,B.SLM_NOT_ENABLED);else{if(P(l)>2e3)return u.alerts.showConfirmationAlert({content:E.CONTENT,confirmText:E.CONFIRM,cancelText:E.CANCEL,onConfirm:async function(){return await $(r,l)}});await $(r,l)}}catch(n){return console.error("[PluginList] Error:",n),{type:4}}}const Ee={name:"plugin-list",displayName:"plugin list",description:"Send your plugin list to the current channel",displayDescription:"Send your plugin list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:Ne,applicationId:"-1",inputType:1,type:1},we={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 s=We();Object.keys(s).forEach(function(d){const f=o.storage[d.toLowerCase()],g=t.find(function(m){return m.name==d.toLowerCase()})?.value??f;(g||f)&&!(f&&!g)&&(n.push(`[**${d}**]`),Object.keys(s[d]).forEach(function(m){n.push(`> ${m}: ${s[d][m]}`)}))});const r=o.storage.ephemeral,l=t.find(function(d){return d.name=="ephemeral"})?.value??r;if((l||r)&&!(r&&!l))return Fe.sendBotMessage(a.channel.id,n.join(`
`)),{type:4};{const d=Date.now().toString();return Me.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:Ge,applicationId:"-1",inputType:1,type:1},oe=C.findByProps("sendMessage","receiveMessage"),Ke=C.findByStoreName("SpotifyStore");async function He(t,a){return o.storage.enabledCommands?.spotifyTrack?M(a,function(n){return`https://open.spotify.com/track/${n.id}`}):{type:4}}async function ze(t,a){return o.storage.enabledCommands?.spotifyAlbum?M(a,function(n){return`https://open.spotify.com/album/${n.album.id}`}):{type:4}}async function qe(t,a){return o.storage.enabledCommands?.spotifyArtists?M(a,function(n){return n.artists.map(function(s){return`[${s.name}](${s.external_urls.spotify})`}).join(`
`)}):{type:4}}async function Xe(t,a){return o.storage.enabledCommands?.spotifyCover?M(a,function(n){return n.album.image.url}):{type:4}}async function M(t,a){try{const n=t.channel.id,s=Ke?.getTrack?.();if(!s){const d=Date.now().toString();return oe.sendMessage(n,{content:"You are not listening to any track."},void 0,{nonce:d}),{type:4}}const r=a(s),l=Date.now().toString();return oe.sendMessage(n,{content:r},void 0,{nonce:l}),{type:4}}catch(n){return console.error("[Spotify Command] Error:",n),{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:He},Ze={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},Je={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,a){try{o.storage.garySettings||(o.storage.garySettings={imageSource:"gary"});const n=o.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${n}`);const s=await pe(n);if(!s)return console.log("[Gary Command] No image URL received"),{type:4};console.log(`[Gary Command] Sending image: ${s}`);const r=Date.now().toString();return et.sendMessage(a.channel.id,{content:s},void 0,{nonce:r}),{type:4}}catch(n){return console.error("[Gary] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},at=C.findByProps("sendMessage");function T(t){if(!t)return!1;const a=t.toLowerCase();return[".jpg",".jpeg",".png",".gif",".webp",".mp4",".webm",".mov"].some(function(n){return a.includes(n)})?!0:["i.redd.it","i.imgur.com","preview.redd.it","v.redd.it","redgifs.com","gfycat.com","imgur.com"].some(function(n){return a.includes(n)})}function nt(t){const a=t.data;if(a.secure_media?.reddit_video?.fallback_url)return a.secure_media.reddit_video.fallback_url;if(a.media?.reddit_video?.fallback_url)return a.media.reddit_video.fallback_url;const n=a.url;if(T(n))return n;if(a.preview?.images?.[0]){const s=a.preview.images[0];if(s.source?.url){const r=s.source.url.replace(/&/g,"&");if(T(r))return r}if(s.resolutions?.length>0){const r=s.resolutions[s.resolutions.length-1];if(r?.url){const l=r.url.replace(/&/g,"&");if(T(l))return l}}}if(a.secure_media?.oembed?.thumbnail_url){const s=a.secure_media.oembed.thumbnail_url;if(T(s))return s}return a.thumbnail&&a.thumbnail!=="self"&&a.thumbnail!=="default"&&a.thumbnail!=="nsfw"&&a.thumbnail.startsWith("http")&&T(a.thumbnail)?a.thumbnail:null}async function ot(){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 a=await t.json();console.log(`[LoveFemboys] Fetched ${a.data.children.length} posts`);const n=[];for(const r of a.data.children){const l=r.data;if(l.selftext&&!l.url)continue;const d=nt(r);d&&(console.log(`[LoveFemboys] Found valid media: ${d}`),n.push(d))}if(console.log(`[LoveFemboys] Found ${n.length} valid media posts`),n.length===0)return console.log("[LoveFemboys] No suitable media found"),null;const s=n[Math.floor(Math.random()*n.length)];return console.log(`[LoveFemboys] Selected: ${s}`),s}catch(t){return console.error("[LoveFemboys] Error fetching media:",t),null}}const st={name:"lovefemboys",displayName:"lovefemboys",description:"
${JSON.stringify(f,null,4)}
\`\`\``;if(r)return{type:4,data:{content:g,flags:64}};if(s){const m=Date.now().toString();return rt.sendMessage(a.channel.id,{content:g},void 0,{nonce:m}),{type:4}}else return it.sendBotMessage(a.channel.id,g),{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(r){return r.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(b.showToast(s,i.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},lt=C.findByProps("sendMessage"),dt=C.findByProps("sendBotMessage","sendMessage","receiveMessage"),ut=[{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"}],gt=[{name:"1",value:1},{name:"2",value:2},{name:"3",value:3},{name:"5",value:5}];async function mt(t,a){const n=[];for(let s=0;s<a;s++)try{s>0&&await new Promise(function(d){return setTimeout(d,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 l=await r.json();l.url&&n.push(l.url)}catch(r){console.error(`[NekosLife] Error fetching image ${s+1}:`,r)}return n}const yt={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 of SFW image/gif to get",displayDescription:"Category of SFW image/gif to get",type:3,required:!0,choices:ut},{name:"limit",displayName:"limit",description:"Number of images to get (default: 1)",displayDescription:"Number of images to get (default: 1)",type:4,required:!1,choices:gt},{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(g){return g.name==="category"})?.value,s=t.find(function(g){return g.name==="limit"})?.value||1,r=t.find(function(g){return g.name==="send"})?.value||!1,l=t.find(function(g){return g.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{category:n,limit:s,shouldSend:r,isEphemeral:l}),!n){const g="\u274C Category is required!";return console.error("[NekosLife] No category provided"),l?{type:4,data:{content:g,flags:64}}:(b.showToast(g,i.getAssetIDByName("CircleXIcon")),{type:4})}console.log("[NekosLife] Processing SFW request:",{category:n,limit:s,shouldSend:r,isEphemeral:l}),l||b.showToast(`Fetching ${s} SFW image(s) from nekos.life...`,i.getAssetIDByName("DownloadIcon"));const d=await mt(n,s);if(d.length===0){const g="\u274C Failed to fetch images from nekos.life. Try again later!";return l?{type:4,data:{content:g,flags:64}}:(b.showToast(g,i.getAssetIDByName("CircleXIcon")),{type:4})}const f=d.join(`
`);if(l)return console.log("[NekosLife] Sending ephemeral response"),{type:4,data:{content:f,flags:64}};if(r){console.log("[NekosLife] Sending to chat");const g=Date.now().toString();return lt.sendMessage(a.channel.id,{content:f},void 0,{nonce:g}),{type:4}}else return console.log("[NekosLife] Sending as bot message"),dt.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(r){return r.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(b.showToast(s,i.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},{ScrollView:I}=e.ReactNative,{FormRow:c,FormSwitchRow:y}=ue.Forms;o.storage.factSettings??={sendAsReply:!0,includeCitation:!1},o.storage.listSettings??={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1},o.storage.garySettings??={imageSource:"gary"},o.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},o.storage.pendingRestart??=!1,o.storage.hiddenSettings??={enabled:!1,visible:!1,konochanBypassNsfw:!1};function p({title:t,icon:a,children:n,padding:s=!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},a&&e.React.createElement(e.ReactNative.Image,{style:r.icon,source:a,resizeMode:"cover"}),e.React.createElement(e.ReactNative.Text,{style:r.titleText},t.toUpperCase())),e.React.createElement(e.ReactNative.View,{style:r.main},s?e.React.createElement(e.ReactNative.View,{style:{paddingHorizontal:16,paddingVertical:16}},n):n))}function ft({onHiddenUnlock:t}){const[a,n]=e.React.useState(0),[s,r]=e.React.useState(null),l=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(o.storage.hiddenSettings.enabled){o.storage.hiddenSettings.visible=!o.storage.hiddenSettings.visible,b.showToast(`Hidden settings ${o.storage.hiddenSettings.visible?"visible":"hidden"}`,i.getAssetIDByName("SettingsIcon")),t?.();return}s&&clearTimeout(s);const f=setTimeout(function(){n(0)},1e3);r(f);const g=a+1;n(g),!(g<10)&&(b.showToast("\u{1F513} Hidden settings unlocked!",i.getAssetIDByName("CheckmarkIcon")),o.storage.hiddenSettings.enabled=!0,o.storage.hiddenSettings.visible=!0,n(0),t?.())};return e.React.createElement(e.ReactNative.View,{style:l.container},e.React.createElement(e.ReactNative.Pressable,{style:l.iconContainer,onPress:d},e.React.createElement(e.ReactNative.Image,{source:i.getAssetIDByName("SettingsIcon"),style:l.icon})),e.React.createElement(e.ReactNative.Text,{style:l.title},"Commands"),e.React.createElement(e.ReactNative.Text,{style:l.subtitle},"A collection of useful commands"))}function pt(){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
`,"Use these category names with the /nekoslife command.",`
`,"All categories are Safe For Work (SFW).")),e.React.createElement(p,{title:"\u{1F4CB} SFW Categories",icon:i.getAssetIDByName("ListViewIcon")},n.map(function(s,r){return e.React.createElement(e.ReactNative.View,{key:r,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.sfwBadge},e.React.createElement(e.ReactNative.Text,{style:t.badgeText},"SFW")))}))))}function ht(){v.useProxy(o.storage);const[,t]=e.React.useReducer(function(s){return s+1},0),a=e.NavigationNative.useNavigation(),n=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(I,{style:n.container},e.React.createElement(e.ReactNative.View,{style:{paddingVertical:16}},e.React.createElement(p,{title:"\u26A0\uFE0F Warning",icon:i.getAssetIDByName("WarningIcon"),padding:!0},e.React.createElement(e.ReactNative.Text,{style:n.warningText},"These are hidden commands that may contain mature content or experimental features."),e.React.createElement(e.ReactNative.Text,{style:n.infoText},"Use at your own discretion. Commands in this section are disabled by default.")),e.React.createElement(p,{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(c.Icon,{source:i.getAssetIDByName("HeartIcon")}),value:o.storage.enabledCommands.lovefemboys,onValueChange:function(s){o.storage.enabledCommands.lovefemboys=s,o.storage.pendingRestart=!0,t()}}),e.React.createElement(y,{label:"/nekoslife",subLabel:"Get SFW images/gifs from nekos.life",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("ImageIcon")}),value:o.storage.enabledCommands.nekoslife,onValueChange:function(s){o.storage.enabledCommands.nekoslife=s,o.storage.pendingRestart=!0,t()}})),e.React.createElement(p,{title:"NekosLife Reference",icon:i.getAssetIDByName("BookOpenIcon")},e.React.createElement(c,{label:"View SFW Categories",subLabel:"See all 16 available safe-for-work nekos.life categories",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("ListViewIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return a.push("VendettaCustomPage",{title:"NekosLife Categories",render:pt})}})),e.React.createElement(p,{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(c.Icon,{source:i.getAssetIDByName("ShieldIcon")}),value:o.storage.hiddenSettings.konochanBypassNsfw,onValueChange:function(s){s?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(){o.storage.hiddenSettings.konochanBypassNsfw=!0,t()},onCancel:function(){}}):(o.storage.hiddenSettings.konochanBypassNsfw=!1,t())}})),e.React.createElement(p,{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(c.Icon,{source:i.getAssetIDByName("EyeIcon")}),value:o.storage.hiddenSettings.visible,onValueChange:function(s){o.storage.hiddenSettings.visible=s}}),e.React.createElement(c,{label:"Reset Hidden Settings",subLabel:"Hide this section and disable all hidden commands",leading:e.React.createElement(c.Icon,{source:i.getAssetIDBy
`,"Tap on any developer to visit their GitHub profile.")),a.map(function(s,r){return e.React.createElement(e.ReactNative.Pressable,{key:r,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(p,{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(o.storage);const t=e.NavigationNative.useNavigation(),[,a]=e.React.useReducer(function(n){return n+1},0);return e.React.useEffect(function(){return function(){o.storage.pendingRestart&&(o.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(I,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(ft,{onHiddenUnlock:a}),e.React.createElement(p,{title:"Command Categories",icon:i.getAssetIDByName("ChannelListIcon")},e.React.createElement(c,{label:"Facts Commands",subLabel:"Cat facts, dog facts, and useless facts",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("BookmarkIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Facts Commands",render:Ct})}}),e.React.createElement(c,{label:"List Commands",subLabel:"Plugin lists and theme lists",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("ListViewIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"List Commands",render:Rt})}}),e.React.createElement(c,{label:"Image Commands",subLabel:"PetPet, KonoChan, and image utilities",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("ImageIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Image Commands",render:It})}}),e.React.createElement(c,{label:"Gary Commands",subLabel:`Gary images - Current: ${o.storage.garySettings.imageSource==="gary"?"Gary API":o.storage.garySettings.imageSource==="catapi"?"Cat API":o.storage.garySettings.imageSource==="minker"?"Minker API":o.storage.garySettings.imageSource==="goober"?"Goober API":"Gary API"}`,leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("CameraIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Gary Commands",render:bt})}}),e.React.createElement(c,{label:"Spotify Commands",subLabel:"Share your Spotify activity",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("SpotifyNeutralIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Spotify Commands",render:St})}}),e.React.createElement(c,{label:"Other Commands",subLabel:"System info, network tools, and miscellaneous",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("MoreHorizontalIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Other Commands",render:vt})}})),o.storage.hiddenSettings?.enabled&&o.storage.hiddenSettings?.visible&&e.React.createElement(p,{title:"\u{1F513} Hidden Settings",icon:i.getAssetIDByName("EyeIcon")},e.React.createElement(c,{label:"Hidden Commands",subLabel:"Experimental and mature content commands",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("WarningIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Hidden Settings",render:ht})}})),e.React.createElement(p,{title:"More Options",icon:i.getAssetIDByName("SettingsIcon")},e.React.createElement(c,{label:"Credits",subLabel:"View original authors of the plugins",leading:e.React.createElement(c.Icon,{source:i.getAssetIDByName("HeartIcon")}),trailing:e.React.createElement(c.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Credits",render:Nt})}})),e.React.createElement(e.ReactNative.View,{style:{height:32}}))}o.storage.factSettings||(o.storage.factSettings={sendAsReply:!0,includeCitation:!1}),o.storage.listSettings||(o.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),o.storage.garySettings||(o.storage.garySettings={imageSource:"gary"}),o.storage.enabledCommands||(o.storage.enabledCommands={catfact:!0,dogfact:!0,use