Source:${e.source}`),n},pe={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,n){try{const t=await de(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[CatFact] Error:",t),{type:4}}}},fe={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,n){try{const t=await le(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[DogFact] Error:",t),{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,n){try{const t=await ce(),r=Date.now().toString();return B.sendMessage(n.channel.id,{content:x(t)},void 0,{nonce:r}),{type:4}}catch(t){return console.error("[UselessFact] Error:",t),{type:4}}}},w={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},ge={DETAILED:"detailed"},O="",N={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."},_={SEMICOL:"; ",NEW_LINE:`
`},he="Nothing to see here, huh...",j="github.com/fres621/vendetta-plugins",C={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},be=p.findByProps("sendMessage","receiveMessage"),E=p.findByProps("sendBotMessage"),V=function(){try{return p.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}}(),F=function(e){return Object.keys(e).includes(j)},G=function(e){return Object.values(e).find(function(n){return n.id==j})?.enabled},K=function(e){return e.find(function(n){return n.name===ge.DETAILED})?.value??!1},A=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.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(_.SEMICOL)||"Unknown"},W=function(e){return e.join(_.NEW_LINE).trimEnd()},$=function(e){return W(e).length},k=async function(e,n){const t=Date.now().toString();await be.sendMessage(e,{content:W(n)},void 0,{nonce:t})},q=function(e,n){return[`**My${e}List|${n}${e}s**`,O]};async function Ce(e,n){try{const t=K(e),r=s.storage.themeListAlwaysDetailed??!1;if(!D.themes||typeof D.themes!="object"){const y=n.channel.id;return E.sendBotMessage(y,"No themes found or themes not loaded yet."),{type:4}}const i=Object.values(D.themes),a=n.channel.id,c=q("Theme",Object.keys(D.themes).length);if(i.length)for(const y of i){if(!y||typeof y!="object")continue;const{selected:l,data:d,id:m}=y,v=d?.name||"Unknown Theme",L=d?.description||"No description",M=d?.authors;t||r?c.push(`>**Name**:${v}`,`>**Selected**:${l?C.SELECTED:C.NOT_SELECTED}`,`>**Description**:${L}`,`>**Authors**:${A(M)}`,`>**[Install!](${m||"unknown"})**`,O):c.push(`>${l?C.SELECTED:C.NOT_SELECTED}**${v}**by${A(M)}`)}else c.push(he);const u=$(c)>V;if(u&&!F(b.plugins))E.sendBotMessage(a,N.SLM_NOT_INSTALLED);else if(u&&!G(b.plugins))E.sendBotMessage(a,N.SLM_NOT_ENABLED);else{if($(c)>2e3)return S.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(a,c)}});await k(a,c)}}catch(t){return console.error("[ThemeList] Error:",t),{type:4}}}async function Se(e,n){try{const t=K(e),r=s.storage.pluginListAlwaysDetailed??!1,i=n.channel.id;if(!b.plugins||typeof b.plugins!="object")return E.sendBotMessage(i,"No plugins found or plugins not loaded yet."),{type:4};const a=q("Plugin",Object.keys(b.plugins).length);for(const u of Object.values(b.plugins)){if(!u||typeof u!="object")continue;const{enabled:y,manifest:l,id:d}=u,m=l?.name||"Unknown Plugin",v=l?.description||"No description",L=l?.authors;t||r?a.push(`>**Name**:${m}`,`>**Status**:${y?C.ENABLED:C.DISABLED}`,`>**Description**:${v}`,`>**Authors**:${A(L)}`,`>**[Install!](${d||"unknown"})**`,O):a.push(`>${y?C.ENABLED:C.DISABLED}**${m}**by${A(L)}`)}const c=$(a)>V;if(c&&!F(b.plugins))E.sendBotMessage(i,N.SLM_NOT_INSTALLED);else if(c&&!G(b.plugins))E.sendBotMessage(i,N.SLM_NOT_ENABLED);else{if($(a)>2e3)return S.alerts.showConfirmationAlert({content:w.CONTENT,confirmText:w.CONFIRM,cancelText:w.CANCEL,onConfirm:async function(){return await k(i,a)}});await k(i,a)}}catch(t){return console.error("[PluginList] Error:",t),{type:4}}}const we={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:Se,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:Ce,applicationId:"-1",inputType:1,type:1
`)},void 0,{nonce:c}),{type:4}}}catch(t){return console.error("[Sysinfo] Error:",t),{type:4}}}const _e={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:`Displaythe${e}section.Setdefaultinsettings.`,displayDescription:`Displaythe${e}section.Setdefaultinsettings.`,type:5,required:!1}})],execute:Ue,applicationId:"-1",inputType:1,type:1},Q=p.findByProps("sendMessage","receiveMessage"),je=p.findByStoreName("SpotifyStore");async function Ve(e,n){return s.storage.enabledCommands?.spotifyTrack?R(n,function(t){return`https://open.spotify.com/track/${t.id}`}):{type:4}}async function Fe(e,n){return s.storage.enabledCommands?.spotifyAlbum?R(n,function(t){return`https://open.spotify.com/album/${t.album.id}`}):{type:4}}async function Ge(e,n){return s.storage.enabledCommands?.spotifyArtists?R(n,function(t){return t.artists.map(function(r){return`[${r.name}](${r.external_urls.spotify})`}).join(`
`)}):{type:4}}async function Ke(e,n){return s.storage.enabledCommands?.spotifyCover?R(n,function(t){return t.album.image.url}):{type:4}}async function R(e,n){try{const t=e.channel.id,r=je?.getTrack?.();if(!r){const c=Date.now().toString();return Q.sendMessage(t,{content:"You are not listening to any track."},void 0,{nonce:c}),{type:4}}const i=n(r),a=Date.now().toString();return Q.sendMessage(t,{content:i},void 0,{nonce:a}),{type:4}}catch(t){return console.error("[Spotify Command] Error:",t),{type:4}}}const We={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:Ve},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:Fe},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:Ge},Ye={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},ze=p.findByProps("sendMessage"),Xe={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,n){try{const t=s.storage.garySettings?.imageSource||"gary",r=await ye(t);if(!r)return{type:4};const i=Date.now().toString();return ze.sendMessage(n.channel.id,{content:r},void 0,{nonce:i}),{type:4}}catch(t){return console.error("[Gary] Error:",t),{type:4}}},applicationId:"-1",inputType:1,type:1},{ScrollView:Ze}=p.findByProps("ScrollView"),{TableRowGroup:g,TableSwitchRow:f,Stack:Je,TableRow:h}=p.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");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 Qe(){oe.useProxy(s.storage);const[e,n]=o.React.useReducer(function(a){return a+1},0);o.React.useEffect(function(){return function(){s.storage.pendingRestart&&(s.storage.pendingRestart=!1,S.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const t=function(a,c){s.storage.enabledCommands[a]=c,s.storage.pendingRestart=!0,n()},r=function(a){s.storage.garySettings.imageSource=a,n()},i=function(){S.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(){return r("gary")},onCancel:function(){S.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from remaining options:",confirmText:"Cat API",cancelText:"More Options",confirmColor:"brand",onConfirm:function(){return r("catapi")},onCancel:function(){S.alerts.showConfirmationAlert({title:"Choose Image Source",content:"Select from final options:",confirmText:"Minker API",cancelText:"Goober API",confirmColor:"brand",onConfirm:function(){return r("minker")},onCancel:function(){return r("goober")}})}})}})};return o.React.createElement(ie.View,{style:{flex:1}},o.React.createElement(Ze,{style:{flex:1},contentContainerStyle:{paddingBottom:38}},o.React.createElement(Je,{spacing:8},o.React.createElement(g,{title:"Facts Commands"},o.