diff --git a/Commands/index.js b/Commands/index.js index 6f65090..da5c09f 100644 --- a/Commands/index.js +++ b/Commands/index.js @@ -1,4 +1,4 @@ -(function(E,B,a,u,T,g,f,o,V,W){"use strict";const K=u.findByProps("sendMessage"),r=function(n,t,s,e,i){if(!t)return{type:4};if(i)return{type:4,data:{content:t,flags:64}};const c={content:t,...s&&e?.factSettings?.sendAsReply?{messageReference:{messageId:s}}:{}};return K.sendMessage(n,c,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}},G=async function(){const n=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:n.text,source:n.source,language:n.language}},U=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},_=async function(){const n=await(await fetch("https://catfact.ninja/fact")).json();return{text:n.fact,length:n.length}},q=async function(n){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${n.replace("webp","png")}`)).json()},R=function(n){let t=n.text;return a.storage.factSettings?.includeCitation&&n.source&&(t+=` +(function(E,B,a,f,T,g,m,o,V,W){"use strict";const K=f.findByProps("sendMessage"),c=function(n,t,s,e,i){if(!t)return{type:4};if(i)return{type:4,data:{content:t,flags:64}};const r={content:t,...s&&e?.factSettings?.sendAsReply?{messageReference:{messageId:s}}:{}};return K.sendMessage(n,r,void 0,{nonce:(Date.now()*4194304).toString()}),{type:4}},G=async function(){const n=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:n.text,source:n.source,language:n.language}},U=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},_=async function(){const n=await(await fetch("https://catfact.ninja/fact")).json();return{text:n.fact,length:n.length}},q=async function(n){return await(await fetch(`https://api.obamabot.me/v2/image/petpet?image=${n.replace("webp","png")}`)).json()},R=function(n){let t=n.text;return a.storage.factSettings?.includeCitation&&n.source&&(t+=` -Source: ${n.source}`),t},z={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(n,t){const s=await _();return r(t.channel.id,R(s),t.message?.id,a.storage)}},H={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(n,t){const s=await U();return r(t.channel.id,R(s),t.message?.id,a.storage)}},Y={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(n,t){const s=await G();return r(t.channel.id,R(s),t.message?.id,a.storage)}},y="https://vd-plugins.github.io/proxy/actuallythesun.github.io/vendetta-plugins/SplitLargeMessages/",d={ENABLED:"\u{1F7E2}",DISABLED:"\u{1F534}",SELECTED:"\u{1F536}",NOT_SELECTED:"\u{1F537}"},b=function(n){return n.map(function(t){return t.name}).join(", ")},p=function(n){return n.join(` -`).trimEnd()},A=function(n){return p(n).length},$=function(){return Object.keys(g.plugins).includes(y)},N=function(){return Object.values(g.plugins).find(function(n){return n.id===y})?.enabled??!1},x=function(){return f.alerts.showConfirmationAlert({title:"Large Message Warning",content:"This list is too long to send! Would you like to install the Split Large Messages plugin?",confirmText:"Install Plugin",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){o.openURL(y)}})},k=function(){return f.alerts.showConfirmationAlert({title:"Plugin Disabled",content:"The Split Large Messages plugin is installed but disabled. Would you like to enable it now?",confirmText:"Enable Plugin",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){const n=Object.values(g.plugins).find(function(t){return t.id===y});n&&(n.enabled=!0)}})};async function J(n,t){const s=a.storage.listSettings?.pluginListAlwaysDetailed??!1,e=[`**My Plugin List | ${Object.keys(g.plugins).length} Plugins**`,""];for(const i of Object.values(g.plugins)){const{enabled:c,manifest:C,id:D}=i,{name:S,description:w,authors:L}=C;n||s?e.push(`> **Name**: ${S}`,`> **Status**: ${c?d.ENABLED:d.DISABLED}`,`> **Description**: ${w}`,`> **Authors**: ${b(L)}`,`> **[Install!](${D})**`,""):e.push(`> ${c?d.ENABLED:d.DISABLED} **${S}** by ${b(L)}`)}return A(e)>2e3?$()?N()?f.alerts.showConfirmationAlert({title:"Large Message",content:"This list is over 2000 characters. Send anyway?",confirmText:"Send",cancelText:"Cancel",onConfirm:function(){return r(t.channel.id,p(e))}}):k():x():r(t.channel.id,p(e))}async function Q(n,t){const s=a.storage.themeListAlwaysDetailed??!1,e=[`**My Theme List | ${Object.keys(T.themes).length} Themes**`,""],i=Object.values(T.themes);if(i.length)for(const c of i){const{selected:C,data:D,id:S}=c,{name:w,description:L,authors:O}=D;n||s?e.push(`> **Name**: ${w}`,`> **Selected**: ${C?d.SELECTED:d.NOT_SELECTED}`,`> **Description**: ${L}`,`> **Authors**: ${b(O)}`,`> **[Install!](${S})**`,""):e.push(`> ${C?d.SELECTED:d.NOT_SELECTED} **${w}** by ${b(O)}`)}else e.push("Nothing to see here, huh...");return A(e)>2e3?$()?N()?f.alerts.showConfirmationAlert({title:"Large Message",content:"This list is over 2000 characters. Send anyway?",confirmText:"Send",cancelText:"Cancel",onConfirm:function(){return r(t.channel.id,p(e))}}):k():x():r(t.channel.id,p(e))}const X={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:async function(n,t){const s=n.find(function(e){return e.name==="detailed"})?.value??!1;return J(s,t)},applicationId:"-1",inputType:1,type:1},Z={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:async function(n,t){const s=n.find(function(e){return e.name==="detailed"})?.value??!1;return Q(s,t)},applicationId:"-1",inputType:1,type:1},ee=u.findByStoreName("UserStore"),te={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(n,t){const s=(await ee.getUser(n[0].value)).getAvatarURL(512),e=await q(s);return r(t.channel.id,e.url,t.message?.id)},applicationId:"-1",inputType:1,type:1},I=u.findByProps("sendMessage"),P=u.findByProps("sendBotMessage","sendMessage","receiveMessage"),M=async function(n){const t="https://konachan.com/post.json",s=n?"rating:explicit":"rating:safe",e=Math.floor(Math.random()*100);try{const i=await(await fetch(`${t}?tags=${s}&limit=1&page=${e}`)).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}},F=function(){return f.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},j={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},ne={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[j],execute:async function(n,t){const s=new Map(n.map(function(i){return[i.name,i]})).get("nsfw")?.value||!1;if(s&&!t.channel.nsfw)return F(),{type:4};const e=await M(s);return e?(P.sendBotMessage(t.channel.id,`Here's your random image: ${e}`),{type:4}):(P.sendBotMessage(t.channel.id,"No image found. Try again later."),{type:4})},applicationId:"-1",inputType:1,type:1},ae={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:[j],execute:async function(n,t){const s=new Map(n.map(function(c){return[c.name,c]})).get("nsfw")?.value||!1;if(s&&!t.channel.nsfw)return F(),{type:4};const e=await M(s);if(!e){const c=Date.now().toString();return I.sendMessage(t.channel.id,{content:"No image found. Try again later."},void 0,{nonce:c}),{type:4}}const i=Date.now().toString();return I.sendMessage(t.channel.id,{content:e},void 0,{nonce:i}),{type:4}},applicationId:"-1",inputType:1,type:1},{ScrollView:se}=u.findByProps("ScrollView"),{TableRowGroup:m,TableSwitchRow:l,Stack:oe,TableRow:h}=u.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.enabledCommands||(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0}),a.storage.pendingRestart||(a.storage.pendingRestart=!1);function ie(){V.useProxy(a.storage);const[n,t]=o.React.useReducer(function(e){return e+1},0);o.React.useEffect(function(){return function(){a.storage.pendingRestart&&(a.storage.pendingRestart=!1,f.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const s=function(e,i){a.storage.enabledCommands[e]=i,a.storage.pendingRestart=!0,t()};return o.React.createElement(W.View,{style:{flex:1}},o.React.createElement(se,{style:{flex:1},contentContainerStyle:{paddingBottom:38}},o.React.createElement(oe,{spacing:8},o.React.createElement(m,{title:"Facts Commands"},o.React.createElement(l,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:a.storage.factSettings?.sendAsReply??!0,onValueChange:function(e){a.storage.factSettings.sendAsReply=e,t()}}),o.React.createElement(l,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:a.storage.factSettings?.includeCitation??!1,onValueChange:function(e){a.storage.factSettings.includeCitation=e,t()}}),o.React.createElement(l,{label:"/catfact",subLabel:"Get random cat facts",value:a.storage.enabledCommands?.catfact??!0,onValueChange:function(e){return s("catfact",e)}}),o.React.createElement(l,{label:"/dogfact",subLabel:"Get random dog facts",value:a.storage.enabledCommands?.dogfact??!0,onValueChange:function(e){return s("dogfact",e)}}),o.React.createElement(l,{label:"/useless",subLabel:"Get random useless facts",value:a.storage.enabledCommands?.useless??!0,onValueChange:function(e){return s("useless",e)}})),o.React.createElement(m,{title:"List Commands"},o.React.createElement(l,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:a.storage.listSettings?.pluginListAlwaysDetailed??!1,onValueChange:function(e){a.storage.listSettings.pluginListAlwaysDetailed=e,t()}}),o.React.createElement(l,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:a.storage.listSettings?.themeListAlwaysDetailed??!1,onValueChange:function(e){a.storage.listSettings.themeListAlwaysDetailed=e,t()}}),o.React.createElement(l,{label:"/plugin-list",subLabel:"List all installed plugins",value:a.storage.enabledCommands?.pluginList??!0,onValueChange:function(e){return s("pluginList",e)}}),o.React.createElement(l,{label:"/theme-list",subLabel:"List all installed themes",value:a.storage.enabledCommands?.themeList??!0,onValueChange:function(e){return s("themeList",e)}})),o.React.createElement(m,{title:"Image Commands"},o.React.createElement(l,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:a.storage.enabledCommands?.petpet??!0,onValueChange:function(e){return s("petpet",e)}})),o.React.createElement(m,{title:"KonoChan Commands"},o.React.createElement(l,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:a.storage.enabledCommands?.konoself??!0,onValueChange:function(e){return s("konoself",e)}}),o.React.createElement(l,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:a.storage.enabledCommands?.konosend??!0,onValueChange:function(e){return s("konosend",e)}})),o.React.createElement(m,{title:"Credits"},o.React.createElement(h,{label:"Facts Commands",subLabel:"by jdev082"}),o.React.createElement(h,{label:"List Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"PetPet Command",subLabel:"by wolfieeee"}),o.React.createElement(h,{label:"KonoChan Commands",subLabel:"by btmc727 & Rico040"})),o.React.createElement(m,{title:"About"},o.React.createElement(h,{label:"All-In-One Commands",subLabel:"A collection of useful commands"})))))}a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.enabledCommands||(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0});const le={catfact:z,dogfact:H,useless:Y,petpet:te,pluginList:X,themeList:Z,konoself:ne,konosend:ae};let v=[];var ce={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[n,t]of Object.entries(le))a.storage.enabledCommands[n]&&v.push(B.registerCommand(t));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),v.forEach(function(n){return n()}),v=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:ie};return E.default=ce,Object.defineProperty(E,"__esModule",{value:!0}),E})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.storage,vendetta.metro.common.ReactNative); +Source: ${n.source}`),t},z={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(n,t){const s=await _();return c(t.channel.id,R(s),t.message?.id,a.storage)}},H={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(n,t){const s=await U();return c(t.channel.id,R(s),t.message?.id,a.storage)}},Y={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(n,t){const s=await G();return c(t.channel.id,R(s),t.message?.id,a.storage)}},y="https://vd-plugins.github.io/proxy/actuallythesun.github.io/vendetta-plugins/SplitLargeMessages/",d={ENABLED:"\u{1F7E2}",DISABLED:"\u{1F534}",SELECTED:"\u{1F536}",NOT_SELECTED:"\u{1F537}"},b=function(n){return n.map(function(t){return t.name}).join(", ")},p=function(n){return n.join(` +`).trimEnd()},A=function(n){return p(n).length},$=function(){return Object.keys(g.plugins).includes(y)},N=function(){return Object.values(g.plugins).find(function(n){return n.id===y})?.enabled??!1},x=function(){return m.alerts.showConfirmationAlert({title:"Large Message Warning",content:"This list is too long to send! Would you like to install the Split Large Messages plugin?",confirmText:"Install Plugin",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){o.openURL(y)}})},k=function(){return m.alerts.showConfirmationAlert({title:"Plugin Disabled",content:"The Split Large Messages plugin is installed but disabled. Would you like to enable it now?",confirmText:"Enable Plugin",cancelText:"Cancel",confirmColor:"brand",onConfirm:function(){const n=Object.values(g.plugins).find(function(t){return t.id===y});n&&(n.enabled=!0)}})};async function J(n,t){const s=a.storage.listSettings?.pluginListAlwaysDetailed??!1,e=[`**My Plugin List | ${Object.keys(g.plugins).length} Plugins**`,""];for(const i of Object.values(g.plugins)){const{enabled:r,manifest:C,id:D}=i,{name:S,description:w,authors:L}=C;n||s?e.push(`> **Name**: ${S}`,`> **Status**: ${r?d.ENABLED:d.DISABLED}`,`> **Description**: ${w}`,`> **Authors**: ${b(L)}`,`> **[Install!](${D})**`,""):e.push(`> ${r?d.ENABLED:d.DISABLED} **${S}** by ${b(L)}`)}return A(e)>2e3?$()?N()?m.alerts.showConfirmationAlert({title:"Large Message",content:"This list is over 2000 characters. Send anyway?",confirmText:"Send",cancelText:"Cancel",onConfirm:function(){return c(t.channel.id,p(e))}}):k():x():c(t.channel.id,p(e))}async function Q(n,t){const s=a.storage.themeListAlwaysDetailed??!1,e=[`**My Theme List | ${Object.keys(T.themes).length} Themes**`,""],i=Object.values(T.themes);if(i.length)for(const r of i){const{selected:C,data:D,id:S}=r,{name:w,description:L,authors:O}=D;n||s?e.push(`> **Name**: ${w}`,`> **Selected**: ${C?d.SELECTED:d.NOT_SELECTED}`,`> **Description**: ${L}`,`> **Authors**: ${b(O)}`,`> **[Install!](${S})**`,""):e.push(`> ${C?d.SELECTED:d.NOT_SELECTED} **${w}** by ${b(O)}`)}else e.push("Nothing to see here, huh...");return A(e)>2e3?$()?N()?m.alerts.showConfirmationAlert({title:"Large Message",content:"This list is over 2000 characters. Send anyway?",confirmText:"Send",cancelText:"Cancel",onConfirm:function(){return c(t.channel.id,p(e))}}):k():x():c(t.channel.id,p(e))}const X={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:async function(n,t){const s=n.find(function(e){return e.name==="detailed"})?.value??!1;return J(s,t)},applicationId:"-1",inputType:1,type:1},Z={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:async function(n,t){const s=n.find(function(e){return e.name==="detailed"})?.value??!1;return Q(s,t)},applicationId:"-1",inputType:1,type:1},ee=f.findByStoreName("UserStore"),te={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(n,t){const s=(await ee.getUser(n[0].value)).getAvatarURL(512),e=await q(s);return c(t.channel.id,e.url,t.message?.id)},applicationId:"-1",inputType:1,type:1},I=f.findByProps("sendMessage"),M=f.findByProps("sendBotMessage","sendMessage","receiveMessage"),P=async function(n){const t="https://konachan.com/post.json",s=n?"rating:explicit":"rating:safe",e=Math.floor(Math.random()*100);try{const i=await(await fetch(`${t}?tags=${s}&limit=1&page=${e}`)).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}},F=function(){return m.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:null,confirmColor:"brand",isDismissable:!0})},j={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},ne={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[j],execute:async function(n,t){const s=new Map(n.map(function(i){return[i.name,i]})).get("nsfw")?.value||!1;if(s&&!t.channel.nsfw)return F(),{type:4};const e=await P(s);return e?(M.sendBotMessage(t.channel.id,`Here's your random image: ${e}`),{type:4}):(M.sendBotMessage(t.channel.id,"No image found. Try again later."),{type:4})},applicationId:"-1",inputType:1,type:1},ae={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:[j],execute:async function(n,t){const s=new Map(n.map(function(r){return[r.name,r]})).get("nsfw")?.value||!1;if(s&&!t.channel.nsfw)return F(),{type:4};const e=await P(s);if(!e){const r=Date.now().toString();return I.sendMessage(t.channel.id,{content:"No image found. Try again later."},void 0,{nonce:r}),{type:4}}const i=Date.now().toString();return I.sendMessage(t.channel.id,{content:e},void 0,{nonce:i}),{type:4}},applicationId:"-1",inputType:1,type:1},{ScrollView:se}=f.findByProps("ScrollView"),{TableRowGroup:u,TableSwitchRow:l,Stack:oe,TableRow:h}=f.findByProps("TableSwitchRow","TableRowGroup","Stack","TableRow");a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.enabledCommands||(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0}),a.storage.pendingRestart||(a.storage.pendingRestart=!1);function ie(){V.useProxy(a.storage);const[n,t]=o.React.useReducer(function(e){return e+1},0);o.React.useEffect(function(){return function(){a.storage.pendingRestart&&(a.storage.pendingRestart=!1,m.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null}))}},[]);const s=function(e,i){a.storage.enabledCommands[e]=i,a.storage.pendingRestart=!0,t()};return o.React.createElement(W.View,{style:{flex:1}},o.React.createElement(se,{style:{flex:1},contentContainerStyle:{paddingBottom:38}},o.React.createElement(oe,{spacing:8},o.React.createElement(u,{title:"Facts Commands"},o.React.createElement(l,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:a.storage.factSettings?.sendAsReply??!0,onValueChange:function(e){a.storage.factSettings.sendAsReply=e,t()}}),o.React.createElement(l,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:a.storage.factSettings?.includeCitation??!1,onValueChange:function(e){a.storage.factSettings.includeCitation=e,t()}}),o.React.createElement(l,{label:"/catfact",subLabel:"Get random cat facts",value:a.storage.enabledCommands?.catfact??!0,onValueChange:function(e){return s("catfact",e)}}),o.React.createElement(l,{label:"/dogfact",subLabel:"Get random dog facts",value:a.storage.enabledCommands?.dogfact??!0,onValueChange:function(e){return s("dogfact",e)}}),o.React.createElement(l,{label:"/useless",subLabel:"Get random useless facts",value:a.storage.enabledCommands?.useless??!0,onValueChange:function(e){return s("useless",e)}})),o.React.createElement(u,{title:"List Commands"},o.React.createElement(l,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:a.storage.listSettings?.pluginListAlwaysDetailed??!1,onValueChange:function(e){a.storage.listSettings.pluginListAlwaysDetailed=e,t()}}),o.React.createElement(l,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:a.storage.listSettings?.themeListAlwaysDetailed??!1,onValueChange:function(e){a.storage.listSettings.themeListAlwaysDetailed=e,t()}}),o.React.createElement(l,{label:"/plugin-list",subLabel:"List all installed plugins",value:a.storage.enabledCommands?.pluginList??!0,onValueChange:function(e){return s("pluginList",e)}}),o.React.createElement(l,{label:"/theme-list",subLabel:"List all installed themes",value:a.storage.enabledCommands?.themeList??!0,onValueChange:function(e){return s("themeList",e)}})),o.React.createElement(u,{title:"Image Commands"},o.React.createElement(l,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:a.storage.enabledCommands?.petpet??!0,onValueChange:function(e){return s("petpet",e)}})),o.React.createElement(u,{title:"KonoChan Commands"},o.React.createElement(l,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:a.storage.enabledCommands?.konoself??!0,onValueChange:function(e){return s("konoself",e)}}),o.React.createElement(l,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:a.storage.enabledCommands?.konosend??!0,onValueChange:function(e){return s("konosend",e)}})),o.React.createElement(u,{title:"Message Commands"},o.React.createElement(l,{label:"/firstmessage",subLabel:"Get the first message in a channel",value:a.storage.enabledCommands?.firstmessage??!0,onValueChange:function(e){return s("firstmessage",e)}})),o.React.createElement(u,{title:"Credits"},o.React.createElement(h,{label:"Facts Commands",subLabel:"by jdev082"}),o.React.createElement(h,{label:"List Commands",subLabel:"by Kitomanari"}),o.React.createElement(h,{label:"PetPet Command",subLabel:"by wolfieeee"}),o.React.createElement(h,{label:"KonoChan Commands",subLabel:"by btmc727 & Rico040"})),o.React.createElement(u,{title:"About"},o.React.createElement(h,{label:"All-In-One Commands",subLabel:"A collection of useful commands"})))))}a.storage.factSettings||(a.storage.factSettings={sendAsReply:!0,includeCitation:!1}),a.storage.listSettings||(a.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),a.storage.enabledCommands||(a.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0});const le={catfact:z,dogfact:H,useless:Y,petpet:te,pluginList:X,themeList:Z,konoself:ne,konosend:ae};let v=[];var re={onLoad:function(){console.log("[All-In-One Commands] Loading plugin...");for(const[n,t]of Object.entries(le))a.storage.enabledCommands[n]&&v.push(B.registerCommand(t));console.log("[All-In-One Commands] Plugin loaded successfully!")},onUnload:function(){console.log("[All-In-One Commands] Unloading plugin..."),v.forEach(function(n){return n()}),v=[],console.log("[All-In-One Commands] Plugin unloaded successfully!")},settings:ie};return E.default=re,Object.defineProperty(E,"__esModule",{value:!0}),E})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.storage,vendetta.metro.common.ReactNative); diff --git a/Commands/manifest.json b/Commands/manifest.json index fb31515..0a0f603 100644 --- a/Commands/manifest.json +++ b/Commands/manifest.json @@ -1 +1 @@ -{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"Commands","description":"A collection of fixed commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"410a2fa57dc9eaa092156a18d481aa5b51d77b43ee7f2e99dbdf521d948071ee"} \ No newline at end of file +{"authors":[{"name":"kmmiio99o","id":"879393496627306587"}],"main":"index.js","name":"Commands","description":"A collection of fixed commands including facts, petpet, and more.","vendetta":{"icon":"ic_badge_staff","original":"plugins/all-in-one"},"version":"1.0.0","hash":"57e9f63d7140fd1e3f5f56eb76173ee8f7a11d3e1245a8d87f2bce4ea7ad79c0"} \ No newline at end of file