vd-plugins/Commands/index.js

14 lines
54 KiB
JavaScript
Raw Normal View History

(function(V,le,o,C,k,S,u,e,de,I,i,N,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}},ye=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},me=async function(){const t=await(await fetch("https://catfact.ninja/fact")).json();return{text:t.fact,length:t.length}},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(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 o.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 me(),s=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:s}),{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 ye(),s=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:s}),{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(),s=Date.now().toString();return U.sendMessage(n.channel.id,{content:O(a)},void 0,{nonce:s}),{type:4}}catch(a){return console.error("[UselessFact] Error:",a),{type:4}}}},E={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},Ie={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...",K="github.com/fres621/vendetta-plugins",w={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Se=C.findByProps("sendMessage","receiveMessage"),v=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(n){return n.id==K})?.enabled},X=function(t){return t.find(function(n){return n.name===Ie.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 Se.sendMessage(t,{content:Y(n)},void 0,{nonce:a})},Z=function(t,n){return[`**My ${t} List | ${n} ${t}s**`,W]};async function Ne(t,n){try{const a=X(t),s=o.storage.themeListAlwaysDetailed??!1;if(!k.themes||typeof k.themes!="object"){const p=n.channel.id;return v.sendBotMessage(p,"No themes found or themes not loaded yet."),{type:4}}const r=Object.values(k.themes),c=n.channel.id,l=Z("Theme",Object.keys(k.themes).length);if(r.length)for(const p of r){if(!p||typeof p!="object")continue;const{selected:g,data:h,id:m}=p,A=h?.name||"Unknown Theme",D=h?.description||"No description",_=h?.authors;a||s?l.push(`> **Name**: ${A}`,`> **Selected**: ${g?w.SELECTED:w.NOT_SELECTED}`,`> **Description**: ${D}`,`> **Authors**: ${L(_)}`,`> **[Install!](${m||"unknown"})**`,W):l.push(`> ${g?w.SELECTED:w.NOT_SELECTED} **${A}** by ${L(_)}`)}else l.push(Re);const y=P(l)>H;if(y&&!z(S.plugins))v.sendBotMessage(c,B.SLM_NOT_INSTALLED);else if(y&&!q(S.plugins))v.sendBotMessage(c,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 $(c,l)}});await $(c,l)}}catch(a){return console.error("[ThemeList] Error:",a),{type:4}}}async function we(t,n){try{const a=X(t),s=o.storage.pluginListAlwaysDetailed??!1,r=n.channel.id;if(!S.plugins||typeof S.plugins!="object")return v.sendBotMessage(r,"No plugins found or plugins not loaded yet."),{type:4};const c=Z("Plugin",Object.keys(S.plugins).length);for(const y of Object.values(S.plugins)){if(!y||typeof y!="object")continue;const{enabled:p,manifest:g,id:h}=y,m=g?.name||"Unknown Plugin",A=g?.description||"No description",D=g?.authors;a||s?c.push(`> **Name**: ${m}`,`> **Status**: ${p?w.ENABLED:w.DISABLED}`,`> **Description**: ${A}`,`> **Authors**: ${L(D)}`,`> **[Install!](${h||"unknown"})**`,W):c.push(`> ${p?w.ENABLED:w.DISABLED} **${m}** by ${L(D)}`)}const l=P(c)>H;if(l&&!z(S.plugins))v.sendBotMessage(r,B.SLM_NOT_INSTALLED);else if(l&&!q(S.plugins))v.sendBotMessage(r,B.SLM_NOT_ENABLED);else{if(P(c)>2e3)return u.alerts.showConfirmationAlert({content:E.CONTENT,confirmText:E.CONFIRM,cancelText:E.CANCEL,onConfirm:async function(){return await $(r,c)}});await $(r,c)}}catch(a){return console.error("[PluginList] Error:",a),{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:we,applicationId:"-1",inputType:1,type:1},ve={name:"theme-list",displayName:"theme list",description:"Send your theme list to the current channel",displayDescription:"Send your theme list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:Ne,applicationId:"-1",inputType:1,type:1
`];const s=We();Object.keys(s).forEach(function(l){const y=o.storage[l.toLowerCase()],p=t.find(function(g){return g.name==l.toLowerCase()})?.value??y;(p||y)&&!(y&&!p)&&(a.push(`[**${l}**]`),Object.keys(s[l]).forEach(function(g){a.push(`> ${g}: ${s[l][g]}`)}))});const r=o.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},oe=C.findByProps("sendMessage","receiveMessage"),Ke=C.findByStoreName("SpotifyStore");async function He(t,n){return o.storage.enabledCommands?.spotifyTrack?M(n,function(a){return`https://open.spotify.com/track/${a.id}`}):{type:4}}async function ze(t,n){return o.storage.enabledCommands?.spotifyAlbum?M(n,function(a){return`https://open.spotify.com/album/${a.album.id}`}):{type:4}}async function qe(t,n){return o.storage.enabledCommands?.spotifyArtists?M(n,function(a){return a.artists.map(function(s){return`[${s.name}](${s.external_urls.spotify})`}).join(`
`)}):{type:4}}async function Xe(t,n){return o.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,s=Ke?.getTrack?.();if(!s){const l=Date.now().toString();return oe.sendMessage(a,{content:"You are not listening to any track."},void 0,{nonce:l}),{type:4}}const r=n(s),c=Date.now().toString();return oe.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: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,n){try{o.storage.garySettings||(o.storage.garySettings={imageSource:"gary"});const a=o.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${a}`);const s=await pe(a);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(n.channel.id,{content:s},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 s=n.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 c=r.url.replace(/&/g,"&");if(T(c))return c}}}if(n.secure_media?.oembed?.thumbnail_url){const s=n.secure_media.oembed.thumbnail_url;if(T(s))return s}return n.thumbnail&&n.thumbnail!=="self"&&n.thumbnail!=="default"&&n.thumbnail!=="nsfw"&&n.thumbnail.startsWith("http")&&T(n.thumbnail)?n.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 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 s=a[Math.floor(Math.random()*a.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(y,null,4)}
\`\`\``;if(r)return{type:4,data:{content:p,flags:64}};if(s){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 s=`\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:s,flags:64}}:(I.showToast(s,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 s=0;s<n;s++)try{s>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 ${s+1}:`,r)}return a}function yt(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 mt(t){return!t||typeof t!="string"?!1:ut.includes(t.toLowerCase())}const ft={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(m){return m.name==="category"})?.value,s=t.find(function(m){return m.name==="limit"})?.value,r=t.find(function(m){return m.name==="send"})?.value||!1,c=t.find(function(m){return m.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{category:a,limitValue:s,shouldSend:r,isEphemeral:c}),!a||typeof a!="string"){const m="\u274C Category is required! Examples: neko, waifu, hentai, lewd";return console.error("[NekosLife] No category provided"),c?{type:4,data:{content:m,flags:64}}:(I.showToast(m,i.getAssetIDByName("CircleXIcon")),{type:4})}const l=a.toLowerCase().trim();if(!mt(l)){const m=`\u274C Invalid category "${a}". Available: neko, waifu, hentai, lewd, yuri, etc.`;return c?{type:4,data:{content:m,flags:64}}:(I.showToast(m,i.getAssetIDByName("CircleXIcon")),{type:4})}let y=1;s!=null&&(y=parseInt(String(s))||1,y=Math.max(1,Math.min(5,y)));const p=yt(l);if(console.log("[NekosLife] Processing request:",{category:l,limit:y,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:h,flags:64}};if(r){console.log("[NekosLife] Sending to chat");const m=Date.now().toString();return lt.sendMessage(n.channel.id,{content:h},void 0,{nonce:m}),{type:4}}else return console.log("[NekosLife] Sending as bot message"),dt.sendBotMessage(n.channel.id,h),{type:4}}catch(a){console.error("[NekosLife] Command error:",a);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}}:(I.showToast(s,i.getAssetIDByName("CircleXIcon")),{type:4})}},applicationId:"-1",inputType:1,type:1},{ScrollView:R}=e.ReactNative,{FormRow:d,FormSwitchRow:f}=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 b({title:t,icon:n,children:a,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},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},s?e.React.createElement(e.ReactNative.View,{style:{paddingHorizontal:16,paddingVertical:16}},a):a))}function pt({onHiddenUnlock:t}){const[n,a]=e.React.useState(0),[s,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(o.storage.hiddenSettings.enabled){o.storage.hiddenSettings.visible=!o.storage.hiddenSettings.visible,I.showToast(`Hidden settings ${o.storage.hiddenSettings.visible?"visible":"hidden"}`,i.getAssetIDByName("SettingsIcon")),t?.();return}s&&clearTimeout(s);const y=setTimeout(function(){a(0)},1e3);r(y);const p=n+1;a(p),!(p<10)&&(I.showToast("\u{1F513} Hidden settings unlocked!",i.getAssetIDByName("CheckmarkIcon")),o.storage.hiddenSettings.enabled=!0,o.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(){N.useProxy(o.storage);const[,t]=e.React.useReducer(function(a){return a+1},0),n=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY},warningText:{fontSize:14,color:u.semanticColors.TEXT_DANGER,textAlign:"center",lineHeight:20,fontWei
`,"Tap on any developer to visit their GitHub profile.")),n.map(function(s,r){return e.React.createElement(e.ReactNative.Pressable,{key:r,style:t.creditItem,onPress:function(){return a(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(b,{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(){N.useProxy(o.storage);const t=e.NavigationNative.useNavigation(),[,n]=e.React.useReducer(function(a){return a+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(R,{style:{flex:1,backgroundColor:u.semanticColors.BACKGROUND_PRIMARY}},e.React.createElement(pt,{onHiddenUnlock:n}),e.React.createElement(b,{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:bt})}}),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:It})}}),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:Rt})}}),e.React.createElement(d,{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(d.Icon,{source:i.getAssetIDByName("CameraIcon")}),trailing:e.React.createElement(d.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"Gary Commands",render:Ct})}}),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:St})}}),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})}})),o.storage.hiddenSettings?.enabled&&o.storage.hiddenSettings?.visible&&e.React.createElement(b,{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:ht})}})),e.React.createElement(b,{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:wt})}})),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