15 lines
30 KiB
JavaScript
15 lines
30 KiB
JavaScript
(function(P,re,s,p,A,b,h,a,oe,ie,l,ce){"use strict";const le=async function(){const e=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:e.text,source:e.source,language:e.language}},de=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},ue=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}},ye=async function(e){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`)).json()},ge=async function(e="gary"){try{switch(e){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(t){return console.error(`[Gary API] Error fetching image from ${e}:`,t),null}},_=p.findByProps("sendMessage"),x=function(e){let t=e.text;return s.storage.factSettings?.includeCitation&&e.source&&(t+=`
|
|
|
|
Source: ${e.source}`),t},fe={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(e,t){try{const n=await ue(),o=Date.now().toString();return _.sendMessage(t.channel.id,{content:x(n)},void 0,{nonce:o}),{type:4}}catch(n){return console.error("[CatFact] Error:",n),{type:4}}}},pe={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const n=await de(),o=Date.now().toString();return _.sendMessage(t.channel.id,{content:x(n)},void 0,{nonce:o}),{type:4}}catch(n){return console.error("[DogFact] Error:",n),{type:4}}}},me={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const n=await le(),o=Date.now().toString();return _.sendMessage(t.channel.id,{content:x(n)},void 0,{nonce:o}),{type:4}}catch(n){return console.error("[UselessFact] Error:",n),{type:4}}}},I={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},he={DETAILED:"detailed"},O="",v={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."},V={SEMICOL:"; ",NEW_LINE:`
|
|
`},Ce="Nothing to see here, huh...",j="github.com/fres621/vendetta-plugins",w={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},Se=p.findByProps("sendMessage","receiveMessage"),E=p.findByProps("sendBotMessage"),F=function(){try{return p.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),G=function(e){return Object.keys(e).includes(j)},W=function(e){return Object.values(e).find(function(t){return t.id==j})?.enabled},K=function(e){return e.find(function(t){return t.name===he.DETAILED})?.value??!1},R=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.filter(function(t){return t&&(typeof t=="string"||typeof t=="object"&&t.name)}).map(function(t){return typeof t=="string"?t:t.name||"Unknown"}).join(V.SEMICOL)||"Unknown"},z=function(e){return e.join(V.NEW_LINE).trimEnd()},T=function(e){return z(e).length},L=async function(e,t){const n=Date.now().toString();await Se.sendMessage(e,{content:z(t)},void 0,{nonce:n})},q=function(e,t){return[`**My ${e} List | ${t} ${e}s**`,O]};async function be(e,t){try{const n=K(e),o=s.storage.themeListAlwaysDetailed??!1;if(!A.themes||typeof A.themes!="object"){const f=t.channel.id;return E.sendBotMessage(f,"No themes found or themes not loaded yet."),{type:4}}const i=Object.values(A.themes),r=t.channel.id,c=q("Theme",Object.keys(A.themes).length);if(i.length)for(const f of i){if(!f||typeof f!="object")continue;const{selected:d,data:u,id:C}=f,N=u?.name||"Unknown Theme",D=u?.description||"No description",B=u?.authors;n||o?c.push(`> **Name**: ${N}`,`> **Selected**: ${d?w.SELECTED:w.NOT_SELECTED}`,`> **Description**: ${D}`,`> **Authors**: ${R(B)}`,`> **[Install!](${C||"unknown"})**`,O):c.push(`> ${d?w.SELECTED:w.NOT_SELECTED} **${N}** by ${R(B)}`)}else c.push(Ce);const g=T(c)>F;if(g&&!G(b.plugins))E.sendBotMessage(r,v.SLM_NOT_INSTALLED);else if(g&&!W(b.plugins))E.sendBotMessage(r,v.SLM_NOT_ENABLED);else{if(T(c)>2e3)return h.alerts.showConfirmationAlert({content:I.CONTENT,confirmText:I.CONFIRM,cancelText:I.CANCEL,onConfirm:async function(){return await L(r,c)}});await L(r,c)}}catch(n){return console.error("[ThemeList] Error:",n),{type:4}}}async function we(e,t){try{const n=K(e),o=s.storage.pluginListAlwaysDetailed??!1,i=t.channel.id;if(!b.plugins||typeof b.plugins!="object")return E.sendBotMessage(i,"No plugins found or plugins not loaded yet."),{type:4};const r=q("Plugin",Object.keys(b.plugins).length);for(const g of Object.values(b.plugins)){if(!g||typeof g!="object")continue;const{enabled:f,manifest:d,id:u}=g,C=d?.name||"Unknown Plugin",N=d?.description||"No description",D=d?.authors;n||o?r.push(`> **Name**: ${C}`,`> **Status**: ${f?w.ENABLED:w.DISABLED}`,`> **Description**: ${N}`,`> **Authors**: ${R(D)}`,`> **[Install!](${u||"unknown"})**`,O):r.push(`> ${f?w.ENABLED:w.DISABLED} **${C}** by ${R(D)}`)}const c=T(r)>F;if(c&&!G(b.plugins))E.sendBotMessage(i,v.SLM_NOT_INSTALLED);else if(c&&!W(b.plugins))E.sendBotMessage(i,v.SLM_NOT_ENABLED);else{if(T(r)>2e3)return h.alerts.showConfirmationAlert({content:I.CONTENT,confirmText:I.CONFIRM,cancelText:I.CANCEL,onConfirm:async function(){return await L(i,r)}});await L(i,r)}}catch(n){return console.error("[PluginList] Error:",n),{type:4}}}const Ie={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},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:be,applicationId:"-1",inputType:1,type:1},Ne=p.findByStoreName("UserStore"),De=p.findByProps("sendMessage"),Ae={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(e,t){try{const n=(await Ne.getUser(e[0].value)).getAvatarURL(512),o=await ye(n),i=Date.now().toString();return De.sendMessage(t.channel.id,{content:o.url},void 0,{nonce:i}),{type:4}}catch(n){return console.error("[PetPet] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},ve=p.findByProps("sendMessage"),Re=p.findByProps("sendBotMessage","sendMessage","receiveMessage"),H=async function(e){const t="https://konachan.com/post.json",n=e?"rating:explicit":"rating:safe",o=Math.floor(Math.random()*100);try{const i=await(await fetch(`${t}?tags=${n}&limit=1&page=${o}`)).json();return!Array.isArray(i)||i.length===0?null:i[0].file_url}catch(i){return console.error("[KonoChan Randomizer] Error fetching image:",i),null}},X=function(){return h.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},Y={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},Te={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[Y],execute:async function(e,t){try{const n=new Map(e.map(function(i){return[i.name,i]})).get("nsfw")?.value||!1;if(n&&!t.channel.nsfw)return X(),{type:4};const o=await H(n);return o?(Re.sendBotMessage(t.channel.id,`Here's your random image: ${o}`),{type:4}):{type:4}}catch(n){return console.error("[KonoSelf] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},Le={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:[Y],execute:async function(e,t){try{const n=new Map(e.map(function(r){return[r.name,r]})).get("nsfw")?.value||!1;if(n&&!t.channel.nsfw)return X(),{type:4};const o=await H(n);if(!o)return{type:4};const i=Date.now().toString();return ve.sendMessage(t.channel.id,{content:o},void 0,{nonce:i}),{type:4}}catch(n){return console.error("[KonoSend] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},Q=p.findByProps("getAPIBaseURL","get"),ke=p.findByProps("sendMessage"),k=async function(e,t,n){const o=t?`&author_id=${t}`:"",i=n?`&channel_id=${n}`:"",r=t?"":"&min_id=0";return(await Q.get({url:`/guilds/${e}/messages/search`,query:`include_nsfw=true${o}${i}${r}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},Z=async function(e,t){const n=t?`&author_id=${t}`:"",o=t?"":"&min_id=0";return(await Q.get({url:`/channels/${e}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${n}${o}`})).body.messages[0][0]},$e={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(e,t){try{const n=new Map(e.map(function(C){return[C.name,C]})),o=n.get("user")?.value,i=n.get("channel")?.value,r=n.get("send")?.value,c=t.guild?.id,g=t.channel.id,f=t.channel.type===1;let d="https://discord.com/channels/",u;if(!o&&!i)f?(u=await Z(g),d+=`@me/${g}/${u.id}`):(u=await k(c),d+=`${c}/${u.channel_id}/${u.id}`);else if(o)f?(u=await Z(g,o),d+=`@me/${g}/${u.id}`):(u=await k(c,o),d+=`${c}/${u.channel_id}/${u.id}`);else if(i){if(f)return{type:4};u=await k(c,null,i),d+=`${c}/${i}/${u.id}`}else{if(f)return{type:4};u=await k(c,o,i),d+=`${c}/${i}/${u.id}`}if(r){const C=Date.now().toString();return ke.sendMessage(t.channel.id,{content:d},void 0,{nonce:C}),{type:4}}else return a.url.openDeeplink(d),{type:4}}catch(n){return console.error("[FirstMessage] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},Be=p.findByProps("sendMessage"),Me=p.findByProps("sendBotMessage","sendMessage","receiveMessage");function Pe(){let{height:e,width:t,scale:n}=a.ReactNative.Dimensions.get("screen");return e*=n,t*=n,{width:t,height:e}}function _e(){try{const e=p.findByProps("memory");if(!e)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"};const{cpuCoreCount:t,cpuPercentage:n,memory:o}=e,i=n?n.toFixed(2)+"%":"N/A",r=o?parseFloat((o/1e3).toPrecision(3))+" MB":"N/A";let c="N/A";try{const g=p.findByProps("useNetInfo");if(g){const f=Object.values(g.fetch()).filter(function(d){return d?.type})[0];if(f){const{type:d,details:u}=f;c={wifi:"WiFi",ethernet:"Ethernet",other:"Unknown",bluetooth:"Bluetooth",wimax:"WiMAX",vpn:"VPN",cellular:u?.cellularGeneration?.toUpperCase()||"Cellular"}[d]??d}}}catch(g){console.warn("Network info unavailable:",g)}return{cpuCoreCount:t,cpuPerc:i,memUsage:r,netInfo:c}}catch(e){return console.warn("Hardware info unavailable:",e),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A",netInfo:"N/A"}}}function xe(){try{const{NativeModules:e}=a.ReactNative;return(e.InfoDictionaryManager??e.RTNClientInfoManager)||{}}catch(e){return console.warn("Discord info unavailable:",e),{}}}function Oe(){try{const{cpuCoreCount:e,cpuPerc:t,memUsage:n,netInfo:o}=_e(),i=xe(),{vendetta:r,discord:c,react:g,hermes:f,os:d,device:u}=oe.getDebugInfo(),{version:C,bytecodeVersion:N}=f||{},{version:D,nativeVersion:B}=g||{},{name:te,version:at,sdk:ne}=d||{},{manufacturer:st,brand:ae,model:se,codename:rt}=u||{},{version:ot}=r||{},{version:it,build:ct}=c||{},{ReleaseChannel:lt}=i,dt=te=="iOS"?rt:`${ae} ${se}`,{width:ut,height:yt}=Pe();let M={Device:{Device:dt||"Unknown",Model:se||"Unknown",Manufacturer:st||"Unknown",Brand:ae||"Unknown",Display:`${ut}x${yt}`},Hardware:{"CPU Cores":e||"N/A",Network:o},Software:{OS:te||"Unknown",Version:at||"Unknown"},Discord:{Branch:lt||"Unknown",Version:it||"Unknown",Build:ct||"Unknown",Vendetta:ot||"Unknown","CPU Usage":t,"Memory Usage":n},React:{Version:D||"Unknown","Hermes Bytecode":N||"Unknown",Hermes:C||"Unknown",Native:B||"Unknown"}};return window.enmity&&(M.Discord.Enmity=window.enmity.version),window.aliucord&&(M.Discord.Aliucord=window.aliucord.version),ne&&(M.Software["SDK Version"]=ne),M}catch(e){throw console.error("Error generating system info:",e),e}}const J=["device","hardware","software","discord","react","ephemeral"];for(const e of J)s.storage[e]===void 0&&(s.storage[e]=!0);function Ue(e,t){try{let n=[`__System Information__
|
|
`];const o=Oe();Object.keys(o).forEach(function(c){const g=s.storage[c.toLowerCase()],f=e.find(function(d){return d.name==c.toLowerCase()})?.value??g;(f||g)&&!(g&&!f)&&(n.push(`[**${c}**]`),Object.keys(o[c]).forEach(function(d){n.push(`> ${d}: ${o[c][d]}`)}))});const i=s.storage.ephemeral,r=e.find(function(c){return c.name=="ephemeral"})?.value??i;if((r||i)&&!(i&&!r))return Me.sendBotMessage(t.channel.id,n.join(`
|
|
`)),{type:4};{const c=Date.now().toString();return Be.sendMessage(t.channel.id,{content:n.join(`
|
|
`)},void 0,{nonce:c}),{type:4}}}catch(n){return console.error("[Sysinfo] Error:",n),{type:4}}}const Ve={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},...J.slice(0,-1).map(function(e){return{name:e,displayName:e,description:`Display the ${e} section. Set default in settings.`,displayDescription:`Display the ${e} section. Set default in settings.`,type:5,required:!1}})],execute:Ue,applicationId:"-1",inputType:1,type:1},ee=p.findByProps("sendMessage","receiveMessage"),je=p.findByStoreName("SpotifyStore");async function Fe(e,t){return s.storage.enabledCommands?.spotifyTrack?$(t,function(n){return`https://open.spotify.com/track/${n.id}`}):{type:4}}async function Ge(e,t){return s.storage.enabledCommands?.spotifyAlbum?$(t,function(n){return`https://open.spotify.com/album/${n.album.id}`}):{type:4}}async function We(e,t){return s.storage.enabledCommands?.spotifyArtists?$(t,function(n){return n.artists.map(function(o){return`[${o.name}](${o.external_urls.spotify})`}).join(`
|
|
`)}):{type:4}}async function Ke(e,t){return s.storage.enabledCommands?.spotifyCover?$(t,function(n){return n.album.image.url}):{type:4}}async function $(e,t){try{const n=e.channel.id,o=je?.getTrack?.();if(!o){const c=Date.now().toString();return ee.sendMessage(n,{content:"You are not listening to any track."},void 0,{nonce:c}),{type:4}}const i=t(o),r=Date.now().toString();return ee.sendMessage(n,{content:i},void 0,{nonce:r}),{type:4}}catch(n){return console.error("[Spotify Command] Error:",n),{type:4}}}const ze={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:Fe},qe={name:"spotify album",displayName:"spotify album",description:"Sends your current track's album",displayDescription:"Sends your current track's album",applicationId:"-1",inputType:1,type:1,execute:Ge},He={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:We},Xe={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:Ke},Ye=p.findByProps("sendMessage"),Qe={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(e,t){try{let n="gary";s.storage.garySettings?.useCatAPI?n="catapi":s.storage.garySettings?.useMinkerAPI?n="minker":s.storage.garySettings?.useGooberAPI&&(n="goober");const o=await ge(n);if(!o)return{type:4};const i=Date.now().toString();return Ye.sendMessage(t.channel.id,{content:o},void 0,{nonce:i}),{type:4}}catch(n){return console.error("[Gary] Error:",n),{type:4}}},applicationId:"-1",inputType:1,type:1},{ScrollView:Ze}=p.findByProps("ScrollView");p.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");const{FormRow:y,FormSwitchRow:m}=ce.Forms;function S({title:e,icon:t,children:n,padding:o=!1}){const i=a.stylesheet.createThemedStyleSheet({main:{backgroundColor:h.semanticColors.CARD_PRIMARY_BG,borderColor:h.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:h.semanticColors.TEXT_MUTED},titleText:{fontSize:14,fontWeight:"600",color:h.semanticColors.TEXT_MUTED}});return a.React.createElement(a.ReactNative.View,{style:{marginHorizontal:16,marginTop:16}},e&&a.React.createElement(a.ReactNative.View,{style:i.titleContainer},t&&a.React.createElement(a.ReactNative.Image,{style:i.icon,source:t,resizeMode:"cover"}),a.React.createElement(a.ReactNative.Text,{style:i.titleText},e.toUpperCase())),a.React.createElement(a.ReactNative.View,{style:i.main},o?a.React.createElement(a.ReactNative.View,{style:{paddingHorizontal:16,paddingVertical:16}},n):n))}function Je(){const e=a.stylesheet.createThemedStyleSheet({container:{flexDirection:"column",alignItems:"center",paddingVertical:24,paddingHorizontal:16},title:{fontSize:28,fontWeight:"700",color:h.semanticColors.TEXT_NORMAL,marginBottom:4},subtitle:{fontSize:16,fontWeight:"500",color:h.semanticColors.TEXT_MUTED},iconContainer:{backgroundColor:h.semanticColors.BACKGROUND_SECONDARY,borderRadius:16,padding:12,marginBottom:16},icon:{width:32,height:32,tintColor:h.semanticColors.TEXT_NORMAL}});return a.React.createElement(a.ReactNative.View,{style:e.container},a.React.createElement(a.ReactNative.View,{style:e.iconContainer},a.React.createElement(a.ReactNative.Image,{source:l.getAssetIDByName("SettingsIcon"),style:e.icon})),a.React.createElement(a.ReactNative.Text,{style:e.title},"Commands"),a.React.createElement(a.ReactNative.Text,{style:e.subtitle},"A collection of useful commands"))}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}),s.storage.pendingRestart||(s.storage.pendingRestart=!1);function et(){ie.useProxy(s.storage);const[e,t]=a.React.useReducer(function(r){return r+1},0),n=a.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:h.semanticColors.BACKGROUND_PRIMARY},spacing:{height:16}});a.React.useEffect(function(){return function(){s.storage.pendingRestart&&(s.storage.pendingRestart=!1,h.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const o=function(r,c){s.storage.enabledCommands[r]=c,s.storage.pendingRestart=!0,t()},i=function(){h.alerts.showConfirmationAlert({title:"Choose Gary Image Source",content:"Select an image source for the Gary command:",confirmText:"Gary API",cancelText:"Other Options",confirmColor:"brand",onConfirm:function(){s.storage.garySettings.imageSource="gary",t()},onCancel:function(){h.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from remaining options:",confirmText:"Cat API",cancelText:"More Options",confirmColor:"brand",onConfirm:function(){s.storage.garySettings.imageSource="catapi",t()},onCancel:function(){h.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from final options:",confirmText:"Minker API",cancelText:"Goober API",confirmColor:"brand",onConfirm:function(){s.storage.garySettings.imageSource="minker",t()},onCancel:function(){s.storage.garySettings.imageSource="goober",t()}})}})}})};return a.React.createElement(a.ReactNative.View,{style:n.container},a.React.createElement(Ze,{style:{flex:1},contentContainerStyle:{paddingBottom:38},showsVerticalScrollIndicator:!1},a.React.createElement(Je,null),a.React.createElement(S,{title:"Facts Commands",icon:l.getAssetIDByName("BookIcon")},a.React.createElement(m,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ReplyIcon")}),value:s.storage.factSettings?.sendAsReply??!0,onValueChange:function(r){s.storage.factSettings.sendAsReply=r,t()}}),a.React.createElement(m,{label:"Include Source Citation",subLabel:"Include the source of facts when available",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("LinkIcon")}),value:s.storage.factSettings?.includeCitation??!1,onValueChange:function(r){s.storage.factSettings.includeCitation=r,t()}}),a.React.createElement(m,{label:"/catfact",subLabel:"Get random cat facts",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ic_cat")}),value:s.storage.enabledCommands?.catfact??!0,onValueChange:function(r){return o("catfact",r)}}),a.React.createElement(m,{label:"/dogfact",subLabel:"Get random dog facts",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ic_dog")}),value:s.storage.enabledCommands?.dogfact??!0,onValueChange:function(r){return o("dogfact",r)}}),a.React.createElement(m,{label:"/useless",subLabel:"Get random useless facts",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("QuestionMarkIcon")}),value:s.storage.enabledCommands?.useless??!0,onValueChange:function(r){return o("useless",r)}})),a.React.createElement(S,{title:"List Commands",icon:l.getAssetIDByName("ListIcon")},a.React.createElement(m,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("PuzzlePieceIcon")}),value:s.storage.listSettings?.pluginListAlwaysDetailed??!1,onValueChange:function(r){s.storage.listSettings.pluginListAlwaysDetailed=r,t()}}),a.React.createElement(m,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("PaintPaletteIcon")}),value:s.storage.listSettings?.themeListAlwaysDetailed??!1,onValueChange:function(r){s.storage.listSettings.themeListAlwaysDetailed=r,t()}}),a.React.createElement(m,{label:"/plugin-list",subLabel:"List all installed plugins",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("PuzzlePieceIcon")}),value:s.storage.enabledCommands?.pluginList??!0,onValueChange:function(r){return o("pluginList",r)}}),a.React.createElement(m,{label:"/theme-list",subLabel:"List all installed themes",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("PaintPaletteIcon")}),value:s.storage.enabledCommands?.themeList??!0,onValueChange:function(r){return o("themeList",r)}})),a.React.createElement(S,{title:"Image Commands",icon:l.getAssetIDByName("ImageIcon")},a.React.createElement(m,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("HandIcon")}),value:s.storage.enabledCommands?.petpet??!0,onValueChange:function(r){return o("petpet",r)}})),a.React.createElement(S,{title:"Gary Commands",icon:l.getAssetIDByName("ic_cat")},a.React.createElement(m,{label:"/gary",subLabel:"Send random Gary images to channel",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ic_cat")}),value:s.storage.enabledCommands?.gary??!0,onValueChange:function(r){return o("gary",r)}}),a.React.createElement(y,{label:"Gary Image Source",subLabel:`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:a.React.createElement(y.Icon,{source:l.getAssetIDByName("DownloadIcon")}),trailing:a.React.createElement(y.Arrow,null),onPress:i})),a.React.createElement(S,{title:"KonoChan Commands",icon:l.getAssetIDByName("ImageIcon")},a.React.createElement(m,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("EyeIcon")}),value:s.storage.enabledCommands?.konoself??!0,onValueChange:function(r){return o("konoself",r)}}),a.React.createElement(m,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ImageIcon")}),value:s.storage.enabledCommands?.konosend??!0,onValueChange:function(r){return o("konosend",r)}})),a.React.createElement(S,{title:"Message Commands",icon:l.getAssetIDByName("ChatIcon")},a.React.createElement(m,{label:"/firstmessage",subLabel:"Get the first message in a channel",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("ChatIcon")}),value:s.storage.enabledCommands?.firstmessage??!0,onValueChange:function(r){return o("firstmessage",r)}})),a.React.createElement(S,{title:"System Commands",icon:l.getAssetIDByName("SettingsIcon")},a.React.createElement(m,{label:"/sysinfo",subLabel:"Display system information",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("SettingsIcon")}),value:s.storage.enabledCommands?.sysinfo??!0,onValueChange:function(r){return o("sysinfo",r)}})),a.React.createElement(S,{title:"Spotify Commands",icon:l.getAssetIDByName("SpotifyIcon")},a.React.createElement(m,{label:"/spotify track",subLabel:"Share your current Spotify track",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("SpotifyIcon")}),value:s.storage.enabledCommands?.spotifyTrack??!0,onValueChange:function(r){return o("spotifyTrack",r)}}),a.React.createElement(m,{label:"/spotify album",subLabel:"Share your current track's album",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("SpotifyIcon")}),value:s.storage.enabledCommands?.spotifyAlbum??!0,onValueChange:function(r){return o("spotifyAlbum",r)}}),a.React.createElement(m,{label:"/spotify artists",subLabel:"Share your current track's artists",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("SpotifyIcon")}),value:s.storage.enabledCommands?.spotifyArtists??!0,onValueChange:function(r){return o("spotifyArtists",r)}}),a.React.createElement(m,{label:"/spotify cover",subLabel:"Share your current track's cover",leading:a.React.createElement(y.Icon,{source:l.getAssetIDByName("SpotifyIcon")}),value:s.storage.enabledCommands?.spotifyCover??!0,onValueChange:function(r){return o("spotifyCover",r)}})),a.React.createElement(S,{title:"Credits",icon:l.getAssetIDByName("PeopleIcon"),padding:!0},a.React.createElement(a.ReactNative.Text,{style:{fontSize:14,color:h.semanticColors.TEXT_MUTED,lineHeight:20}},"Facts Commands by jdev082",`
|
|
`,"List Commands by Kitomanari",`
|
|
`,"PetPet Command by wolfieeee",`
|
|
`,"KonoChan Commands by btmc727 & Rico040",`
|
|
`,"FirstMessage Command by sapphire",`
|
|
`,"Sysinfo Command by mugman",`
|
|
`,"Spotify Commands by Kitomanari",`
|
|
`,"Gary Command by Zach Orange")),a.React.createElement(a.ReactNative.View,{style:n.spacing})))}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});const tt={catfact:fe,dogfact:pe,useless:me,petpet:Ae,pluginList:Ie,themeList:Ee,konoself:Te,konosend:Le,firstmessage:$e,sysinfo:Ve,spotifyTrack:ze,spotifyAlbum:qe,spotifyArtists:He,spotifyCover:Xe,gary:Qe};let U=[];var nt={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[e,t]of Object.entries(tt))s.storage.enabledCommands[e]&&U.push(re.registerCommand(t));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),U.forEach(function(e){return e()}),U=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:et};return P.default=nt,Object.defineProperty(P,"__esModule",{value:!0}),P})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.storage,vendetta.ui.assets,vendetta.ui.components);
|