From 269552f9219c40f0c577b4f9f5b6a4aee871b311 Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:46:04 +0545 Subject: [PATCH] chore: update offline mode assets --- environments/core/server/sources/s4d/index.html | 2 +- environments/core/server/sources/s4d/js/app.f03ff491.js | 2 -- .../core/server/sources/s4d/js/app.f03ff491.js.map | 1 - environments/core/server/sources/s4d/js/app.f87207ed.js | 2 ++ .../core/server/sources/s4d/js/app.f87207ed.js.map | 1 + environments/scripts/preload.js | 8 +++++++- 6 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 environments/core/server/sources/s4d/js/app.f03ff491.js delete mode 100644 environments/core/server/sources/s4d/js/app.f03ff491.js.map create mode 100644 environments/core/server/sources/s4d/js/app.f87207ed.js create mode 100644 environments/core/server/sources/s4d/js/app.f87207ed.js.map diff --git a/environments/core/server/sources/s4d/index.html b/environments/core/server/sources/s4d/index.html index 1a000c3..2164a82 100644 --- a/environments/core/server/sources/s4d/index.html +++ b/environments/core/server/sources/s4d/index.html @@ -9,4 +9,4 @@ ::-webkit-scrollbar-corner { background-color: #161719; color: #161719; - }
\ No newline at end of file + }
\ No newline at end of file diff --git a/environments/core/server/sources/s4d/js/app.f03ff491.js b/environments/core/server/sources/s4d/js/app.f03ff491.js deleted file mode 100644 index 0b5f0d8..0000000 --- a/environments/core/server/sources/s4d/js/app.f03ff491.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var a,i,s=t[0],l=t[1],c=t[2],_=0,d=[];_=0}},methods:{getBotImageStyle:function(){return{"background-size":"50px","background-image":"url(".concat(this.botAvatar,")"),width:"50px",height:"50px","min-height":"50px","min-width":"50px","border-radius":"50%"}},getUsernameSpanClass:function(){return"botname ".concat(this.electronApp?"":"unselectable")},getTooltipContent:function(){return this.botStarted?this.$t("run_modal.stop"):this.$t("run_modal.start")},getHandleButtonClass:function(){return{btn:!0,"btn-block":!0,handlebutton:!0,"btn-danger":this.botStarted,"btn-success":!this.botStarted}},start:function(){var e,t,n,a,o,r=this;if("ScratchNative"in window){this.botStarting=!0;var i=this.getWorkspaceCode();null===(e=window.ScratchNative)||void 0===e||e.onMessage("executeCode",(function(e,t){setTimeout((function(){try{t.s4d.tokenInvalid?(console.error(t.s4d.tokenError),r.botStarting=!1,r.botStarted=!1,r.$toast.open({message:r.$t("run_modal.invalid_token"),type:"error",dismissible:!0,duration:1e4,position:"top-right"}),r.$bvModal.hide("run-modal")):t.s4d.client&&!t.s4d.client.readyTimestamp&&(r.botStarting=!1,r.botStarted=!1,r.$toast.open({message:r.$t("run_modal.error"),type:"error",dismissible:!0,duration:1e4,position:"top-right"}),r.$bvModal.hide("run-modal"))}catch(e){}}),5e3)})),null===(t=window.ScratchNative)||void 0===t||t.onMessage("clientReady",(function(e,t){r.botStarting=!1,r.botStarted=!0,r.botRawAvatar=t.displayAvatarURL,r.botTag=t.tag})),null===(n=window.ScratchNative)||void 0===n||n.onMessage("clientDebug",(function(e,t){console.log("[S4D_DEBUG] ".concat(t))})),null===(a=window.ScratchNative)||void 0===a||a.onMessage("clientShardDisconnect",(function(){r.botStarted=!1,r.s4d=null})),null===(o=window.ScratchNative)||void 0===o||o.sendMessage("executeCode",i)}},stop:function(){var e;null===(e=window.ScratchNative)||void 0===e||e.sendMessage("destroyClient"),this.botRawAvatar=null,this.botTag=null},handle:function(){this.botStarted?this.stop():this.start()},onHidden:function(){this.$refs.button.focus()}}},w=U,V=(n("39f7"),Object(R["a"])(w,L,D,!1,null,null,null)),x=V.exports,J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-nav-item-dropdown",{attrs:{id:"v-step-0",text:e.$t("examples.title"),right:""}},[n("b-dropdown-item",{on:{click:function(t){return e.load("ping-pong")}}},[e._v(e._s(e.$t("examples.ping_pong")))]),n("b-dropdown-item",{on:{click:function(t){return e.load("command-parsing")}}},[e._v(e._s(e.$t("examples.command_parsing")))]),n("b-dropdown-item",{on:{click:function(t){return e.load("leveling")}}},[e._v(e._s(e.$t("examples.leveling")))])],1)},P=[],Y='\n \n \n \n \n Your bot token\n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !ping\n \n \n \n \n \n \n \n \n pong!\n \n \n \n \n \n \n \n \n',K='\n \n \n arguments\n command\n \n \n \n \n Your bot token\n \n \n \n \n \n \n arguments\n \n \n \n SPLIT\n \n \n \n \n \n \n \n \n \n \n \n \n command\n \n \n \n GET_REMOVE\n FROM_START\n \n \n arguments\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n EQ\n \n \n command\n \n \n \n \n !say\n \n \n \n \n \n \n \n \n You have written the following content after !say:\n \n \n \n \n \n \n Salut!\n \n \n \n JOIN\n \n \n arguments\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',j='\n\n \n member_xp\n member_level\n \n \n \n \n Your bot token\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n member_xp\n \n \n \n \n hello\n \n \n \n \n \n xp-\n \n \n \n \n ID\n \n \n \n \n \n \n \n \n member_level\n \n \n \n \n hello\n \n \n \n \n \n level-\n \n \n \n \n ID\n \n \n \n \n \n \n \n \n \n \n \n \n \n member_xp\n \n \n \n \n \n \n member_xp\n \n \n 0\n \n \n \n \n \n \n \n \n member_level\n \n \n \n \n \n \n member_level\n \n \n 0\n \n \n \n \n \n \n \n \n hello\n \n \n \n \n \n xp-\n \n \n \n \n ID\n \n \n \n \n \n \n world\n \n \n ADD\n \n \n 1\n \n \n member_xp\n \n \n \n \n 1\n \n \n \n \n \n \n member_xp\n \n \n ADD\n \n \n 1\n \n \n member_xp\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n GT\n \n \n member_xp\n \n \n \n \n 100\n \n \n \n \n \n \n \n \n hello\n \n \n \n \n \n level-\n \n \n \n \n ID\n \n \n \n \n \n \n world\n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n member_level\n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n Congratulations, \n \n \n \n \n \n \n \n you jumped to level \n \n \n \n \n member_level\n \n \n \n \n !!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !level\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n \n \n \n , you are currently level: \n \n \n \n \n member_level\n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !xp\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n \n \n \n , you need \n \n \n \n \n MINUS\n \n \n 100\n \n \n \n \n 100\n \n \n member_xp\n \n \n \n \n \n \n to jump to level \n \n \n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',H={"ping-pong":Y,"command-parsing":K,leveling:j},F={name:"editmenu",computed:{},methods:{load:function(e){var t=this;this.$swal({title:this.$t("examples.confirm.title"),text:this.$t("examples.confirm.text"),buttons:{cancel:this.$t("examples.confirm.cancel"),no:{text:this.$t("examples.confirm.no"),value:!1,className:"red-button"},yes:{text:this.$t("examples.confirm.yes"),value:!0}},closeOnClickOutside:!1}).then((function(n){if("object"!==Object(G["a"])(n)){n&&t.$store.state.workspace.getAllBlocks().forEach((function(e){return e.dispose()}));var a=H[e];c.a.Xml.domToWorkspace(c.a.Xml.textToDom(a),t.$store.state.workspace),setTimeout((function(){t.$toast.open({message:t.$t("examples.loaded",{example:e}),type:"success",dismissible:!0,duration:1e4})}),200)}}))}}},X=F,W=Object(R["a"])(X,J,P,!1,null,null,null),$=W.exports,z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:"code-modal",title:e.$t("code_modal.title"),"ok-only":""}},[n("textarea",{attrs:{disabled:"",id:"code"},domProps:{value:e.content}})])},q=[],Q=n("e552"),Z=n.n(Q),ee={name:"editmenu",computed:{content:function(){return Z.a.js(this.getWorkspaceCode(),{indent_size:4,space_in_empty_paren:!0})}}},te=ee,ne=(n("627b"),Object(R["a"])(te,z,q,!1,null,null,null)),ae=ne.exports,oe={name:"navbar",components:{FileMenu:T,EditMenu:f,LanguageMenu:k,RunModal:x,ExamplesMenu:$,CodeModal:ae},computed:{configurationValidated:function(){return this.$store.state.workspace&&this.$store.state.workspace.getAllBlocks().some((function(e){return"s4d_login"===e.type}))&&this.$store.state.workspace.getAllBlocks().every((function(e){return!e.disabled&&!e.warning}))}},mounted:function(){document.getElementById("docName").addEventListener("input",(function(){document.title="Scratch For Discord - ".concat(document.querySelector("#docName").textContent)}),!1);var e=document.querySelector("#docName");e.spellcheck=!1,e.focus(),e.blur()},methods:{exportToCode:function(){var e=this,t=document.createElement("div");t.innerHTML="
".concat(this.$t("download.content.title"),"
"),this.$swal({title:this.$t("download.title"),content:t,buttons:{cancel:this.$t("download.cancel"),confirm:this.$t("download.confirm")}}).then((function(t){if(t){var n=new u.a,a=c.a.Xml.domToPrettyText(c.a.Xml.workspaceToDom(e.$store.state.workspace)),o="".concat(encodeURIComponent(document.querySelector("#docName").textContent).replace(/%20/g," "),".zip");n.file("blocks.xml",a);var r=e.getWorkspaceCode();n.file("bot.js",r),n.file(".replit",'run = "node bot.js"'),n.file("package.json",JSON.stringify({name:"scratch-for-discord-bot",version:"1.0.0",main:"bot.js",scripts:{start:"node ."},dependencies:{"discord.js":"^13.1.0","easy-json-database":"^1.5.0"}})),n.generateAsync({type:"blob"}).then((function(e){var t=document.createElement("a");t.style="display: none",document.body.appendChild(t);var n=window.URL.createObjectURL(e);t.href=n,t.download=o,t.click(),window.URL.revokeObjectURL(n),document.body.removeChild(t)}))}}))}}},re=oe,ie=Object(R["a"])(re,E,_,!1,null,null,null),se=ie.exports,le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{ref:"blocklyDiv",staticClass:"blocklyDiv",attrs:{id:"blocklyDiv"}}),n("xml",{ref:"blocklyToolbox",staticStyle:{display:"none"}},[e._t("default")],2)],1)},ce=[],Ee=n("5530"),_e=n("b85c"),de=(n("a15b"),n("2ca0"),n("caad"),n("2532"),n("4de4"),{});function ue(e,t){de[e]=t}var me=function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},pe=function(e){var t,n=e.getAllBlocks(!1),a=Object(_e["a"])(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;if(o){de[o.type]||(de[o.type]=[]);var r,i=[],s=0,l=Object(_e["a"])(de[o.type]);try{for(l.s();!(r=l.n()).done;){var E=r.value;ve(o,E)&&(Se(o,n,E)||(E.message&&(c.a.Msg[E.message]?i.push(c.a.Msg[E.message]):(window.alert("KEY NOT FOUND: "+E.message),i.push(me(E.message)))),s++))}}catch(_){l.e(_)}finally{l.f()}s<1?o.setWarningText(null):i.length>0&&o.setWarningText(i.join("\n"))}}}catch(_){a.e(_)}finally{a.f()}};function Se(e,t,n){var a=!1,o=n.type;switch("custom"!==o&&o.startsWith("!")&&(o=o.substring(1),a=!0),o){case"toplevelparent":return n.types.includes(be(e).type)!==a;case"blockexists":return t.filter((function(e){return n.types.includes(e.type)&&!e.disabled})).length>0!==a;case"parent":return n.types.includes(e.getParent().type)!==a;case"hasparent":return Re(e,n.types)!==a;case"notempty":var r,i=Object(_e["a"])(n.types);try{for(i.s();!(r=i.n()).done;){var s=r.value;try{if(!e.getInput(s).connection.targetBlock())return!1}catch(l){console.log(e.type)}}}catch(c){i.e(c)}finally{i.f()}return!0;default:return!0}}function ve(e,t){switch(t.type){case"toplevelparent":case"!toplevelparent":return be(e)&&!be(e).disabled;case"blockexists":case"!blockexists":return!0;case"parent":case"!parent":return e.getParent()&&!e.getParent().disabled;case"hasparent":case"custom":case"notempty":return!0;default:return!1}}function Re(e,t){var n=!1;while(e.getParent())t.includes(e.getParent().type)&&(n=!0),e=e.getParent();return n}function be(e){return e?e.getParent()?be(e.getParent()):e:null}var Te=function(e){return'\n \n'.replace(/{{\s([A-z]{3,})\s}}/g,(function(t){return e.Msg[t.replace("{{ ","").replace(" }}","")]}))},Ae={name:"BlocklyComponent",props:["options"],data:function(){return{toastLogin:!1,workspace:this.$store.state.workspace}},mounted:function(){var e=this;this.setLanguage(this.$store.state.blocklyLocale);var t=this.$props.options||{};t.toolbox=this.$refs["blocklyToolbox"];var n=c.a.inject(this.$refs["blocklyDiv"],Object(Ee["a"])(Object(Ee["a"])({},t),{toolbox:Te(c.a)}));this.$store.commit("setWorkspace",{workspace:n}),n.addChangeListener(c.a.Events.disableOrphans),this.$nextTick((function(){window.setInterval((function(){pe(e.$store.state.workspace);var t=e.$store.state.workspace.getAllBlocks().some((function(e){return"s4d_login"===e.type}));t?e.toastLogin&&(e.toastLogin=!1,e.$toast.clear()):e.toastLogin||(e.toastLogin=!0,e.$toast.open({message:e.$t("warnings.login_block"),type:"warning",dismissible:!1,duration:1e9}))}),100)}))}},Ne=Ae,Me=(n("7ec4"),Object(R["a"])(Ne,le,ce,!1,null,"180ad633",null)),Oe=Me.exports,ge=n("b7fd"),fe=n.n(ge),Ie="s4d_bot_ping",he={message0:"%{BKY_BOT_PING}",colour:"#5b67a5",tooltip:"",output:"Number",helpUrl:""};ge["Blocks"][Ie]={init:function(){this.jsonInit(he)}},ge["JavaScript"][Ie]=function(){var e=["s4d.client.ws.ping",ge["JavaScript"].ORDER_NONE];return e};var ye="s4d_bot_server_count",Be={message0:"%{BKY_BOT_SERVER_COUNT}",colour:"#5b67a5",tooltip:"",output:"Number",helpUrl:""};ge["Blocks"][ye]={init:function(){this.jsonInit(Be)}},ge["JavaScript"][ye]=function(){var e=["s4d.client.guilds.cache.size",ge["JavaScript"].ORDER_NONE];return e};var Ce="s4d_login",ke={type:"block_type",message0:"%{BKY_LOGIN}",args0:[{type:"input_value",name:"TOKEN",check:"String"}],colour:"#F46580",tooltip:"%{BKY_LOGIN_TOOLTIP}",helpUrl:""};ge["Blocks"][Ce]={init:function(){this.jsonInit(ke)}},ge["JavaScript"][Ce]=function(e){var t=ge["JavaScript"].valueToCode(e,"TOKEN",ge["JavaScript"].ORDER_ATOMIC),n="await s4d.client.login(".concat(t,").catch((e) => { s4d.tokenInvalid = true; s4d.tokenError = e; });\n");return n};var Le="s4d_on_connected",De={message0:"%{BKY_ON_CONNECTED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}],tooltip:"%{BKY_ON_CONNECTED_TOOLTIP}"};fe.a.Blocks[Le]={init:function(){this.jsonInit(De)}},fe.a.JavaScript[Le]=function(e){var t=fe.a.JavaScript.statementToCode(e,"STATEMENTS"),n="s4d.client.on('ready', async () => {\n".concat(t,"\n});\n");return n};var Ge="s4d_set_bot_game",Ue={message0:"%{BKY_SET_BOT_GAME}",args0:[{type:"input_value",name:"GAME",check:["Number","String"]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][Ge]={init:function(){this.jsonInit(Ue)}},ge["JavaScript"][Ge]=function(e){var t=ge["JavaScript"].valueToCode(e,"GAME",ge["JavaScript"].ORDER_ATOMIC),n="s4d.client.user.setActivity(String(".concat(t,"));\n");return n},ue(Ge,[{type:"notempty",message:"RES_MISSING_GAME",types:["GAME"]}]);var we="s4d_add_reaction",Ve={message0:"%{BKY_ADD_REACTION}",args0:[{type:"input_value",name:"REACTION",check:"String"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[we]={init:function(){this.jsonInit(Ve)}},fe.a.JavaScript[we]=function(e){var t=fe.a.JavaScript.valueToCode(e,"REACTION",fe.a.JavaScript.ORDER_ATOMIC),n="s4dmessage.react(".concat(t,");");return n},ue(we,[{type:"notempty",message:"RES_ADD_REACTION_MISSING_REACTION",types:["REACTION"]}]);var xe="s4d_delete",Je={message0:"%{BKY_DELETE_MESSAGE}",colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][xe]={init:function(){this.jsonInit(Je)}},ge["JavaScript"][xe]=function(){var e="s4dmessage.delete();\n";return e},ue(xe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Pe="s4d_mentioned_member",Ye={message0:"%{BKY_MENTIONED_MEMBER}",colour:"#187795",tooltip:"",output:"Member",helpUrl:""};fe.a.Blocks[Pe]={init:function(){this.jsonInit(Ye)}},fe.a.JavaScript[Pe]=function(){var e=["s4dmessage.mentions.members.first()",fe.a.JavaScript.ORDER_NONE];return e},ue(Pe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Ke="s4d_message_id",je={message0:"%{BKY_MESSAGE_ID}",colour:"#5BA58C",tooltip:"",output:"String",helpUrl:""};ge["Blocks"][Ke]={init:function(){this.jsonInit(je)}},ge["JavaScript"][Ke]=function(){var e=["s4dmessage.id",ge["JavaScript"].ORDER_NONE];return e},ue(Ke,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var He="s4d_message_author",Fe={message0:"%{BKY_MESSAGE_AUTHOR}",colour:"#187795",output:"Member",tooltip:"",helpUrl:""};fe.a.Blocks[He]={init:function(){this.jsonInit(Fe)}},fe.a.JavaScript[He]=function(){var e=["s4dmessage.member",fe.a.JavaScript.ORDER_NONE];return e},ue(He,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Xe="s4d_message_author_raw",We={message0:"%{BKY_MESSAGE_AUTHOR_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][Xe]={init:function(){this.jsonInit(We)}},l["JavaScript"][Xe]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4dmessage.author.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4dmessage.author.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["(s4dmessage.member || await s4dmessage.guild.members.fetch(s4dmessage.author.id)).nickname",l["JavaScript"].ORDER_NONE];return o}},ue(Xe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var $e="s4d_message_channel",ze={message0:"%{BKY_MESSAGE_CHANNEL}",colour:"#a55b80",output:"Channel",tooltip:"",helpUrl:""};fe.a.Blocks[$e]={init:function(){this.jsonInit(ze)}},fe.a.JavaScript[$e]=function(){var e=["s4dmessage.channel",fe.a.JavaScript.ORDER_NONE];return e},ue($e,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var qe="s4d_message_channel_raw",Qe={message0:"%{BKY_MESSAGE_CHANNEL_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};fe.a.Blocks[qe]={init:function(){this.jsonInit(Qe)}},fe.a.JavaScript[qe]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["(s4dmessage.channel || {}).id",fe.a.JavaScript.ORDER_NONE];return n}if("NAME"===t){var a=["(s4dmessage.channel || {}).name",fe.a.JavaScript.ORDER_NONE];return a}},ue(qe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Ze="s4d_message_content",et={message0:"%{BKY_MESSAGE_CONTENT}",colour:"#5BA58C",tooltip:"",output:"String",helpUrl:""};ge["Blocks"][Ze]={init:function(){this.jsonInit(et)}},ge["JavaScript"][Ze]=function(){var e=["s4dmessage.content",ge["JavaScript"].ORDER_NONE];return e},ue(Ze,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var tt=["MESSAGE","COLOR","TITLE","IMAGE","FOOTER","THUMBNAIL"],nt=["String","Colour","String","String","String","String"],at={message0:"%{BKY_MESSAGE_EMBED}",mutator:"s4d_message_embed_mutator",output:"MessageEmbed",helpUrl:"",tooltip:"",colour:"#40BF4A"};fe.a.Blocks["s4d_message_embed"]={init:function(){this.jsonInit(at)}},fe.a.Blocks["s4d_message_embed_mutator"]={init:function(){this.setColour("#CECDCE"),this.setTooltip(""),this.setHelpUrl("")}};var ot={inputs_:[!0,!1,!1,!1,!1,!1],mutationToDom:function(){if(!this.inputs_)return null;for(var e=document.createElement("mutation"),t=0;t {\n".concat(t,"\n});\n");return n};var _t="s4d_reply",dt={message0:"%{BKY_REPLY}",args0:[{type:"input_value",name:"CONTENT",check:["Number","String","MessageEmbed"]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][_t]={init:function(){this.jsonInit(dt)}},ge["JavaScript"][_t]=function(e){var t=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var n=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===n||!n&&"object"===Object(G["a"])(n)){var a="s4dmessage.channel.send(".concat(t,");\n");return a}var o="s4dmessage.channel.send(String(".concat(t,"));\n");return o}var r="s4dmessage.channel.send(String(".concat(t,"));\n");return r},ue(_t,[{type:"notempty",message:"RES_MISSING_CONTENT",types:["CONTENT"]},{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var ut="s4d_purge",mt={message0:"%{BKY_PURGE}",args0:[{type:"input_value",name:"CHANNEL",check:"Channel"},{type:"input_value",name:"AMOUNT",check:"Number"}],previousStatement:null,nextStatement:null,inputsInline:!0,colour:"#1a75ff",tooltip:"",helpUrl:""};fe.a.Blocks[ut]={init:function(){this.jsonInit(mt)}},fe.a.JavaScript[ut]=function(e){var t=fe.a.JavaScript.valueToCode(e,"CHANNEL",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"AMOUNT",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".bulkDelete((").concat(n,"|1))");return a},ue(ut,[{type:"notempty",message:"RES_PURGE_CHANNEL",types:["CHANNEL"]},{type:"notempty",message:"RES_PURGE_AMOUNT",types:["AMOUNT"]}]);var pt="s4d_joining_guild",St={message0:"%{BKY_JOINING_GUILD}",colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};fe.a.Blocks[pt]={init:function(){this.jsonInit(St)}},fe.a.JavaScript[pt]=function(){var e=["s4d.joiningMember.guild",fe.a.JavaScript.ORDER_NONE];return e},ue(pt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var vt="s4d_joining_guild_raw",Rt={message0:"%{BKY_JOINING_GUILD_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][vt]={init:function(){this.jsonInit(Rt)}},l["JavaScript"][vt]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.joiningMember.guild.id",l["JavaScript"].ORDER_NONE];return n}if("NAME"===t){var a=["s4d.joiningMember.guild.name",l["JavaScript"].ORDER_NONE];return a}},ue(vt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var bt="s4d_joining_member",Tt={message0:"%{BKY_JOINING_MEMBER}",colour:"#187795",output:"Member",tooltip:"",helpUrl:""};fe.a.Blocks[bt]={init:function(){this.jsonInit(Tt)}},fe.a.JavaScript[bt]=function(){var e=["s4d.joiningMember",fe.a.JavaScript.ORDER_NONE];return e},ue(bt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var At="s4d_joining_member_raw",Nt={message0:"%{BKY_JOINING_MEMBER_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][At]={init:function(){this.jsonInit(Nt)}},l["JavaScript"][At]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.joiningMember.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4d.joiningMember.user.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["s4d.joiningMember.nickname",l["JavaScript"].ORDER_NONE];return o}},ue(At,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var Mt="s4d_on_member_join",Ot={message0:"%{BKY_ON_MEMBER_JOIN} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};ge["Blocks"][Mt]={init:function(){this.jsonInit(Ot)}},ge["JavaScript"][Mt]=function(e){var t=ge["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('guildMemberAdd', async (param1) => {\ns4d.joiningMember = param1;\n".concat(t,"s4d.joiningMember = null\n});\n");return n};var gt="s4d_leaving_guild",ft={message0:"%{BKY_LEAVING_GUILD}",colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};fe.a.Blocks[gt]={init:function(){this.jsonInit(ft)}},fe.a.JavaScript[gt]=function(){var e=["s4d.leavingMember.guild",fe.a.JavaScript.ORDER_NONE];return e},ue(gt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var It="s4d_leaving_guild_raw",ht={message0:"%{BKY_LEAVING_GUILD_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][It]={init:function(){this.jsonInit(ht)}},l["JavaScript"][It]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.leavingMember.guild.id",l["JavaScript"].ORDER_NONE];return n}if("NAME"===t){var a=["s4d.leavingMember.guild.name",l["JavaScript"].ORDER_NONE];return a}},ue(It,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var yt="s4d_leaving_member_raw",Bt={message0:"%{BKY_LEAVING_MEMBER_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][yt]={init:function(){this.jsonInit(Bt)}},l["JavaScript"][yt]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.leavingMember.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4d.leavingMember.user.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["s4d.leavingMember.nickname",l["JavaScript"].ORDER_NONE];return o}},ue(yt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var Ct="s4d_on_member_leave",kt={message0:"%{BKY_ON_MEMBER_LEAVE} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};ge["Blocks"][Ct]={init:function(){this.jsonInit(kt)}},ge["JavaScript"][Ct]=function(e){var t=ge["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('guildMemberRemove', async (param1) => {\ns4d.leavingMember = param1;\n".concat(t,"s4d.leavingMember = null\n});\n");return n};var Lt="s4d_on_react_added",Dt={message0:"%{BKY_ON_REACT_ADDED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};l["Blocks"][Lt]={init:function(){this.jsonInit(Dt)}},l["JavaScript"][Lt]=function(e){var t=l["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('MESSAGE_REACTION_ADD', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\n".concat(t,"\n});\n");return n};var Gt="s4d_on_react_removed",Ut={message0:"%{BKY_ON_REACT_REMOVED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};l["Blocks"][Gt]={init:function(){this.jsonInit(Ut)}},l["JavaScript"][Gt]=function(e){var t=l["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('MESSAGE_REACTION_REMOVED', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\n".concat(t,"\n});\n");return n};var wt="s4d_react_emoji",Vt={message0:"%{BKY_REACT_EMOJI}",colour:"#5BA58C",output:"String"};l["Blocks"][wt]={init:function(){this.jsonInit(Vt)}},l["JavaScript"][wt]=function(){var e=["rEmoji",l["JavaScript"].ORDER_NONE];return e},ue(wt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var xt="s4d_react_member",Jt={message0:"%{BKY_REACT_MEMBER}",colour:"#187795",output:"Member"};l["Blocks"][xt]={init:function(){this.jsonInit(Jt)}},l["JavaScript"][xt]=function(){var e=["rMember",l["JavaScript"].ORDER_NONE];return e},ue(xt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var Pt="s4d_react_message_id",Yt={message0:"%{BKY_REACT_MESSAGE_ID}",colour:"#5BA58C",output:"String"};l["Blocks"][Pt]={init:function(){this.jsonInit(Yt)}},l["JavaScript"][Pt]=function(){var e=["rMessage.id",l["JavaScript"].ORDER_NONE];return e},ue(Pt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var Kt="s4d_create_channel",jt={message0:"%{BKY_CREATE_CHANNEL}",args0:[{type:"input_value",name:"NAME",check:["String","Number"]},{type:"input_value",name:"SERVER",check:["Server"]},{type:"field_dropdown",name:"TYPE",options:[["%{BKY_TEXT}","TEXT"],["%{BKY_VOICE}","VOICE"],["%{BKY_CATEGORY}","CATEGORY"]]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,inputsInline:!1,tooltip:"",helpUrl:""};ge["Blocks"][Kt]={init:function(){this.jsonInit(jt)}},ge["JavaScript"][Kt]=function(e){var t=e.getFieldValue("TYPE"),n=ge["JavaScript"].valueToCode(e,"NAME",ge["JavaScript"].ORDER_ATOMIC),a=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC),o="".concat(a,".channels.create(").concat(n,", {\n type: '").concat(t.toLowerCase(),"'\n });\n");return o};var Ht="s4d_get_channel",Ft={message0:"%{BKY_GET_CHANNEL}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#a55b80",output:"Channel",tooltip:"",helpUrl:""};ge["Blocks"][Ht]={init:function(){this.jsonInit(Ft)}},ge["JavaScript"][Ht]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE");return"NAME"===n?["s4d.client.channels.cache.find((channel) => channel.name === ".concat(t,")"),ge["JavaScript"].ORDER_ATOMIC]:["s4d.client.channels.cache.get(".concat(t,")"),ge["JavaScript"].ORDER_ATOMIC]},ue(Ht,[{type:"notempty",message:"RES_MISSING_CHANNEL_VALUE",types:["VALUE"]}]);var Xt="s4d_send_channel",Wt={message0:"%{BKY_SEND_CHANNEL}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"CHANNEL",check:"Channel"}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][Xt]={init:function(){this.jsonInit(Wt)}},ge["JavaScript"][Xt]=function(e){var t=ge["JavaScript"].valueToCode(e,"CHANNEL",ge["JavaScript"].ORDER_ATOMIC),n=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var a=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===a||!a&&"object"===Object(G["a"])(a)){var o="".concat(t,".send(").concat(n,");\n");return o}var r="".concat(t,".send(String(").concat(n,"));\n");return r}var i="".concat(t,".send(String(").concat(n,"));\n");return i},ue(Xt,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_CHANNEL_CHANNEL",types:["CHANNEL"]}]);var $t="s4d_send_wait_reply",zt={message0:"%{BKY_SEND_WAIT_REPLY}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"CHANNEL",check:"Channel"},{type:"input_value",name:"MEMBER",check:"Member"},{type:"input_value",name:"TIME",check:"Number"},{type:"input_statement",name:"THEN"},{type:"input_statement",name:"CATCH"}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][$t]={init:function(){this.jsonInit(zt)}},ge["JavaScript"][$t]=function(e){var t=ge["JavaScript"].valueToCode(e,"CHANNEL",ge["JavaScript"].ORDER_ATOMIC),n=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC),a=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC),o=ge["JavaScript"].valueToCode(e,"TIME",ge["JavaScript"].ORDER_ATOMIC)||5,r=ge["JavaScript"].statementToCode(e,"THEN"),i=ge["JavaScript"].statementToCode(e,"CATCH"),s="";if(e.getInput("CONTENT").connection.targetConnection){var l=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;s="MessageEmbed"===l||!l&&"object"===Object(G["a"])(l)?"".concat(t,".send(").concat(n,");\n"):"".concat(t,".send(String(").concat(n,"));\n")}else s="".concat(t,".send(String(").concat(n,"));\n");return s+="".concat(t,".awaitMessages((m) => m.author.id === ").concat(a,".id, { time: (").concat(o,"*60*1000), max: 1 }).then(async (collected) => { s4d.reply = collected.first().content; \n ").concat(r," \n s4d.reply = null; }).catch(async (e) => { console.error(e); ").concat(i," });"),s},ue($t,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_CHANNEL_CHANNEL",types:["CHANNEL"]}]);var qt="s4d_send_wait_reply_value",Qt={message0:"%{BKY_SEND_WAIT_REPLY_VALUE}",colour:"#5BA58C",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][qt]={init:function(){this.jsonInit(Qt)}},ge["JavaScript"][qt]=function(){var e=["s4d.reply",ge["JavaScript"].ORDER_NONE];return e},ue(qt,[{type:"hasparent",message:"RES_SEND_WAIT_REPLY_VALUE_PARENT",types:["s4d_send_wait_reply"]}]);var Zt="s4d_boost_level",en={message0:"%{BKY_SERVER_BOOST_LEVEL}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Number",tooltip:"",helpUrl:""};ge["Blocks"][Zt]={init:function(){this.jsonInit(en)}},ge["JavaScript"][Zt]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".premiumTier"),ge["JavaScript"].ORDER_NONE]},ue(Zt,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var tn="s4d_get_server",nn={message0:"%{BKY_GET_SERVER}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};ge["Blocks"][tn]={init:function(){this.jsonInit(nn)}},ge["JavaScript"][tn]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE");return"NAME"===n?["s4d.client.guilds.cache.find((guild) => guild.name === ".concat(t,")"),ge["JavaScript"].ORDER_NONE]:["s4d.client.guilds.cache.get(".concat(t,")"),ge["JavaScript"].ORDER_NONE]},ue(tn,[{type:"notempty",message:"RES_GET_SERVER_VALUE",types:["VALUE"]}]);var an="s4d_icon_url",on={message0:"%{BKY_ICON_URL}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][an]={init:function(){this.jsonInit(on)}},ge["JavaScript"][an]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".iconURL({ dynamic: true })"),ge["JavaScript"].ORDER_NONE]},ue(an,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var rn="s4d_member_count",sn={message0:"%{BKY_MEMBER_COUNT}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Number",tooltip:"",helpUrl:""};ge["Blocks"][rn]={init:function(){this.jsonInit(sn)}},ge["JavaScript"][rn]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".memberCount"),ge["JavaScript"].ORDER_NONE]},ue(rn,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var ln="s4d_server_name",cn={message0:"%{BKY_SERVER_NAME}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][ln]={init:function(){this.jsonInit(cn)}},ge["JavaScript"][ln]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".name"),ge["JavaScript"].ORDER_NONE]},ue(ln,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var En="s4d_server_owner",_n={message0:"%{BKY_SERVER_OWNER}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Member",tooltip:"",helpUrl:""};ge["Blocks"][En]={init:function(){this.jsonInit(_n)}},ge["JavaScript"][En]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".owner || await ").concat(t,".members.fetch(").concat(t,".ownerID)"),ge["JavaScript"].ORDER_NONE]},ue(En,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var dn="s4d_set_server_name",un={message0:"%{BKY_SET_SERVER_NAME}",args0:[{type:"input_value",name:"SERVER",check:"Server"},{type:"input_value",name:"NEW_NICKNAME",check:["Number","String"]}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[dn]={init:function(){this.jsonInit(un)}},fe.a.JavaScript[dn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"SERVER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"NEW_NICKNAME",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".setName(").concat(n,");\n");return a},ue(dn,[{type:"notempty",message:"RES_SET_SERVER_NAME_SERVER",types:["SERVER"]},{type:"notempty",message:"RES_SET_SERVER_NAME_NEW_NICKNAME",types:["NEW_NICKNAME"]}]);var mn="s4d_add_role",pn={message0:"%{BKY_ADD_ROLE}",args0:[{type:"input_value",name:"ROLE",check:["String","Role"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[mn]={init:function(){this.jsonInit(pn)}},fe.a.JavaScript[mn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"ROLE",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("ROLE").connection.targetConnection){var a=e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("String"===a){var o="".concat(n,".roles.add(").concat(n,".guild.roles.cache.find((role) => role.id === ").concat(t," || role.name === ").concat(t," || '@'+role.name === ").concat(t,"));\n");return o}var r="".concat(n,".roles.add(").concat(t,");\n");return r}var i="".concat(n,".roles.add(").concat(t,");\n");return i},ue(mn,[{type:"notempty",message:"RES_ADD_ROLE_MISSING_ROLE",types:["ROLE"]},{type:"notempty",message:"RES_ADD_ROLE_MISSING_MEMBER",types:["MEMBER"]}]);var Sn=["GET_ROLE_SERVER"],vn=["Server"],Rn="s4d_get_role",bn={message0:"%{BKY_GET_ROLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#2EB66B",output:"Role",mutator:"s4d_get_role_mutator",tooltip:"",helpUrl:""};ge["Blocks"][Rn]={init:function(){this.jsonInit(bn)}},ge["Blocks"]["s4d_get_role_mutator"]={init:function(){this.setColour("#CECDCE"),this.setTooltip(""),this.setHelpUrl("")}};var Tn={inputs_:[!1],mutationToDom:function(){if(!this.inputs_)return null;for(var e=document.createElement("mutation"),t=0;t role.name === ").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).find((role) => role.name === ".concat(t,")"),ge["JavaScript"].ORDER_NONE]:a?["".concat(a,".roles.get(").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).get(".concat(t,")"),ge["JavaScript"].ORDER_NONE]},ue(Rn,[{type:"notempty",message:"RES_GET_ROLE_VALUE",types:["VALUE"]}]);var An="s4d_remove_role",Nn={message0:"%{BKY_REMOVE_ROLE}",args0:[{type:"input_value",name:"ROLE",check:["String","Role"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[An]={init:function(){this.jsonInit(Nn)}},fe.a.JavaScript[An]=function(e){var t=fe.a.JavaScript.valueToCode(e,"ROLE",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("ROLE").connection.targetConnection){var a=e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("String"===a){var o="".concat(n,".roles.remove(").concat(n,".guild.roles.cache.find((role) => role.id === ").concat(t," || role.name === ").concat(t," || '@'+role.name === ").concat(t,"));\n");return o}var r="".concat(n,".roles.remove(").concat(t,");\n");return r}var i="".concat(n,".roles.remove(").concat(t,");\n");return i},ue(An,[{type:"notempty",message:"RES_REMOVE_ROLE_MISSING_ROLE",types:["ROLE"]},{type:"notempty",message:"RES_REMOVE_ROLE_MISSING_MEMBER",types:["MEMBER"]}]);var Mn="s4d_ban_member",On={message0:"%{BKY_BAN_MEMBER}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Mn]={init:function(){this.jsonInit(On)}},fe.a.JavaScript[Mn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n="".concat(t,".ban();\n");return n},ue(Mn,[{type:"notempty",message:"RES_BAN_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var gn="s4d_get_member",fn={message0:"%{BKY_GET_MEMBER}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["id","ID"]]},{type:"input_value",name:"SERVER",check:"Server"}],colour:"#187795",output:"Member",tooltip:"",helpUrl:""};ge["Blocks"][gn]={init:function(){this.jsonInit(fn)}},ge["JavaScript"][gn]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE"),a=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return"USERNAME"===n?["".concat(a,".members.cache.find((m) => m.user.username === ").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["(".concat(a,".members.cache.get(").concat(t,") || await ").concat(a,".members.fetch(").concat(t,"))"),ge["JavaScript"].ORDER_NONE]},ue(gn,[{type:"notempty",message:"RES_GET_MEMBER_VALUE",types:["VALUE"]},{type:"notempty",message:"RES_GET_MEMBER_SERVER",types:["SERVER"]}]);var In="s4d_kick_member",hn={message0:"%{BKY_KICK_MEMBER}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[In]={init:function(){this.jsonInit(hn)}},fe.a.JavaScript[In]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n="".concat(t,".kick();\n");return n},ue(In,[{type:"notempty",message:"RES_KICK_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var yn="s4d_member_discriminator",Bn={message0:"%{BKY_MEMBER_DISCRIMINATOR}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][yn]={init:function(){this.jsonInit(Bn)}},ge["JavaScript"][yn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.discriminator"),ge["JavaScript"].ORDER_NONE]},ue(yn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Cn="s4d_member_has_permission",kn={message0:"%{BKY_MEMBER_HAS_PERMISSION}",args0:[{type:"input_value",name:"MEMBER",check:"Member"},{type:"field_dropdown",name:"PERMISSION",options:[["%{BKY_PERM_CREATE_INSTANT_INVITE}","CREATE_INSTANT_INVITE"],["%{BKY_PERM_KICK_MEMBERS}","KICK_MEMBERS"],["%{BKY_PERM_BAN_MEMBERS}","BAN_MEMBERS"],["%{BKY_PERM_ADMINISTRATOR}","ADMINISTRATOR"],["%{BKY_PERM_MANAGE_CHANNELS}","MANAGE_CHANNELS"],["%{BKY_PERM_MANAGE_GUILD}","MANAGE_GUILD"],["%{BKY_PERM_ADD_REACTIONS}","ADD_REACTIONS"],["%{BKY_PERM_VIEW_AUDIT_LOG}","VIEW_AUDIT_LOG"],["%{BKY_PERM_PRIORITY_SPEAKER}","PRIORITY_SPEAKER"],["%{BKY_PERM_VIEW_CHANNEL}","VIEW_CHANNEL"],["%{BKY_PERM_READ_MESSAGES}","READ_MESSAGES"],["%{BKY_PERM_SEND_MESSAGES}","SEND_MESSAGES"],["%{BKY_PERM_SEND_TTS_MESSAGES}","SEND_TTS_MESSAGES"],["%{BKY_PERM_MANAGE_MESSAGES}","MANAGE_MESSAGES"],["%{BKY_PERM_EMBED_LINKS}","EMBED_LINKS"],["%{BKY_PERM_ATTACH_FILES}","ATTACH_FILES"],["%{BKY_PERM_READ_MESSAGE_HISTORY}","READ_MESSAGE_HISTORY"],["%{BKY_PERM_MENTION_EVERYONE}","MENTION_EVERYONE"],["%{BKY_PERM_EXTERNAL_EMOJIS}","EXTERNAL_EMOJIS"],["%{BKY_PERM_USE_EXTERNAL_EMOJIS}","USE_EXTERNAL_EMOJIS"],["%{BKY_PERM_CONNECT}","CONNECT"],["%{BKY_PERM_SPEAK}","SPEAK"],["%{BKY_PERM_MUTE_MEMBERS}","MUTE_MEMBERS"],["%{BKY_PERM_DEAFEN_MEMBERS}","DEAFEN_MEMBERS"],["%{BKY_PERM_MOVE_MEMBERS}","MOVE_MEMBERS"],["%{BKY_PERM_USE_VAD}","USE_VAD"],["%{BKY_PERM_CHANGE_NICKNAME}","CHANGE_NICKNAME"],["%{BKY_PERM_MANAGE_NICKNAMES}","MANAGE_NICKNAMES"],["%{BKY_PERM_MANAGE_ROLES}","MANAGE_ROLES"],["%{BKY_PERM_MANAGE_WEBHOOKS}","MANAGE_WEBHOOKS"],["%{BKY_PERM_MANAGE_EMOJIS}","MANAGE_EMOJIS"]]}],colour:"#5B80A5",tooltip:"",output:"Boolean",helpUrl:""};fe.a.Blocks[Cn]={init:function(){this.jsonInit(kn)}},fe.a.JavaScript[Cn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=e.getFieldValue("PERMISSION"),a=["".concat(t,".hasPermission('").concat(n,"')"),fe.a.JavaScript.ORDER_FUNCTION_CALL];return a},ue(Cn,[{type:"notempty",message:"RES_MISSING_MEMBER_HAS_PERMISSION",types:["MEMBER"]}]);var Ln="s4d_member_id",Dn={message0:"%{BKY_MEMBER_ID}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][Ln]={init:function(){this.jsonInit(Dn)}},ge["JavaScript"][Ln]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.id"),ge["JavaScript"].ORDER_NONE]},ue(Ln,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Gn="s4d_member_is_bot",Un={message0:"%{BKY_MEMBER_IS_BOT}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#5B80A5",output:"Boolean",tooltip:"",helpUrl:""};ge["Blocks"][Gn]={init:function(){this.jsonInit(Un)}},ge["JavaScript"][Gn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.bot"),ge["JavaScript"].ORDER_NONE]},ue(Gn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var wn="s4d_member_tag",Vn={message0:"%{BKY_MEMBER_TAG}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][wn]={init:function(){this.jsonInit(Vn)}},ge["JavaScript"][wn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.tag"),ge["JavaScript"].ORDER_NONE]},ue(wn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var xn="s4d_member_username",Jn={message0:"%{BKY_MEMBER_USERNAME}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][xn]={init:function(){this.jsonInit(Jn)}},ge["JavaScript"][xn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.username"),ge["JavaScript"].ORDER_NONE]},ue(xn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Pn="s4d_send_member",Yn={message0:"%{BKY_SEND_MEMBER}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Pn]={init:function(){this.jsonInit(Yn)}},fe.a.JavaScript[Pn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"CONTENT",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var a=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===a||!a&&"object"===Object(G["a"])(a)){var o="".concat(t,".send(").concat(n,");\n");return o}var r="".concat(t,".send(String(").concat(n,"));\n");return r}var i="".concat(t,".send(String(").concat(n,"));\n");return i},ue(Pn,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var Kn="s4d_set_member_nickname",jn={message0:"%{BKY_SET_MEMBER_NICKNAME}",args0:[{type:"input_value",name:"MEMBER",check:"Member"},{type:"input_value",name:"NEW_NICKNAME",check:["Number","String"]}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Kn]={init:function(){this.jsonInit(jn)}},fe.a.JavaScript[Kn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"NEW_NICKNAME",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".setNickname(").concat(n,");\n");return a},ue(Kn,[{type:"notempty",message:"RES_SET_MEMBER_NICKNAME_MEMBER",types:["MEMBER"]},{type:"notempty",message:"RES_SET_MEMBER_NICKNAME_NEW_NICKNAME",types:["NEW_NICKNAME"]}]);var Hn="s4d_add_data",Fn={message0:"%{BKY_ADD_DATA}",args0:[{type:"input_value",name:"COUNT",check:"Number"},{type:"input_value",name:"KEY",check:["String","Number"]}],nextStatement:null,previousStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Hn]={init:function(){this.jsonInit(Fn)}},fe.a.JavaScript[Hn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"COUNT",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.add(String(".concat(t,"), parseInt(").concat(n,"));\n")};var Xn="s4d_delete_data",Wn={message0:"%{BKY_DELETE_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],previousStatement:null,nextStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Xn]={init:function(){this.jsonInit(Wn)}},fe.a.JavaScript[Xn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.delete(String(".concat(t,"));\n")};var $n="s4d_get_data",zn={message0:"%{BKY_GET_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],output:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[$n]={init:function(){this.jsonInit(zn)}},fe.a.JavaScript[$n]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return["s4d.database.get(String("+t+"))",fe.a.JavaScript.ORDER_ATOMIC]};var qn="s4d_has_data",Qn={message0:"%{BKY_HAS_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],output:"Boolean",colour:"#5ba58b",helpUrl:""};fe.a.Blocks[qn]={init:function(){this.jsonInit(Qn)}},fe.a.JavaScript[qn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return["s4d.database.has(String("+t+"))",fe.a.JavaScript.ORDER_ATOMIC]};var Zn="s4d_set_data",ea={message0:"%{BKY_SET_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Zn]={init:function(){this.jsonInit(ea)}},fe.a.JavaScript[Zn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"VALUE",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.set(String(".concat(t,"), ").concat(n,");\n")};var ta="s4d_subtract_data",na={message0:"%{BKY_SUBTRACT_DATA}",args0:[{type:"input_value",name:"COUNT",check:"Number"},{type:"input_value",name:"KEY",check:["String","Number"]}],nextStatement:null,previousStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[ta]={init:function(){this.jsonInit(na)}},fe.a.JavaScript[ta]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"COUNT",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.subtract(String(".concat(t,"), parseInt(").concat(n,"));\n")};var aa="s4d_newline",oa={message0:"%{BKY_NEWLINE}",output:"String",colour:"#5ba58b",helpUrl:""};fe.a.Blocks[aa]={init:function(){this.jsonInit(oa)}},fe.a.JavaScript[aa]=function(){return["'\\n'",fe.a.JavaScript.ORDER_ATOMIC]};var ra="s4d_starts_with",ia={message0:"%{BKY_STARTS_WITH}",args0:[{type:"input_value",name:"STRING",check:["String"]},{type:"input_value",name:"SUBSTRING",check:["String"]}],output:"Boolean",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[ra]={init:function(){this.jsonInit(ia)}},fe.a.JavaScript[ra]=function(e){var t=fe.a.JavaScript.valueToCode(e,"STRING",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"SUBSTRING",fe.a.JavaScript.ORDER_ATOMIC),a=["(".concat(t," || '').startsWith(").concat(n," || '')"),fe.a.JavaScript.ORDER_NONE];return a};var sa="s4d_includes",la={message0:"%{BKY_INCLUDES}",args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"INCLUDES",check:"String"}],output:"Boolean",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[sa]={init:function(){this.jsonInit(la)}},fe.a.JavaScript[sa]=function(e){var t=fe.a.JavaScript.valueToCode(e,"TEXT",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"INCLUDES",fe.a.JavaScript.ORDER_ATOMIC),a=["String(".concat(t,").includes(String(").concat(n,"))"),fe.a.JavaScript.ORDER_NONE];return a},ue(sa,[{type:"notempty",message:"RES_INCLUDES_TEXT",types:["TEXT"]},{type:"notempty",message:"RES_INCLUDES_INCLUDES",types:["INCLUDES"]}]);var ca="s4d_replace",Ea={message0:"%{BKY_REPLACE}",args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"REPLACE",check:"String"},{type:"input_value",name:"WITH",check:"String"}],output:"String",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[ca]={init:function(){this.jsonInit(Ea)}},fe.a.JavaScript[ca]=function(e){var t=fe.a.JavaScript.valueToCode(e,"TEXT",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"REPLACE",fe.a.JavaScript.ORDER_ATOMIC),a=fe.a.JavaScript.valueToCode(e,"WITH",fe.a.JavaScript.ORDER_ATOMIC),o=["String(".concat(t,").replace(new RegExp(String(").concat(n,"), 'g'), String(").concat(a,"))"),fe.a.JavaScript.ORDER_NONE];return o},ue(ca,[{type:"notempty",message:"RES_REPLACE_STRING",types:["TEXT"]},{type:"notempty",message:"RES_REPLACE_REPLACE",types:["REPLACE"]},{type:"notempty",message:"RES_REPLACE_WITH",types:["WITH"]}]);var _a="s4d_forever",da={message0:"%{BKY_FOREVER}",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENT"}],colour:"#5BA55B",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};fe.a.Blocks[_a]={init:function(){this.jsonInit(da)}},fe.a.JavaScript[_a]=function(e){return"\n while(s4d.client && s4d.client.token) {\n await delay(50);\n ".concat(fe.a.JavaScript.statementToCode(e,"STATEMENT"),"\n console.log('ran')\n }\n ")};var ua="s4d_current",ma={message0:"%{BKY_CURRENT}",args0:[{type:"field_dropdown",name:"DATA_TYPE",options:[["%{BKY_SECOND}","SECOND"],["%{BKY_MINUTE}","MINUTE"],["%{BKY_HOUR}","HOUR"],["%{BKY_DATE}","DATE"],["%{BKY_DAY_OF_WEEK}","DAY_OF_WEEK"]]}],output:"Number",colour:"#D14081",tooltip:"",helpUrl:""};fe.a.Blocks[ua]={init:function(){this.jsonInit(ma)}},fe.a.JavaScript[ua]=function(e){var t=e.getFieldValue("DATA_TYPE");return"SECOND"===t?["(new Date().getSeconds())",fe.a.JavaScript.ORDER_NONE]:"MINUTE"===t?["(new Date().getMinutes())",fe.a.JavaScript.ORDER_NONE]:"HOUR"===t?["(new Date().getHours())",fe.a.JavaScript.ORDER_NONE]:"DATE"===t?["(new Date().getDate())",fe.a.JavaScript.ORDER_NONE]:"DAY_OF_WEEK"===t?["(new Date().getDay())",fe.a.JavaScript.ORDER_NONE]:void 0};var pa="s4d_run_save_output",Sa={message0:"%{BKY_RUN_SAVE_OUTPUT}",args0:[{type:"input_statement",name:"STATEMENT",check:"RunnableActionWithResult"},{type:"field_variable",name:"VAR",variable:null}],colour:"#D14081",tooltip:"",helpUrl:"",inputsInline:!1,previousStatement:null,nextStatement:null};ge["Blocks"][pa]={init:function(){this.jsonInit(Sa)}},ge["JavaScript"][pa]=function(e){var t="".concat(ge["JavaScript"].variableDB_.getName(e.getFieldValue("VAR"),ge["Variables"].NAME_TYPE)," = await ").concat(ge["JavaScript"].statementToCode(e,"STATEMENT"));return t},ue(pa,[{type:"custom",message:"The 'run' block must encapsulate exactly one statement",code:"if (block.getFirstStatementConnection().isConnected()) _return = !block.getFirstStatementConnection().targetBlock().getNextBlock(); else _return = false;"}]);var va="s4d_wait_seconds",Ra={message0:"%{BKY_WAIT_SECONDS}",args0:[{type:"input_value",name:"TIME",check:["Number","String"]}],colour:"#D14081",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][va]={init:function(){this.jsonInit(Ra)}},ge["JavaScript"][va]=function(e){var t=ge["JavaScript"].valueToCode(e,"TIME",ge["JavaScript"].ORDER_ATOMIC);return"await delay(Number(".concat(t,")*1000);\n")};var ba=n("3d20"),Ta=n.n(ba),Aa=function(e){return e};ge["prompt"]=function(e,t,n){Ta.a.fire({title:"Variable:",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonText:"Look up",showLoaderOnConfirm:!0,allowOutsideClick:function(){return!Ta.a.isLoading()}}).then((function(e){e.value&&n(Aa(e.value))}))};var Na=n("4278");c.a.Tooltip.HOVER_MS=100;var Ma={name:"app",components:{BlocklyComponent:Oe,NavBarComponent:se},beforeCreate:function(){this.$root.$i18n.locale=this.$store.state.blocklyLocale},mounted:function(){var e;!("ScratchNative"in window)&&null!==(e=window.parent)&&void 0!==e&&e.ScratchNative&&(window.ScratchNative=window.parent.ScratchNative);var t=localStorage.getItem("tourDone");null!==t&&this.$store.commit("setTour",{status:t});var n=localStorage.getItem("blocklyLocale");null!==n&&(this.$store.commit("setLocale",{newLocale:n}),this.setLanguage(n)),this.$store.state.tourDone||(this.$tours["start-tour"].start(),this.$store.commit("setTour",{status:!0}))},data:function(){return{options:{renderer:"zelos",theme:Na["a"],zoom:{controls:!0,startScale:.9,maxScale:3,minScale:.3,scaleSpeed:1.2}},vueTourOptions:{labels:{buttonSkip:this.$t("tour.skip"),buttonPrevious:this.$t("tour.previous"),buttonNext:this.$t("tour.next"),buttonStop:this.$t("tour.finish")},steps:[{target:"#v-step-0",content:this.$t("tour.steps.load_examples"),params:{enableScrolling:!1}},{target:"#v-step-1",content:this.$t("tour.steps.run_test"),params:{enableScrolling:!1}},{target:"#v-step-2",content:this.$t("tour.steps.export_code"),params:{enableScrolling:!1}}]}}}},Oa=Ma,ga=(n("034f"),Object(R["a"])(Oa,i,s,!1,null,null,null)),fa=ga.exports,Ia=n("2f62");a["default"].use(Ia["a"]);var ha=new Ia["a"].Store({state:{workspace:0,blocklyLocale:["en","fr"].includes(navigator.language.split("-")[0])?navigator.language.split("-")[0]:"en",tourDone:!1},mutations:{setWorkspace:function(e,t){var n=t.workspace;e.workspace=n},setLocale:function(e,t){var n=t.newLocale;e.blocklyLocale=n,localStorage.setItem("blocklyLocale",n)},setTour:function(e,t){var n=t.status;e.tourDone=n,localStorage.setItem("tourDone",n)}}}),ya=n("14ba"),Ba=n.n(ya),Ca=n("a925"),ka=n("b079"),La=n.n(ka),Da=n("2536"),Ga=n.n(Da),Ua=n("ecee"),wa=n("c074"),Va=n("ad3d"),xa=n("a884"),Ja=n.n(xa),Pa=n("6a79"),Ya=n.n(Pa),Ka=n("bfb0"),ja=n.n(Ka),Ha=n("e0e1"),Fa=function(){for(var e in Ha)c.a.Msg[e]=Ha[e]},Xa={untitled:"Untitled document",help:"Help",load:{error:"The uploaded file is corrupted and cannot be loaded by Scratch For Discord..."},file:{title:"File",javascript:"Export to Javascript",open:"Open a file...",save:"Save"},edit:{title:"Edit",undo:"Undo",redo:"Redo",clear:"Clear {blockCount} blocks",cleanup:"Clean up blocks",cleardb:"Clear the database"},lang:{title:"Language"},examples:{title:"Examples",confirm:{title:"Delete current blocks?",text:"Would you like to remove the blocks from the current project before importing the example?",cancel:"Cancel",yes:"Yes",no:"No"},loaded:"Example {example} successfully imported!",ping_pong:"ping-pong command",command_parsing:"commands handler",leveling:"XP and levels system"},download:{title:"Download your bot",content:{title:"How to start your bot once downloaded?",unzipFile:"Unzip the downloaded file.",node:"Install NPM and Node.js (search for tutorials on Google)",start:"Run 'npm install' and 'npm start' in a terminal",done:"Your bot is started!"},cancel:"Cancel",confirm:"Download"},tour:{skip:"Skip tour",previous:"Previous",next:"Next",finish:"Finish",steps:{load_examples:"Import examples to discover Scratch4Discord!",run_test:"Test the functionalities of your bot here!",export_code:"Export your code here!"}},warnings:{login_block:'The "Connect to Discord" block in the "Base" category is mandatory.'},run_modal:{title:"Click Start to test your bot!",start:"Start the bot",stop:"Stop the bot",invalid_token:"Unable to connect to Discord... Maybe the bot's token isn't valid!",error:"Unable to connect to Discord... Try again later!",disabled:"⚠️ This feature is only available using the Scratch For Discord App (get it {here})",here:"here"},code_modal:{title:"JavaScript code of your bot"}},Wa={applyBlocklyLocale:Fa,websiteMessages:Xa},$a=n("cfe4"),za=function(){for(var e in $a)c.a.Msg[e]=$a[e]},qa={untitled:"Document sans titre",help:"Aide",load:{error:"Le fichier téléversé est corrompu et ne peut pas être chargé par Scratch For Discord..."},file:{title:"Fichier",javascript:"Exporter vers Javascript",open:"Ouvrir un fichier...",save:"Sauvegarder"},edit:{title:"Modifier",undo:"Annuler",redo:"Rétablir",clear:"Nettoyer {blockCount} blocks",cleanup:"Réorganiser les blocks",cleardb:"Effacer la base de données"},lang:{title:"Langue"},examples:{title:"Exemples",confirm:{title:"Supprimer les blocks",text:"Souhaitez-vous supprimer les blocks du projet actuel avant d'importer l'exemple ?",cancel:"Annuler",yes:"Oui",no:"Non"},loaded:"Exemple {example} importé avec succès !",ping_pong:"Commande ping-pong",command_parsing:"Traitement des commandes",leveling:"Système d'XP et niveaux"},download:{title:"Télécharger votre bot",content:{title:"Comment lancer votre bot une fois le bot téléchargé ?",unzipFile:"Dézippez le fichier obtenu.",node:"Installez NPM et Node.js (cherchez des tutos sur google)",start:"Tapez 'npm install' et 'npm start' dans votre terminal",done:"Votre bot est lancé!"},cancel:"Annuler",confirm:"Télécharger"},tour:{skip:"Sauter la visite",previous:"Précédent",next:"Suivant",finish:"Finir",steps:{load_examples:"Importer des exemples pour découvrir Scratch4Discord!",run_test:"Testez le fonctionnement de votre bot ici!",export_code:"Exportez votre code ici!"}},warnings:{login_block:'Le block "Connexion à Discord" de la catégorie "Base" est obligatoire !'},run_modal:{title:"Appuyez sur démarrer pour tester votre bot!",start:"Démarrer le bot",stop:"Arrêter le bot",invalid_token:"Impossible de se connecter à Discord... Peut-être que le token du bot n'est pas valide !",error:"Impossible de se connecter à Discord... Réessayez plus tard!",disabled:"⚠️ Cette fonction n'est disponible qu'avec l'application Scratch For Discord (obtenez la {here})",here:"ici"},code_modal:{title:"Code JavaScript de votre bot"}},Qa={applyBlocklyLocale:za,websiteMessages:qa},Za=n("03bd"),eo=function(){for(var e in Za)c.a.Msg[e]=Za[e]},to={untitled:"Documento sem nome",help:"Ajuda",load:{error:"O arquivo enviado está corrompido e não pode ser carregado pelo Scratch For Discord..."},file:{title:"Arquivo",javascript:"Exporta para javascirpt",open:"abrir arquivo...",save:"Salva"},edit:{title:"Edita",undo:"desfazer",redo:"refazer",clear:"deleta {blockCount} blocos",cleanup:"limpa blocos",cleardb:"limpa database"},lang:{title:"linguagem"},examples:{title:"Exemplos",confirm:{title:"Deleta os blocos atual?",text:"Você gostaria de remover os blocos do projeto atual antes de importar o exemplo?",cancel:"Cancela",yes:"Sim",no:"Não"},loaded:"Exemplo {example} importando com sucesso!",ping_pong:"comando ping-pong",command_parsing:"handler de comandos",leveling:"XP e sistema de níveis"},download:{title:"Instale o seu bot",content:{title:"Como iniciar o seu bot depois de baixado?",unzipFile:"Descompacte o arquivo baixado.",node:"Instale o NPM e o Node.js (pesquise tutoriais no Google)",start:"Execute 'npm install' e 'npm start' em um terminal",done:"Seu bot foi iniciado!"},cancel:"Cancela",confirm:"Instala"},tour:{skip:"Pular tour",previous:"Anterior",next:"Próximo",finish:"Termina",steps:{load_examples:"Importe exemplos para descobrir Scratch4Discord!",run_test:"Teste as funcionalidades do seu bot aqui!",export_code:"Exporte seu código aqui!"}},warnings:{login_block:'O bloco "Conectar ao Discord" na categoria "Base" é obrigatório.'},run_modal:{title:"Clique em Iniciar para testar seu bot!",start:"Inicie o bot",stop:"Pare o bot",invalid_token:"Unable to connect to Discord... Maybe the bot's token isn't valid!",error:"Incapaz de conectar ao Discord ... Talvez o token do bot não seja válido!",disabled:"⚠️ Este recurso está disponível apenas usando o aplicativo Scratch For Discord (pegue ele {here})",here:"aqui"},code_modal:{title:"Código JavaScript do seu bot"}},no={applyBlocklyLocale:eo,websiteMessages:to};n("f9e3"),n("2dd8"),n("ce8c"),n("2440");Ua["c"].add(wa["a"]),a["default"].component("font-awesome-icon",Va["a"]),a["default"].use(Ga.a),a["default"].use(La.a),a["default"].use(Ca["a"]),a["default"].use(Ba.a),a["default"].use(o["a"]),a["default"].use(r["a"]),a["default"].config.productionTip=!1,a["default"].config.ignoredElements=["field","block","category","xml","mutation","value","sep"];var ao={en:Wa.websiteMessages,fr:Qa.websiteMessages,pt:no.websiteMessages},oo=new Ca["a"]({locale:ao[navigator.language.split("-")[0]]?navigator.language.split("-")[0]:"en",messages:ao});a["default"].mixin({methods:{reloadWorkspace:function(){var e=this.$store.state.workspace,t=c.a.Xml.workspaceToDom(e);e.dispose();var n=c.a.inject(document.getElementById("blocklyDiv"),{renderer:"zelos",theme:Na["a"],grid:{spacing:25,length:3,colour:"#ccc",snap:!0},zoom:{controls:!0,startScale:.9,maxScale:3,minScale:.3,scaleSpeed:1.2},toolbox:Te(c.a)});return c.a.Xml.domToWorkspace(t,n),this.$store.commit("setWorkspace",{workspace:n}),e.addChangeListener(c.a.Events.disableOrphans),e},setLanguage:function(e){switch(e){case"en":c.a.setLocale(Ja.a),Wa.applyBlocklyLocale(),this.$root.$i18n.locale="en";break;case"fr":c.a.setLocale(Ya.a),Qa.applyBlocklyLocale(),this.$root.$i18n.locale="fr";break;case"pt":c.a.setLocale(ja.a),no.applyBlocklyLocale(),this.$root.$i18n.locale="pt";break;default:break}},getWorkspaceCode:function(){return this.$store.state.workspace?'\n (async()=>{\n const Discord = require("discord.js");\n const Database = require("easy-json-database");\n const devMode = typeof __E_IS_DEV !== "undefined" && __E_IS_DEV;\n const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\n const s4d = {\n Discord,\n database: new Database(`${devMode ? S4D_NATIVE_GET_PATH : "./"}/db.json`),\n joiningMember:null,\n reply:null,\n tokenInvalid:false,\n tokenError: null,\n checkMessageExists() {\n if (!s4d.client) throw new Error(\'You cannot perform message operations without a Discord.js client\')\n if (!s4d.client.readyTimestamp) throw new Error(\'You cannot perform message operations while the bot is not connected to the Discord API\')\n }\n };\n s4d.client = new s4d.Discord.Client({\n intents: [Object.values(s4d.Discord.Intents.FLAGS).reduce((acc, p) => acc | p, 0)],\n partials: ["REACTION"]\n });\n\n '.concat(c.a.JavaScript.workspaceToCode(this.$store.state.workspace),"\n\n return s4d;\n })();\n "):""}}}),new a["default"]({store:ha,render:function(e){return e(fa)},i18n:oo}).$mount("#app")},"627b":function(e,t,n){"use strict";var a=n("802e"),o=n.n(a);o.a},"7ec4":function(e,t,n){"use strict";var a=n("207c"),o=n.n(a);o.a},"802e":function(e,t,n){},"85ec":function(e,t,n){},a930:function(e,t,n){},cfe4:function(e){e.exports=JSON.parse('{"BASE_BLOCKS":"Blocks de base","REPLY":"répondre %1","MESSAGE_RELATED_BLOCKS":"Blocks relatifs aux messages","INIT_TOOLTIP":"Vous permet d\'utiliser les blocks Discord!","LOGIN":"Connexion à Discord avec le token %1","LOGIN_TOOLTIP":"Connecte votre bot à Discord. Pour trouver le token de votre bot, rendez-vous sur https://discord.com/developers/.","ON_MESSAGE":"Quand un message est reçu","ON_CONNECTED":"Quand le bot est connecté","ON_CONNECTED_TOOLTIP":"Évènement émis lorsque votre bot est connecté à Discord.","MESSAGE_ID":"ID du message","MESSAGE_CONTENT":"contenu du message","MESSAGE_AUTHOR":"auteur du message","MESSAGE_AUTHOR_RAW":"%1 de l\'auteur du message","USERNAME":"nom d\'utilisateur","NICKNAME":"pseudo","GET_GUILD":"trouver le serveur %1 via %2","NAME":"nom","ADD_ROLE":"ajouter le rôle %1 au membre %2","REMOVE_ROLE":"enlever le rôle %1 au membre %2","BAN_MEMBER":"bannir le membre %1","KICK_MEMBER":"expulser le membre %1","SEND_MEMBER":"envoyer %1 au membre %2","MESSAGE_GUILD_RAW":"%1 du serveur du message","MESSAGE_CHANNEL_RAW":"%1 du salon du message","MESSAGE_CHANNEL":"salon du message","MESSAGE_GUILD":"serveur du message","BASIC_BLOCKS":"Blocks basics","ADVANCED_BLOCKS":"Blocks avancés","MENTIONED_MEMBER":"membre mentionné","ADMINISTRATOR":"Administrateur","DETECT_MESSAGES":"Détecter les messages","MESSAGE_ACTIONS":"Actions sur le message","RELATED_TO_MESSAGE_STRINGS":"Chaînes relatives au message","DELETE_MESSAGE":"supprimer le message","RES_ADD_REACTION_MISSING_REACTION":"Vous devez spécifier un émoji valide !","ADD_REACTION":"ajouter la réaction %1 au message","MESSAGE_EMBED":"Message Embed","COLOR":"couleur","TITLE":"titre","MESSAGE":"message","IMAGE":"image","FOOTER":"pied de page","THUMBNAIL":"miniature","PURGE":"dans le salon %1 supprimer %2 messages","RES_PURGE_AMOUNT":"Vous devez préciser un nombre valide de messages à supprimer !","RES_PURGE_CHANNEL":"Vous devez préciser un salon valide !","CHANNEL_MESSAGE_ACTIONS":"Actions sur les messages du salon","TOOLS":"Outils","CHECK_PERMISSIONS":"Vérifier les permissions d\'un membre","MEMBER_HAS_PERMISSION":"le membre %1 a la permission %2","PERM_CREATE_INSTANT_INVITE":"créer une invitation instantanée","PERM_KICK_MEMBERS":"expulser des membres","PERM_BAN_MEMBERS":"bannir des membres","PERM_ADMINISTRATOR":"administrateur","PERM_MANAGE_CHANNELS":"gérer les salons","PERM_MANAGE_GUILD":"gérer le serveur","PERM_ADD_REACTIONS":"ajouter des réactions","PERM_VIEW_AUDIT_LOG":"voir les logs du serveur","PERM_PRIORITY_SPEAKER":"voix prioritaire","PERM_VIEW_CHANNEL":"voir le salon","PERM_READ_MESSAGES":"lire les messages","PERM_SEND_MESSAGES":"envoyer des messages","PERM_SEND_TTS_MESSAGES":"envoyer des messages TTS","PERM_MANAGE_MESSAGES":"gérer les messages","PERM_EMBED_LINKS":"intégrer des liens","PERM_ATTACH_FILES":"attacher des fichiers","PERM_READ_MESSAGE_HISTORY":"voir l\'historique des messages","PERM_MENTION_EVERYONE":"mentionner @everyone","PERM_EXTERNAL_EMOJIS":"voir les émojis externes","PERM_USE_EXTERNAL_EMOJIS":"utiliser des émojis externes","PERM_CONNECT":"se connecter","PERM_SPEAK":"parler","PERM_MUTE_MEMBERS":"couper le micro des membres","PERM_DEAFEN_MEMBERS":"mettre en sourdine des membres","PERM_MOVE_MEMBERS":"déplacer des membres","PERM_USE_VAD":"utiliser la détection de la voix","PERM_CHANGE_NICKNAME":"changer de pseudo","PERM_MANAGE_NICKNAMES":"gérer les pseudos","PERM_MANAGE_ROLES":"gérer les rôles","PERM_MANAGE_WEBHOOKS":"gérer les webhooks","PERM_MANAGE_EMOJIS":"gérer les émojis","JOINS_RELATED_BLOCKS":"Blocks relatifs aux arrivées de membre","DETECT_JOINS":"Détecter les arrivées","ON_MEMBER_JOIN":"Quand un membre rejoint le serveur","JOINING_MEMBER_INFORMATIONS":"Informations sur l\'arrivant","JOINING_MEMBER":"membre arrivant","JOINING_GUILD":"serveur du membre arrivant","RELATED_TO_JOIN_STRINGS":"Chaînes relatives à l\'arrivée","JOINING_MEMBER_RAW":"%1 du membre arrivant","JOINING_GUILD_RAW":"%1 du serveur du membre arrivant","TEMPORARILY":"Temporairement","HOURS":"heures","REASON":"raison","DURING_HOURS":"durant","WITH_REASON":"pour la raison","RES_MUST_BE_IN_ON_MESSAGE":"Ce block ne peut être utilisé que dans un évènement \\"Quand un message est reçu\\"","RES_MISSING_CONTENT":"Vous devez préciser un contenu valide à répondre !","RES_MISSING_MEMBER_HAS_PERMISSION":"Vous devez préciser un membre valide à qui vérifier les permissions !","RES_MUST_BE_IN_ON_MEMBER_JOIN":"Ce block ne peut être utilisé que dans un évènement \\"Quand un membre rejoint le serveur\\"","RES_ADD_ROLE_MISSING_ROLE":"Vous devez préciser un nom ou un identifiant de rôle valide à ajouter !","RES_ADD_ROLE_MISSING_MEMBER":"Vous devez préciser un membre valide à qui ajouter le rôle !","RES_REMOVE_ROLE_MISSING_ROLE":"Vous devez préciser un nom ou un identifiant de rôle valide à enlever !","RES_REMOVE_ROLE_MISSING_MEMBER":"Vous devez préciser un membre valide à qui enlever le rôle !","RES_KICK_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à expulser !","RES_BAN_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à bannir !","RES_SEND_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à qui envoyer le message !","MANDATORY_BLOCKS":"Blocks obligatoires","STARTS_WITH":"%1 commence par %2","REPLACE":"dans le texte %1 remplacer %2 par %3","RES_REPLACE_STRING":"Vous devez préciser un texte à modifier !","RES_REPLACE_REPLACE":"Vous devez préciser ce qu\'il faut remplacer dans le texte !","RES_REPLACE_WITH":"Vous devez préciser ce avec quoi remplacer dans le texte !","INCLUDES":"%1 contient %2","RES_INCLUDES_TEXT":"Vous devez préciser un texte dans lequel chercher !","RES_INCLUDES_INCLUDES":"Vous devez préciser un texte à rechercher !","NEWLINE":"nouvelle ligne","FIND_CHANNEL":"Trouver un salon","SEND_CHANNEL_LABEL":"Envoyer un message dans le salon trouvé","GET_CHANNEL":"obtenir le salon dont le %2 est %1","RES_MISSING_CHANNEL_VALUE":"Vous devez préciser un nom ou un identifiant de salon valide !","RES_SEND_CHANNEL_CONTENT":"Vous devez préciser un contenu à envoyer !","RES_SEND_CHANNEL_CHANNEL":"Vous devez préciser un salon dans lequel envoyer le contenu !","SEND_CHANNEL":"envoyer %1 dans le salon %2","TOOLBOX_LOGIC":"Logique","TOOLBOX_LOOPS":"Boucles","TOOLBOX_MATH":"Math","TOOLBOX_TEXT":"Texte","TOOLBOX_LISTS":"Listes","TOOLBOX_COLORS":"Couleurs","TOOLBOX_VARIABLES":"Variables","TOOLBOX_FUNCTIONS":"Fonctions","TOOLBOX_CHANNELS":"Salons","TOOLBOX_ACTIONS":"Actions","TOOLBOX_BASE":"Base","TOOLBOX_SERVER":"Serveurs","TOOLBOX_ROLES":"Rôles","TOOLBOX_MEMBERS":"Membres","FIND_SERVER":"Trouver un serveur","GET_SERVER":"obtenir le serveur dont le %2 est %1","RES_GET_SERVER_SERVER":"Vous devez préciser un nom ou un identifiant de serveur valide !","LABEL_SERVER_INFOS":"Informations sur le serveur","MEMBER_COUNT":"nombre de membres du serveur %1","RES_VALID_SERVER":"Vous devez préciser un serveur valide !","ICON_URL":"URL de l\'icône du serveur %1","SERVER_NAME":"nom du serveur %1","SERVER_OWNER":"propriétaire du serveur %1","RES_SET_SERVER_NAME_SERVER":"Vous devez préciser un serveur valide à qui changer le nom !","RES_SET_SERVER_NAME_NEW_NICKNAME":"Vous devez préciser un nouveau nom valide pour le serveur !","LABEL_MODIFY_SERVER":"Modifier le serveur","SET_SERVER_NAME":"changer le nom du serveur %1 nouveau nom %2","GET_ROLE_SERVER":"sur le serveur","GET_ROLE":"obtenir le rôle dont le %2 est %1","RES_GET_ROLE_VALUE":"Vous devez préciser un nom ou un identifiant de rôle valide !","RES_GET_SERVER_VALUE":"Vous devez préciser un nom ou un identifiant de serveur valide !","FIND_ROLE":"Trouver un rôle","ROLE_ASSIGNMENT":"Affectation des rôles","RES_GET_MEMBER_VALUE":"Vous devez préciser un nom ou un identifiant de membre valide !","RES_GET_MEMBER_SERVER":"Vous devez préciser un serveur valide sur lequel chercher le membre !","MEMBER_INFORMATIONS":"Informations des membres","RES_VALID_MEMBER":"Vous devez préciser un membre valide !","MEMBER_DISCRIMINATOR":"discriminateur du membre %1","MEMBER_ID":"id du membre %1","MEMBER_TAG":"tag du membre %1","MEMBER_USERNAME":"pseudo du membre %1","MEMBER_IS_BOT":"le membre %1 est un robot","GET_MEMBER":"obtenir le membre dont le %2 est %1 sur le serveur %3","FIND_MEMBER":"Trouver un membre","LABEL_MEMBER_ACTIONS":"Actions sur le membre","LABEL_MESSAGE_CONTEXT":"Contexte du message","SET_MEMBER_NICKNAME":"changer le surnom du membre %1 nouveau surnom %2","RES_SET_MEMBER_NICKNAME_MEMBER":"Vous devez préciser un membre valide à qui changer le surnom !","RES_SET_MEMBER_NICKNAME_NEW_NICKNAME":"Vous devez préciser un nouveau surnom valide pour le membre !","SERVER_BOOST_COUNT":"nombre de boosts du serveur %1","SERVER_BOOST_LEVEL":"niveau de boost du serveur %1","SEND_WAIT_REPLY":"envoyer %1 dans le salon %2 et attendre une réponse du membre %3 pendant (minutes) %4 quand une réponse est reçue %5 si aucune réponse n\'est reçue %6","RES_SEND_WAIT_REPLY_VALUE_PARENT":"Ce block ne peut être utilisé que dans un block \\"Attendre une réponse\\" !","SEND_WAIT_REPLY_VALUE":"réponse du membre","FORMS":"Formulaires","SEND_WAIT_REPLY_EXAMPLE":"Quel est votre prénom ?","REPLY_EXAMPLE":"Salut!","ON_REACT_ADDED":"Quand une réaction est ajoutée","REACT_RELATED_BLOCKS":"Blocks relatifs aux réactions","DETECT_REACT":"Détecter les réactions","REACT_INFORMATIONS":"Information sur la réaction ajoutée/enlevée","REACT_MESSAGE_ID":"ID du message","RES_MUST_BE_IN_ON_REACT":"Ce block ne peut être utilisé que dans un block \\"réaction ajoutée\\" ou \\"réaction enlevée\\" !","REACT_EMOJI":"émoji de la réaction","REACT_MEMBER":"membre réagissant","ON_REACT_REMOVED":"Quand une réaction est enlevée","BOT_PING":"ping du bot","BOT_INFORMATIONS":"Informations about the bot","BOT_ACTIONS":"Actions sur le bot","RES_MISSING_GAME":"Vous devez préciser un jeu pour le bot !","SET_BOT_GAME":"définir le jeu du bot à %1","BOT_SERVER_COUNT":"nombre de serveurs du bot","TOOLBOX_E_JOINS":"Arrivées","TOOLBOX_E_MESSAGES":"Messages","TOOLBOX_E_REACTIONS":"Réactions","TOOLBOX_DATABASE":"Base de données","GET_DATA":"obtenir %1 dans la base de données","LABEL_READ_DB":"Lire la base de données","LABEL_UPDATE_DB":"Modifier la base de données","SET_DATA":"définir %1 à %2 dans la base de données","DELETE_DATA":"supprimer %1 de la base de données","HAS_DATA":"%1 existe dans la base de données","ADD_DATA":"ajouter %1 à %2","SUBTRACT_DATA":"soustraire %1 à %2","DETECT_LEAVES":"Détecter les départs","LEAVING_GUILD":"serveur du membre partant","LEAVING_GUILD_RAW":"%1 du serveur du membre partant","LEAVING_MEMBER_INFORMATIONS":"Informations sur le membre","LEAVES_RELATED_BLOCKS":"Blocks relatifs aux départs de membre","ON_MEMBER_LEAVE":"Quand un membre part d\'un serveur","RELATED_TO_LEAVE_STRINGS":"Chaînes relatives au départ","TOOLBOX_E_LEAVES":"Départs","RES_MUST_BE_IN_ON_MEMBER_LEAVE":"Ce block ne peut être utilisé que dans un évènement \\"Quand un membre part d\'un serveur\\"","LEAVING_MEMBER_RAW":"%1 du membre partant","WAIT_SECONDS":"attendre %1 secondes","TOOLBOX_OTHER":"Autre","RUN_SAVE_OUTPUT":"faire %1 et sauvegarder le résultat dans %2","TOOLBOX_MESSAGES":"Messages","GET_MESSAGE":"obtenir le message dont l\'ID est %1 dans le salon %2","RES_GET_MESSAGE_CHANNEL":"Vous devez préciser un salon valide sur lequel chercher le message!","RES_GET_MESSAGE_VALUE":"Vous devez préciser un identifiant de message valide!","FIND_MESSAGE":"Trouver le message","MESSAGE_INFORMATIONS":"Informations sur le message","CURRENT":"%1 actuelle","HOUR":"heure","MINUTE":"minute","MONTH":"mois","DAY_OF_WEEK":"jour de la semaine","SECOND":"seconde","DATE":"date","FOREVER":"répéter indéfiniement %1 faire %2","YES":"oui","NO":"non","CREATE_CHANNEL":"créer un salon avec comme nom %1 sur le serveur %2 de type %3","CHANNEL_ACTIONS":"Actions sur le salon","TEXT":"textuel","VOICE":"vocal","CATEGORY":"catégorie"}')},e0e1:function(e){e.exports=JSON.parse('{"BASE_BLOCKS":"Base blocks","MESSAGE_RELATED_BLOCKS":"Blocks related to messages","REPLY":"reply %1","LOGIN":"Connect to Discord with the token %1","LOGIN_TOOLTIP":"Connect your bot to Discord. To get your bot token, go to https://discord.com/developers/.","ON_MESSAGE":"When a message is received","ON_CONNECTED":"When the bot is connected","ON_CONNECTED_TOOLTIP":"Event emitted when your bot is connected to Discord.","MESSAGE_ID":"message ID","MESSAGE_CONTENT":"message content","MESSAGE_AUTHOR":"message author","MESSAGE_AUTHOR_RAW":"%1 of the message author","USERNAME":"username","NICKNAME":"nickname","GET_GUILD":"find server %1 using %2","NAME":"name","ADD_ROLE":"add role %1 to member %2","REMOVE_ROLE":"remove role %1 from member %2","BAN_MEMBER":"ban member %1","KICK_MEMBER":"kick member %1","SEND_MEMBER":"send %1 to member %2","MESSAGE_GUILD":"message server","MESSAGE_CHANNEL":"message channel","BASIC_BLOCKS":"Basic blocks","ADVANCED_BLOCKS":"Advanced blocks","MENTIONED_MEMBER":"mentioned member","ADMINISTRATOR":"Administrator","DETECT_MESSAGES":"Detect messages","MESSAGE_ACTIONS":"Actions on the message","RELATED_TO_MESSAGE_STRINGS":"Strings related to the message","DELETE_MESSAGE":"delete the message","RES_ADD_REACTION_MISSING_REACTION":"You must specify a valid emoji !","ADD_REACTION":"add reaction %1 to the message","MESSAGE_EMBED":"Message Embed","COLOR":"color","TITLE":"title","MESSAGE":"message","IMAGE":"image","FOOTER":"footer","THUMBNAIL":"thumbnail","PURGE":"in channel %1 purge %2 messages","RES_PURGE_AMOUNT":"You must specify a valid amount of messages to purge!","RES_PURGE_CHANNEL":"You must specify a valid channel!","CHANNEL_MESSAGE_ACTIONS":"Action in the messages of channel","TOOLS":"Tools","CHECK_PERMISSIONS":"Check member permissions","MEMBER_HAS_PERMISSION":"the member %1 has permission %2","PERM_CREATE_INSTANT_INVITE":"create instant invites","PERM_KICK_MEMBERS":"kick members","PERM_BAN_MEMBERS":"ban members","PERM_ADMINISTRATOR":"administrator","PERM_MANAGE_CHANNELS":"manage channels","PERM_MANAGE_GUILD":"manage server","PERM_ADD_REACTIONS":"add reactions","PERM_VIEW_AUDIT_LOG":"view audit logs","PERM_PRIORITY_SPEAKER":"priority-speaker","PERM_VIEW_CHANNEL":"view channel","PERM_READ_MESSAGES":"read messages","PERM_SEND_MESSAGES":"send messages","PERM_SEND_TTS_MESSAGES":"send TTS messages","PERM_MANAGE_MESSAGES":"manage messages","PERM_EMBED_LINKS":"embed links","PERM_ATTACH_FILES":"attach files","PERM_READ_MESSAGE_HISTORY":"read message history","PERM_MENTION_EVERYONE":"mention @everyone","PERM_EXTERNAL_EMOJIS":"view external emojis","PERM_USE_EXTERNAL_EMOJIS":"use external emojis","PERM_CONNECT":"connect","PERM_SPEAK":"speak","PERM_MUTE_MEMBERS":"mute members","PERM_DEAFEN_MEMBERS":"deafen members","PERM_MOVE_MEMBERS":"move members","PERM_USE_VAD":"use voice activity","PERM_CHANGE_NICKNAME":"change nickname","PERM_MANAGE_NICKNAMES":"manage nicknames","PERM_MANAGE_ROLES":"manage roles","PERM_MANAGE_WEBHOOKS":"manage webhooks","PERM_MANAGE_EMOJIS":"manage emojis","JOINS_RELATED_BLOCKS":"Blocks related to member joins","DETECT_JOINS":"Detect joins","ON_MEMBER_JOIN":"When a member joins a server","JOINING_MEMBER_INFORMATIONS":"Informations about the member","JOINING_MEMBER":"joining member","RELATED_TO_JOIN_STRINGS":"Strings related to join","JOINING_MEMBER_RAW":"%1 of the joining member","JOINING_GUILD":"joining member server","TEMPORARILY":"Temporarily","HOURS":"hours","REASON":"reason","DURING_HOURS":"during","WITH_REASON":"for the reason","RES_MUST_BE_IN_ON_MESSAGE":"This block may only be used in a \\"When a message is received\\" event","RES_MISSING_CONTENT":"You must specify a valid content to reply!","RES_MISSING_MEMBER_HAS_PERMISSION":"You must specify a valid member to check permissions!","RES_MUST_BE_IN_ON_MEMBER_JOIN":"This block may only be used in a \\"When a member joins a server\\" event","RES_ADD_ROLE_MISSING_ROLE":"You must specify a valid name or role ID to add!","RES_ADD_ROLE_MISSING_MEMBER":"You must specify a valid member to add the role to!","RES_REMOVE_ROLE_MISSING_ROLE":"You must specify a valid name or role ID to remove!","RES_REMOVE_ROLE_MISSING_MEMBER":"You must specify a valid member to remove the role!","RES_KICK_MEMBER_MISSING_MEMBER":"You must specify a valid member to be kicked!","RES_BAN_MEMBER_MISSING_MEMBER":"You must specify a valid member to be banned!","RES_SEND_MEMBER_MISSING_MEMBER":"You must specify a valid member to send the message to!","MANDATORY_BLOCKS":"Mandatory blocks","STARTS_WITH":"%1 starts with %2","REPLACE":"in text %1 replace %2 with %3","RES_REPLACE_STRING":"You must specify a text to replace!","RES_REPLACE_REPLACE":"You must specify what to replace in the text!","RES_REPLACE_WITH":"You must specify the new value to replace!","INCLUDES":"%1 includes %2","RES_INCLUDES_TEXT":"You must specify a text to see if that includes something!","RES_INCLUDES_INCLUDES":"You must specify a text to see if in the other text includes that!","NEWLINE":"new line","FIND_CHANNEL":"Find a channel","SEND_CHANNEL_LABEL":"Send a message in the found channel","GET_CHANNEL":"get the channel with %2 equal to %1","RES_MISSING_CHANNEL_VALUE":"You must specify a valid channel name or ID!","RES_SEND_CHANNEL_CONTENT":"You must specify a content to send!","RES_SEND_CHANNEL_CHANNEL":"You must specify a channel in which to send the content!","SEND_CHANNEL":"send %1 in the channel %2","TOOLBOX_LOGIC":"Logic","TOOLBOX_LOOPS":"Loops","TOOLBOX_MATH":"Math","TOOLBOX_TEXT":"Text","TOOLBOX_LISTS":"Lists","TOOLBOX_COLORS":"Colors","TOOLBOX_VARIABLES":"Variables","TOOLBOX_FUNCTIONS":"Functions","TOOLBOX_CHANNELS":"Channels","TOOLBOX_ACTIONS":"Actions","TOOLBOX_BASE":"Base","TOOLBOX_SERVER":"Servers","TOOLBOX_ROLES":"Roles","FIND_SERVER":"Find a server","GET_SERVER":"get the server with %2 equal to %1","RES_GET_SERVER_SERVER":"You must specify a valid server name or ID!","LABEL_SERVER_INFOS":"Informations about the server","MEMBER_COUNT":"number of members of server %1","RES_VALID_SERVER":"You must specify a valid server!","ICON_URL":"icon url of server %1","SERVER_NAME":"name of server %1","SERVER_OWNER":"owner of server %1","RES_SET_SERVER_NAME_SERVER":"You must specify a valid server to change the name!","RES_SET_SERVER_NAME_NEW_NICKNAME":"You must specify a new valid name for the server!","LABEL_MODIFY_SERVER":"Modify the server","SET_SERVER_NAME":"change name of server %1 new name %2","GET_ROLE_SERVER":"on the server","GET_ROLE":"get role with %2 equal to %1","RES_GET_ROLE_VALUE":"You must specify a valid name or role ID!","RES_GET_SERVER_VALUE":"You must specify a valid server name or ID!","FIND_ROLE":"Find a role","ROLE_ASSIGNMENT":"Roles assignment","FIND_MEMBER":"Find a member","GET_MEMBER":"get member with %2 equal to %1 on server %3","INIT_TOOLTIP":"Allows you to use Discord blocks!","JOINING_GUILD_RAW":"%1 of the server of the joining member","LABEL_MEMBER_ACTIONS":"Actions on the member","LABEL_MESSAGE_CONTEXT":"Message context","MESSAGE_CHANNEL_RAW":"%1 of the channel of the message","MESSAGE_GUILD_RAW":"%1 of the server of the message","RES_GET_MEMBER_SERVER":"You must specify a valid server on which the member is!","RES_GET_MEMBER_VALUE":"You must specify a valid member ID or member name!","TOOLBOX_MEMBERS":"Member","MEMBER_INFORMATIONS":"Members informations","RES_VALID_MEMBER":"You must specify a valid member !","MEMBER_DISCRIMINATOR":"discriminator of member %1","MEMBER_ID":"id of member %1","MEMBER_TAG":"tag of member %1","MEMBER_USERNAME":"username of member %1","MEMBER_IS_BOT":"member %1 is a bot","SET_MEMBER_NICKNAME":"change nickname of member %1 new nickname %2","RES_SET_MEMBER_NICKNAME_MEMBER":"You must specify a valid member to change nicknam","RES_SET_MEMBER_NICKNAME_NEW_NICKNAME":"You must specify a valid new nickname for the member!","SERVER_BOOST_COUNT":"number of boosts of server %1","SERVER_BOOST_LEVEL":"boost level of server %1","SEND_WAIT_REPLY":"send %1 in the channel %2 and wait for an answer from member %3 during (minutes) %4 when an answer is received %5 if no answer is received %6","RES_SEND_WAIT_REPLY_VALUE_PARENT":"This block can only be used in a \\"Wait for an answer\\" bl!","SEND_WAIT_REPLY_VALUE":"answer of member","FORMS":"Forms","SEND_WAIT_REPLY_EXAMPLE":"What is your name?","REPLY_EXAMPLE":"Hey!","ON_REACT_ADDED":"When a reaction is added","REACT_RELATED_BLOCKS":"Blocks related to reactions","DETECT_REACT":"I\'m writigni\'m writign","REACT_INFORMATIONS":"Informations about the added/removed reaction","REACT_MESSAGE_ID":"reaction message ID","RES_MUST_BE_IN_ON_REACT":"This block can only be used in a \\"reaction added\\" block or a \\"reaction removed\\" block!","REACT_EMOJI":"emoji of the reaction","REACT_MEMBER":"reacting member","ON_REACT_REMOVED":"When a reaction is removed","BOT_PING":"bot ping","BOT_INFORMATIONS":"Bot Informations","BOT_ACTIONS":"Actions on the bot","RES_MISSING_GAME":"You must specify a game for the bot!","SET_BOT_GAME":"set bot game to %1","BOT_SERVER_COUNT":"bot server count","TOOLBOX_E_JOINS":"Joins","TOOLBOX_E_MESSAGES":"Messages","TOOLBOX_E_REACTIONS":"Reactions","TOOLBOX_DATABASE":"Database","GET_DATA":"get %1 from the database","LABEL_READ_DB":"Read database","LABEL_UPDATE_DB":"Update database","SET_DATA":"set %1 to %2 in database","DELETE_DATA":"delete %1 from database","HAS_DATA":"%1 exists in database","ADD_DATA":"add %1 to %2","SUBTRACT_DATA":"subtract %1 from %2","DETECT_LEAVES":"Detect leaves","LEAVING_GUILD":"leaving member server","LEAVING_GUILD_RAW":"%1 of the server of the leaving member","LEAVING_MEMBER_INFORMATIONS":"Informations about the member","LEAVES_RELATED_BLOCKS":"Blocks related to member leaves","ON_MEMBER_LEAVE":"When a member leaves a server","RELATED_TO_LEAVE_STRINGS":"Strings related to leave","TOOLBOX_E_LEAVES":"Leaves","RES_MUST_BE_IN_ON_MEMBER_LEAVE":"This block may only be used in a \\"When a member leaves a server\\" event","LEAVING_MEMBER_RAW":"%1 of the leaving member","WAIT_SECONDS":"wait %1 seconds","TOOLBOX_OTHER":"Other","RUN_SAVE_OUTPUT":"do %1 and save output in %2","TOOLBOX_MESSAGES":"Messages","GET_MESSAGE":"get message with ID equal to %1 in channel %2","RES_GET_MESSAGE_CHANNEL":"You must specify a valid channel on which the message is!","RES_GET_MESSAGE_VALUE":"You must specify a valid message ID!","FIND_MESSAGE":"Find the message","MESSAGE_INFORMATIONS":"Informations about the message","CURRENT":"current %1","HOUR":"hour","MINUTE":"minute","MONTH":"month","DAY_OF_WEEK":"day of week","SECOND":"second","DATE":"date","FOREVER":"repeat forever %1 do %2","YES":"yes","NO":"no","CREATE_CHANNEL":"create channel with name %1 on server %2 of type %3","CHANNEL_ACTIONS":"Actions for the channel","TEXT":"text","VOICE":"voice","CATEGORY":"category"}')}}); -//# sourceMappingURL=app.f03ff491.js.map \ No newline at end of file diff --git a/environments/core/server/sources/s4d/js/app.f03ff491.js.map b/environments/core/server/sources/s4d/js/app.f03ff491.js.map deleted file mode 100644 index 9632bd0..0000000 --- a/environments/core/server/sources/s4d/js/app.f03ff491.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?7e02","webpack:///./src/components/NavigationBar/RunModal.vue?5e39","webpack:///./src/App.vue?cfa0","webpack:///./src/components/NavigationBar/NavigationBar.vue?bb93","webpack:///./src/components/NavigationBar/FileMenu.vue?74a4","webpack:///src/components/NavigationBar/FileMenu.vue","webpack:///./src/components/NavigationBar/FileMenu.vue?4818","webpack:///./src/components/NavigationBar/FileMenu.vue","webpack:///./src/components/NavigationBar/EditMenu.vue?acd0","webpack:///src/components/NavigationBar/EditMenu.vue","webpack:///./src/components/NavigationBar/EditMenu.vue?6315","webpack:///./src/components/NavigationBar/EditMenu.vue","webpack:///./src/components/NavigationBar/LanguageMenu.vue?b2ae","webpack:///src/components/NavigationBar/LanguageMenu.vue","webpack:///./src/components/NavigationBar/LanguageMenu.vue?f09d","webpack:///./src/components/NavigationBar/LanguageMenu.vue","webpack:///./src/components/NavigationBar/RunModal.vue?a3b2","webpack:///src/components/NavigationBar/RunModal.vue","webpack:///./src/components/NavigationBar/RunModal.vue?5982","webpack:///./src/components/NavigationBar/RunModal.vue","webpack:///./src/components/NavigationBar/ExamplesMenu.vue?0b01","webpack:///./src/examples/ping-pong.js","webpack:///./src/examples/command-parsing.js","webpack:///./src/examples/leveling.js","webpack:///src/components/NavigationBar/ExamplesMenu.vue","webpack:///./src/components/NavigationBar/ExamplesMenu.vue?bc21","webpack:///./src/components/NavigationBar/ExamplesMenu.vue","webpack:///./src/components/NavigationBar/CodeModal.vue?fe2a","webpack:///src/components/NavigationBar/CodeModal.vue","webpack:///./src/components/NavigationBar/CodeModal.vue?e6b9","webpack:///./src/components/NavigationBar/CodeModal.vue","webpack:///src/components/NavigationBar/NavigationBar.vue","webpack:///./src/components/NavigationBar/NavigationBar.vue?8352","webpack:///./src/components/NavigationBar/NavigationBar.vue","webpack:///./src/components/BlocklyComponent.vue?3eba","webpack:///./src/restrictions.js","webpack:///./src/toolbox.js","webpack:///src/components/BlocklyComponent.vue","webpack:///./src/components/BlocklyComponent.vue?4dac","webpack:///./src/components/BlocklyComponent.vue","webpack:///./src/blocks/discord/base/bot_ping.js","webpack:///./src/blocks/discord/base/bot_server_count.js","webpack:///./src/blocks/discord/base/login.js","webpack:///./src/blocks/discord/base/on_connected.js","webpack:///./src/blocks/discord/base/set_bot_game.js","webpack:///./src/blocks/discord/message-event/add_reaction.js","webpack:///./src/blocks/discord/message-event/delete_message.js","webpack:///./src/blocks/discord/message-event/mentioned_member.js","webpack:///./src/blocks/discord/message-event/message_id.js","webpack:///./src/blocks/discord/message-event/message_author.js","webpack:///./src/blocks/discord/message-event/message_author_raw.js","webpack:///./src/blocks/discord/message-event/message_channel.js","webpack:///./src/blocks/discord/message-event/message_channel_raw.js","webpack:///./src/blocks/discord/message-event/message_content.js","webpack:///./src/blocks/discord/message-event/message_embed.js","webpack:///./src/blocks/discord/message-event/message_guild.js","webpack:///./src/blocks/discord/message-event/message_guild_raw.js","webpack:///./src/blocks/discord/message-event/on_message.js","webpack:///./src/blocks/discord/message-event/reply.js","webpack:///./src/blocks/discord/message-event/purge.js","webpack:///./src/blocks/discord/join-event/joining_guild.js","webpack:///./src/blocks/discord/join-event/joining_guild_raw.js","webpack:///./src/blocks/discord/join-event/joining_member.js","webpack:///./src/blocks/discord/join-event/joining_member_raw.js","webpack:///./src/blocks/discord/join-event/on_member_join.js","webpack:///./src/blocks/discord/leave-event/leaving_guild.js","webpack:///./src/blocks/discord/leave-event/leaving_guild_raw.js","webpack:///./src/blocks/discord/leave-event/leaving_member_raw.js","webpack:///./src/blocks/discord/leave-event/on_member_leave.js","webpack:///./src/blocks/discord/reaction-event/on_react_added.js","webpack:///./src/blocks/discord/reaction-event/on_react_removed.js","webpack:///./src/blocks/discord/reaction-event/react_emoji.js","webpack:///./src/blocks/discord/reaction-event/react_member.js","webpack:///./src/blocks/discord/reaction-event/react_message_id.js","webpack:///./src/blocks/discord/channels/create_channel.js","webpack:///./src/blocks/discord/channels/get_channel.js","webpack:///./src/blocks/discord/channels/send_channel.js","webpack:///./src/blocks/discord/channels/send_wait_reply.js","webpack:///./src/blocks/discord/channels/send_wait_reply_value.js","webpack:///./src/blocks/discord/servers/boost_level.js","webpack:///./src/blocks/discord/servers/get_server.js","webpack:///./src/blocks/discord/servers/icon_url.js","webpack:///./src/blocks/discord/servers/member_count.js","webpack:///./src/blocks/discord/servers/server_name.js","webpack:///./src/blocks/discord/servers/server_owner.js","webpack:///./src/blocks/discord/servers/set_server_name.js","webpack:///./src/blocks/discord/roles/add_role.js","webpack:///./src/blocks/discord/roles/get_role.js","webpack:///./src/blocks/discord/roles/remove_role.js","webpack:///./src/blocks/discord/members/ban_member.js","webpack:///./src/blocks/discord/members/get_member.js","webpack:///./src/blocks/discord/members/kick_member.js","webpack:///./src/blocks/discord/members/member_discriminator.js","webpack:///./src/blocks/discord/members/member_has_permission.js","webpack:///./src/blocks/discord/members/member_id.js","webpack:///./src/blocks/discord/members/member_is_bot.js","webpack:///./src/blocks/discord/members/member_tag.js","webpack:///./src/blocks/discord/members/member_username.js","webpack:///./src/blocks/discord/members/send_message.js","webpack:///./src/blocks/discord/members/set_member_nickname.js","webpack:///./src/blocks/database/add_data.js","webpack:///./src/blocks/database/delete_data.js","webpack:///./src/blocks/database/get_data.js","webpack:///./src/blocks/database/has_data.js","webpack:///./src/blocks/database/set_data.js","webpack:///./src/blocks/database/subtract_data.js","webpack:///./src/blocks/text/newline.js","webpack:///./src/blocks/text/starts-with.js","webpack:///./src/blocks/text/includes.js","webpack:///./src/blocks/text/replace.js","webpack:///./src/blocks/loops/forever.js","webpack:///./src/blocks/other/current.js","webpack:///./src/blocks/other/run_save_output.js","webpack:///./src/blocks/other/wait_seconds.js","webpack:///./src/prompt.js","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue","webpack:///./src/store.js","webpack:///./src/locales/en.js","webpack:///./src/locales/fr.js","webpack:///./src/locales/pt.js","webpack:///./src/main.js","webpack:///./src/components/NavigationBar/CodeModal.vue?8e41","webpack:///./src/components/BlocklyComponent.vue?1210"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","options","vueTourOptions","steps","staticRenderFns","staticStyle","_v","_s","$t","staticClass","directives","rawName","modifiers","configurationValidated","on","exportToCode","askForFile","load","save","component","undo","redo","clear","blockCount","cleanUp","clearDB","$event","changeLanguage","electronApp","_e","scopedSlots","_u","fn","proxy","botStarting","style","getBotImageStyle","class","getUsernameSpanClass","botTag","ref","onHidden","getHandleButtonClass","getTooltipContent","handle","domProps","content","_t","restrictions","registerRestrictions","blockName","blockRestrictions","decode","html","txt","document","createElement","innerHTML","disableUnapplicable","workspace","blocks","getAllBlocks","block","type","messages","issues","restriction","validateConfiguration","validateRestriction","message","Blockly","Msg","alert","setWarningText","join","reverse","startsWith","substring","types","includes","getTopLevelParent","filter","b","disabled","getParent","hasParentOfType","getInput","connection","targetBlock","e","console","log","hasParent","replace","x","blockData","init","jsonInit","code","ORDER_NONE","valueToCode","ORDER_ATOMIC","Blocks","JavaScript","statements","statementToCode","game","reaction","searchType","getFieldValue","BORDER_FIELDS","BORDER_TYPES","s4d_message_embed","setColour","setTooltip","setHelpUrl","BORDER_MUTATOR_MIXIN","inputs_","mutationToDom","container","setAttribute","domToMutation","xmlElement","getAttribute","toLowerCase","updateShape_","decompose","containerBlock","newBlock","appendDummyInput","setAlign","ALIGN_RIGHT","appendField","BaseBlockly","FieldCheckbox","toUpperCase","initSvg","compose","removeInput","appendValueInput","setCheck","Extensions","registerMutator","targetConnection","contentType","getSourceBlock","outputConnection","check_","channel","amount","server","member","time","statementThen","statementCatch","newName","role","roleType","permission","ORDER_FUNCTION_CALL","count","string","text","replaceWith","dataType","variableDB_","getName","NAME_TYPE","renameVar","msg","defaultValue","callback","Swal","fire","title","input","inputAttributes","autocapitalize","showCancelButton","confirmButtonText","showLoaderOnConfirm","allowOutsideClick","isLoading","then","Vue","use","Vuex","Store","state","blocklyLocale","navigator","language","split","tourDone","mutations","setWorkspace","setLocale","newLocale","localStorage","setItem","setTour","status","applyBlocklyLocale","blocklyMessages","websiteMessages","untitled","help","error","file","javascript","open","edit","cleanup","cleardb","lang","examples","confirm","cancel","yes","no","loaded","ping_pong","command_parsing","leveling","download","unzipFile","node","start","done","tour","skip","previous","next","finish","load_examples","run_test","export_code","warnings","login_block","run_modal","stop","invalid_token","here","code_modal","library","add","faPowerOff","FontAwesomeIcon","VueTour","VueToast","Vuei18n","VueSwal","BootstrapVue","IconsPlugin","config","productionTip","ignoredElements","en","customLocaleEN","fr","customLocaleFR","pt","customLocalePT","i18n","locale","mixin","methods","reloadWorkspace","$store","dom","Xml","workspaceToDom","dispose","newWorkspace","inject","getElementById","renderer","theme","Theme","grid","spacing","colour","snap","zoom","controls","startScale","maxScale","minScale","scaleSpeed","toolbox","domToWorkspace","commit","addChangeListener","Events","disableOrphans","setLanguage","blocklyLocaleEN","$root","$i18n","blocklyLocaleFR","blocklyLocalePT","getWorkspaceCode","workspaceToCode","store","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EA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vC,GAAe1D,qBAEf/M,KAAK8S,MAAMC,MAAMlC,OAAS,KAC1B,MACJ,IAAK,KAEDlM,IAAQ8H,UAAUwG,MAElBtC,GAAe5D,qBAEf/M,KAAK8S,MAAMC,MAAMlC,OAAS,KAC1B,MACJ,QACI,QAGZqC,iBAnEK,WAoED,OAAIlT,KAAKiR,OAAOhF,MAAMjI,UACtB,svCAuBMW,IAAQiC,WAAWuM,gBAAgBnT,KAAKiR,OAAOhF,MAAMjI,WAvB3D,wEADwC,OAiCpD,IAAI6H,aAAI,CACJuH,SACAC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,KACf3C,UACD4C,OAAO,S,oCC3JV,yBAAke,EAAG,G,oCCAre,yBAA+e,EAAG,G","file":"js/app.f03ff491.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('NavBarComponent',{attrs:{\"id\":\"navSpace\"}}),_c('BlocklyComponent',{attrs:{\"id\":\"blocklySpace\",\"options\":_vm.options}}),_c('v-tour',{attrs:{\"name\":\"start-tour\",\"steps\":_vm.vueTourOptions.steps,\"options\":_vm.vueTourOptions}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-navbar',{staticStyle:{\"background-color\":\"#161719\",\"user-select\":\"none\"},attrs:{\"toggleable\":\"lg\",\"type\":\"dark\",\"id\":\"navbar nav-main\"}},[_c('b-navbar-brand',[_c('img',{attrs:{\"src\":\"scratch.png\",\"width\":\"40\",\"draggable\":\"false\"}}),_vm._v(\" Scratch For Discord \")]),_c('b-navbar-toggle',{attrs:{\"target\":\"nav-collapse\"}}),_c('b-collapse',{attrs:{\"id\":\"nav-collapse\",\"is-nav\":\"\"}},[_c('b-navbar-nav',[_c('CodeModal'),_c('FileMenu'),_c('EditMenu'),_c('LanguageMenu'),_c('ExamplesMenu'),_c('b-nav-item',{attrs:{\"href\":\"https://androz2091.gitbook.io/scratch-for-discord/\",\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.$t('help')))])],1),_c('b-navbar-nav',{staticClass:\"ml-auto\"},[_c('RunModal'),_c('b-button',{staticStyle:{\"border-right-color\":\"#161719\",\"border-radius\":\"0em\",\"border-top-left-radius\":\"0.25em\",\"border-bottom-left-radius\":\"0.25em\"}},[_c('span',{attrs:{\"contenteditable\":\"true\",\"id\":\"docName\"}},[_vm._v(_vm._s(_vm.$t(\"untitled\")))])]),_c('b-button',{directives:[{name:\"b-modal\",rawName:\"v-b-modal.run-modal\",modifiers:{\"run-modal\":true}}],staticStyle:{\"border-right-color\":\"#161719\",\"border-radius\":\"0em\"},attrs:{\"id\":\"v-step-1\",\"disabled\":!_vm.configurationValidated}},[_c('b-icon-play')],1),_c('b-button',{staticStyle:{\"border-radius\":\"0em\",\"border-top-right-radius\":\"0.25em\",\"border-bottom-right-radius\":\"0.25em\"},attrs:{\"id\":\"v-step-2\",\"disabled\":!_vm.configurationValidated},on:{\"click\":_vm.exportToCode}},[_c('b-icon-download')],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('file.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":_vm.askForFile}},[_vm._v(_vm._s(_vm.$t('file.open')))]),_c('input',{attrs:{\"hidden\":\"\",\"id\":\"load-code\",\"type\":\"file\",\"accept\":\".s4d\"},on:{\"change\":_vm.load}}),_c('b-dropdown-item',{directives:[{name:\"b-modal\",rawName:\"v-b-modal.code-modal\",modifiers:{\"code-modal\":true}}]},[_vm._v(_vm._s(_vm.$t('file.javascript')))]),_c('b-dropdown-item',{on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t('file.save')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FileMenu.vue?vue&type=template&id=ffd127de&\"\nimport script from \"./FileMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./FileMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('edit.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":_vm.undo}},[_vm._v(_vm._s(_vm.$t('edit.undo')))]),_c('b-dropdown-item',{on:{\"click\":_vm.redo}},[_vm._v(_vm._s(_vm.$t('edit.redo')))]),_c('b-dropdown-item',{on:{\"click\":_vm.clear}},[_vm._v(_vm._s(_vm.$t('edit.clear', { blockCount: _vm.blockCount })))]),_c('b-dropdown-item',{on:{\"click\":_vm.cleanUp}},[_vm._v(_vm._s(_vm.$t('edit.cleanup')))]),_c('b-dropdown-item',{on:{\"click\":_vm.clearDB}},[_vm._v(_vm._s(_vm.$t('edit.cleardb')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./EditMenu.vue?vue&type=template&id=038d6629&\"\nimport script from \"./EditMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./EditMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('lang.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('en')}}},[_vm._v(\"English (EN)\")]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('fr')}}},[_vm._v(\"Français (FR)\")]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('pt')}}},[_vm._v(\"Português (PT)\")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LanguageMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LanguageMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./LanguageMenu.vue?vue&type=template&id=387469d2&\"\nimport script from \"./LanguageMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./LanguageMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"id\":\"run-modal\",\"hide-footer\":\"\",\"title\":_vm.$t('run_modal.title')}},[_c('div',{staticClass:\"d-block\"},[_c('b-container',[(!_vm.electronApp)?_c('b-row',[_c('i18n',{attrs:{\"path\":\"run_modal.disabled\",\"tag\":\"h5\"},scopedSlots:_vm._u([{key:\"here\",fn:function(){return [_c('a',{attrs:{\"href\":\"https://androz2091.github.io/scratch-for-discord/download/index.html\",\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.$t('run_modal.here')))])]},proxy:true}],null,false,608003906)})],1):_vm._e(),_c('hr'),_c('b-row',[_c('b-col',{attrs:{\"sm\":\"12\",\"lg\":\"8\"}},[_c('div',{staticClass:\"botinfos\"},[_c('b-overlay',{staticClass:\"d-inline-block\",attrs:{\"show\":_vm.botStarting,\"rounded\":\"circle\"}},[_c('div',{style:(_vm.getBotImageStyle())})]),_c('span',{class:_vm.getUsernameSpanClass()},[_vm._v(\"Logged in as \"+_vm._s(_vm.botTag || \"Unknown#0000\"))])],1)]),_c('b-col',[_c('div',{staticClass:\"handlebuttondiv\"},[_c('b-overlay',{ref:\"button\",staticClass:\"d-inline-block\",attrs:{\"show\":_vm.botStarting,\"rounded\":\"\",\"opacity\":\"0.6\",\"spinner-small\":\"\",\"spinner-variant\":\"primary\"},on:{\"hidden\":_vm.onHidden}},[_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover\",modifiers:{\"hover\":true}}],class:_vm.getHandleButtonClass(),attrs:{\"title\":_vm.getTooltipContent()},on:{\"click\":function($event){return _vm.handle()}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"power-off\"}})],1)],1)],1)])],1)],1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RunModal.vue?vue&type=template&id=0b32ad08&\"\nimport script from \"./RunModal.vue?vue&type=script&lang=js&\"\nexport * from \"./RunModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RunModal.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"id\":\"v-step-0\",\"text\":_vm.$t('examples.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('ping-pong')}}},[_vm._v(_vm._s(_vm.$t('examples.ping_pong')))]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('command-parsing')}}},[_vm._v(_vm._s(_vm.$t('examples.command_parsing')))]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('leveling')}}},[_vm._v(_vm._s(_vm.$t('examples.leveling')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export default `\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !ping\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n pong!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`;","export default `\r\n \r\n \r\n arguments\r\n command\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n SPLIT\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n command\r\n \r\n \r\n \r\n GET_REMOVE\r\n FROM_START\r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n command\r\n \r\n \r\n \r\n \r\n !say\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n You have written the following content after !say:\r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n JOIN\r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`;","export default `\r\n\r\n \r\n member_xp\r\n member_level\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n xp-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n level-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n xp-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n GT\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n level-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n Congratulations, \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n you jumped to level \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n !!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !level\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n , you are currently level: \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n , you need \r\n \r\n \r\n \r\n \r\n MINUS\r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n to jump to level \r\n \r\n \r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n`;","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExamplesMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExamplesMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ExamplesMenu.vue?vue&type=template&id=683767eb&\"\nimport script from \"./ExamplesMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./ExamplesMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"id\":\"code-modal\",\"title\":_vm.$t('code_modal.title'),\"ok-only\":\"\"}},[_c('textarea',{attrs:{\"disabled\":\"\",\"id\":\"code\"},domProps:{\"value\":_vm.content}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CodeModal.vue?vue&type=template&id=787d9541&\"\nimport script from \"./CodeModal.vue?vue&type=script&lang=js&\"\nexport * from \"./CodeModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CodeModal.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./NavigationBar.vue?vue&type=template&id=013b31d7&\"\nimport script from \"./NavigationBar.vue?vue&type=script&lang=js&\"\nexport * from \"./NavigationBar.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{ref:\"blocklyDiv\",staticClass:\"blocklyDiv\",attrs:{\"id\":\"blocklyDiv\"}}),_c('xml',{ref:\"blocklyToolbox\",staticStyle:{\"display\":\"none\"}},[_vm._t(\"default\")],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Blockly from \"blockly\";\r\n\r\nexport const restrictions = {};\r\n\r\nexport function registerRestrictions (blockName, blockRestrictions) {\r\n restrictions[blockName] = blockRestrictions;\r\n return;\r\n}\r\n\r\nconst decode = (html) => {\r\n const txt = document.createElement(\"textarea\");\r\n txt.innerHTML = html;\r\n return txt.value;\r\n}\r\n\r\nexport const disableUnapplicable = (workspace) => {\r\n\r\n // Gets all blocks in the workspace\r\n const blocks = workspace.getAllBlocks(false);\r\n \r\n // For each block of the workspace\r\n for (let block of blocks) {\r\n\r\n // Checks\r\n if (!block) continue;\r\n if (!restrictions[block.type]) restrictions[block.type] = [];\r\n\r\n const messages = [];\r\n let issues = 0;\r\n \r\n for (let restriction of restrictions[block.type]) {\r\n if (!validateConfiguration(block, restriction)) continue;\r\n \r\n if (!validateRestriction(block, blocks, restriction)) {\r\n if (restriction.message){\r\n if(Blockly.Msg[restriction.message]){\r\n messages.push(Blockly.Msg[restriction.message]);\r\n } else {\r\n window.alert(\"KEY NOT FOUND: \"+restriction.message);\r\n messages.push(decode(restriction.message));\r\n }\r\n }\r\n issues++;\r\n }\r\n }\r\n\r\n if (issues < 1) {\r\n block.setWarningText(null);\r\n } else {\r\n if (messages.length > 0){\r\n block.setWarningText(messages.join(\"\\n\"));\r\n }\r\n }\r\n }\r\n}\r\n \r\nfunction validateRestriction(block, blocks, restriction) {\r\n let reverse = false;\r\n let type = restriction.type;\r\n if (type !== \"custom\" && type.startsWith(\"!\")) {\r\n type = type.substring(1);\r\n reverse = true;\r\n }\r\n switch (type) {\r\n case \"toplevelparent\":\r\n return (restriction.types.includes(getTopLevelParent(block).type)) !== reverse;\r\n case \"blockexists\":\r\n return (blocks.filter(b => restriction.types.includes(b.type) && !b.disabled).length > 0) !== reverse;\r\n case \"parent\":\r\n return (restriction.types.includes(block.getParent().type)) !== reverse;\r\n case \"hasparent\":\r\n return (hasParentOfType(block, restriction.types)) !== reverse;\r\n case \"notempty\":\r\n for (let type of restriction.types){\r\n try {\r\n if (!block.getInput(type).connection.targetBlock()) return false;\r\n } catch(e){\r\n console.log(block.type);\r\n }\r\n }\r\n return true;\r\n default:\r\n return true;\r\n }\r\n}\r\n \r\nfunction validateConfiguration(block, restriction) {\r\n switch (restriction.type) {\r\n case \"toplevelparent\":\r\n case \"!toplevelparent\":\r\n return getTopLevelParent(block) && !getTopLevelParent(block).disabled;\r\n case \"blockexists\":\r\n case \"!blockexists\":\r\n return true;\r\n case \"parent\":\r\n case \"!parent\":\r\n return block.getParent() && !block.getParent().disabled;\r\n case \"hasparent\":\r\n case \"custom\":\r\n case \"notempty\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasParentOfType(block, types){\r\n let hasParent = false;\r\n while(block.getParent()){\r\n if(types.includes(block.getParent().type)){\r\n hasParent = true;\r\n }\r\n block = block.getParent();\r\n }\r\n return hasParent;\r\n}\r\n\r\nfunction getTopLevelParent(block) {\r\n if (!block) return null;\r\n if (!block.getParent()) return block;\r\n return getTopLevelParent(block.getParent());\r\n}\r\n","export default (Blockly) => {\r\n return (`\r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n AND\r\n \r\n \r\n \r\n TRUE\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n WHILE\r\n \r\n \r\n i\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n j\r\n \r\n \r\n BREAK\r\n \r\n \r\n \r\n \r\n 0\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n ROOT\r\n \r\n \r\n 9\r\n \r\n \r\n \r\n \r\n SIN\r\n \r\n \r\n 45\r\n \r\n \r\n \r\n \r\n PI\r\n \r\n \r\n \r\n EVEN\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n ROUND\r\n \r\n \r\n 3.1\r\n \r\n \r\n \r\n \r\n \r\n SUM\r\n \r\n \r\n \r\n \r\n 64\r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n \r\n \r\n 50\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n \r\n b\r\n \r\n \r\n \r\n\r\n \r\n \r\n item\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n FIRST\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n FROM_START\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n UPPERCASE\r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n BOTH\r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 5\r\n \r\n \r\n \r\n \r\n \r\n \r\n FIRST\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n GET\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n SET\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n SPLIT\r\n \r\n \r\n ,\r\n \r\n \r\n \r\n \r\n NUMERIC\r\n 1\r\n \r\n \r\n \r\n \r\n #ff0000\r\n \r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n 50\r\n \r\n \r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n #ff0000\r\n \r\n \r\n \r\n \r\n #3333ff\r\n \r\n \r\n \r\n \r\n 0.5\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 2\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ REPLY_EXAMPLE }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 👍\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ SEND_WAIT_REPLY_EXAMPLE }}\r\n \r\n \r\n \r\n \r\n 5\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n 2\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n points\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n points\r\n \r\n \r\n \r\n \r\n \r\n`.replace(/{{\\s([A-z]{3,})\\s}}/g, (x) => {\r\n return Blockly.Msg[x.replace(\"{{ \", \"\").replace(\" }}\", \"\")];\r\n}))};","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BlocklyComponent.vue?vue&type=template&id=180ad633&scoped=true&\"\nimport script from \"./BlocklyComponent.vue?vue&type=script&lang=js&\"\nexport * from \"./BlocklyComponent.vue?vue&type=script&lang=js&\"\nimport style0 from \"./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"180ad633\",\n null\n \n)\n\nexport default component.exports","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_bot_ping\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BOT_PING}\",\r\n \"colour\": \"#5b67a5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Number\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.client.ws.ping\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_bot_server_count\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BOT_SERVER_COUNT}\",\r\n \"colour\": \"#5b67a5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Number\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.client.guilds.cache.size\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_login\";\r\n\r\nconst blockData = {\r\n \"type\": \"block_type\",\r\n \"message0\": \"%{BKY_LOGIN}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TOKEN\",\r\n \"check\": \"String\"\r\n }\r\n ],\r\n \"colour\": \"#F46580\",\r\n \"tooltip\": \"%{BKY_LOGIN_TOOLTIP}\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const value = Blockly.JavaScript.valueToCode(block, \"TOKEN\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `await s4d.client.login(${value}).catch((e) => { s4d.tokenInvalid = true; s4d.tokenError = e; });\\n`;\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_connected\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_CONNECTED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ],\r\n \"tooltip\": \"%{BKY_ON_CONNECTED_TOOLTIP}\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('ready', async () => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_bot_game\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_BOT_GAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"GAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const game = Blockly.JavaScript.valueToCode(block, \"GAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `s4d.client.user.setActivity(String(${game}));\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_GAME\",\r\n types: [\r\n \"GAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_add_reaction\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_REACTION}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"REACTION\",\r\n \"check\": \"String\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const reaction = Blockly.JavaScript.valueToCode(block, \"REACTION\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `s4dmessage.react(${reaction});`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_REACTION_MISSING_REACTION\",\r\n types: [\r\n \"REACTION\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_delete\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_DELETE_MESSAGE}\",\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(){\r\n const code = `s4dmessage.delete();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_mentioned_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MENTIONED_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Member\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [`s4dmessage.mentions.members.first()`, Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_ID}\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"output\": \"String\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_author\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_AUTHOR}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.member\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_author_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_AUTHOR_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4dmessage.author.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4dmessage.author.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"(s4dmessage.member || await s4dmessage.guild.members.fetch(s4dmessage.author.id)).nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CHANNEL}\",\r\n \"colour\": \"#a55b80\",\r\n \"output\": \"Channel\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.channel\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_channel_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CHANNEL_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"(s4dmessage.channel || {}).id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"(s4dmessage.channel || {}).name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_content\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CONTENT}\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"output\": \"String\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.content\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import BaseBlockly from \"blockly\";\r\nimport Blockly from \"blockly/core\";\r\n\r\n\r\nconst BORDER_FIELDS = [ \"MESSAGE\", \"COLOR\", \"TITLE\", \"IMAGE\",\"FOOTER\", \"THUMBNAIL\"];\r\n\r\nconst BORDER_TYPES = [ \"String\", \"Colour\", \"String\", \"String\",\"String\", \"String\" ];\r\n\r\n\r\nconst s4d_message_embed = {\r\n \"message0\": \"%{BKY_MESSAGE_EMBED}\",\r\n \"mutator\": \"s4d_message_embed_mutator\",\r\n \"output\": \"MessageEmbed\",\r\n \"helpUrl\": \"\",\r\n \"tooltip\": \"\",\r\n \"colour\": \"#40BF4A\"\r\n};\r\n\r\nBlockly.Blocks[\"s4d_message_embed\"] = {\r\n init: function() {\r\n this.jsonInit(s4d_message_embed);\r\n }\r\n};\r\n\r\nBlockly.Blocks[\"s4d_message_embed_mutator\"] = {\r\n init: function() {\r\n this.setColour(\"#CECDCE\");\r\n this.setTooltip(\"\");\r\n this.setHelpUrl(\"\");\r\n }\r\n};\r\n\r\nconst BORDER_MUTATOR_MIXIN = {\r\n inputs_: [ true, false, false, false ,false,false],\r\n\r\n\r\n mutationToDom: function() {\r\n if (!this.inputs_) {\r\n return null;\r\n }\r\n const container = document.createElement(\"mutation\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) container.setAttribute(BORDER_FIELDS[i], this.inputs_[i])\r\n }\r\n return container;\r\n },\r\n \r\n domToMutation: function(xmlElement) {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = xmlElement.getAttribute(BORDER_FIELDS[i].toLowerCase()) == \"true\";\r\n }\r\n this.updateShape_();\r\n },\r\n\r\n decompose: function(workspace) {\r\n const containerBlock = workspace.newBlock(\"s4d_message_embed_mutator\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n containerBlock.appendDummyInput()\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]])\r\n .appendField(new Blockly.FieldCheckbox(this.inputs_[i] ? \"TRUE\" : \"FALSE\"), BORDER_FIELDS[i].toUpperCase());\r\n }\r\n containerBlock.initSvg();\r\n return containerBlock;\r\n },\r\n\r\n compose: function(containerBlock) {\r\n // Set states\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = (containerBlock.getFieldValue(BORDER_FIELDS[i].toUpperCase()) == \"TRUE\"); \r\n }\r\n this.updateShape_();\r\n },\r\n\r\n updateShape_: function() {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.getInput(BORDER_FIELDS[i].toUpperCase())) this.removeInput(BORDER_FIELDS[i].toUpperCase());\r\n }\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) {\r\n this.appendValueInput(BORDER_FIELDS[i].toUpperCase())\r\n .setCheck(BORDER_TYPES[i])\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]]);\r\n }\r\n }\r\n }\r\n};\r\n\r\nBlockly.Extensions.registerMutator(\"s4d_message_embed_mutator\", BORDER_MUTATOR_MIXIN, null, [\"\"]);\r\n\r\nBlockly.JavaScript[\"s4d_message_embed\"] = function(block){\r\n return [ `\r\n {\r\n embed: {\r\n title: ${Blockly.JavaScript.valueToCode(block, \"TITLE\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n color: ${Blockly.JavaScript.valueToCode(block, \"COLOR\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n image: { url: ${Blockly.JavaScript.valueToCode(block, \"IMAGE\", Blockly.JavaScript.ORDER_ATOMIC) || null} }, \r\n\r\n description: ${Blockly.JavaScript.valueToCode(block, \"MESSAGE\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n footer: { text: ${Blockly.JavaScript.valueToCode(block, \"FOOTER\", Blockly.JavaScript.ORDER_ATOMIC) || null} },\r\n thumbnail: { url: ${Blockly.JavaScript.valueToCode(block, \"THUMBNAIL\", Blockly.JavaScript.ORDER_ATOMIC) || null} }\r\n\r\n }\r\n }\r\n `, Blockly.JavaScript.ORDER_ATOMIC ];\r\n};","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"(s4dmessage.guild || {}).id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"(s4dmessage.guild || {}).name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_message\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MESSAGE} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('messageCreate', async (s4dmessage) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_reply\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REPLY}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"Number\", \"String\", \"MessageEmbed\" ]\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `s4dmessage.channel.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `s4dmessage.channel.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `s4dmessage.channel.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_purge\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_PURGE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"AMOUNT\",\r\n \"check\": \"Number\" \r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"inputsInline\": true,\r\n \"colour\": \"#1a75ff\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const amount = Blockly.JavaScript.valueToCode(block, \"AMOUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${channel}.bulkDelete((${amount}|1))`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_PURGE_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_PURGE_AMOUNT\",\r\n types: [\r\n \"AMOUNT\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.joiningMember.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.joiningMember.guild.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"s4d.joiningMember.guild.name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.joiningMember\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_member_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_MEMBER_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.joiningMember.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4d.joiningMember.user.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"s4d.joiningMember.nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_member_join\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MEMBER_JOIN} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('guildMemberAdd', async (param1) => {\\ns4d.joiningMember = param1;\\n${statements}s4d.joiningMember = null\\n});\\n`;\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.leavingMember.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.leavingMember.guild.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"s4d.leavingMember.guild.name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_member_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_MEMBER_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.leavingMember.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4d.leavingMember.user.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"s4d.leavingMember.nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_member_leave\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MEMBER_LEAVE} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('guildMemberRemove', async (param1) => {\\ns4d.leavingMember = param1;\\n${statements}s4d.leavingMember = null\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_react_added\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_REACT_ADDED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('MESSAGE_REACTION_ADD', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_react_removed\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_REACT_REMOVED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('MESSAGE_REACTION_REMOVED', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_emoji\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_EMOJI}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rEmoji\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rMember\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_message_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_MESSAGE_ID}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rMessage.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_create_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_CREATE_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NAME\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": [ \"Server\" ]\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_TEXT}\",\r\n \"TEXT\"\r\n ],\r\n [\r\n \"%{BKY_VOICE}\",\r\n \"VOICE\"\r\n ],\r\n [\r\n \"%{BKY_CATEGORY}\",\r\n \"CATEGORY\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"inputsInline\": false,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const type = block.getFieldValue(\"TYPE\");\r\n const name = Blockly.JavaScript.valueToCode(block, \"NAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${server}.channels.create(${name}, {\r\n type: '${type.toLowerCase()}'\r\n });\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#a55b80\",\r\n \"output\": \"Channel\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"NAME\"){\r\n return [ `s4d.client.channels.cache.find((channel) => channel.name === ${value})`, Blockly.JavaScript.ORDER_ATOMIC ];\r\n } else {\r\n return [ `s4d.client.channels.cache.get(${value})`, Blockly.JavaScript.ORDER_ATOMIC ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_CHANNEL_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `${channel}.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `${channel}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${channel}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_wait_reply\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_WAIT_REPLY}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TIME\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"THEN\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"CATCH\"\r\n }\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const time = Blockly.JavaScript.valueToCode(block, \"TIME\", Blockly.JavaScript.ORDER_ATOMIC) || 5;\r\n const statementThen = Blockly.JavaScript.statementToCode(block, \"THEN\");\r\n const statementCatch = Blockly.JavaScript.statementToCode(block, \"CATCH\");\r\n let code = \"\";\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n code = `${channel}.send(${content});\\n`;\r\n } else {\r\n code = `${channel}.send(String(${content}));\\n`;\r\n }\r\n } else {\r\n code = `${channel}.send(String(${content}));\\n`;\r\n }\r\n code += `${channel}.awaitMessages((m) => m.author.id === ${member}.id, { time: (${time}*60*1000), max: 1 }).then(async (collected) => { s4d.reply = collected.first().content; \\n ${statementThen} \\n s4d.reply = null; }).catch(async (e) => { console.error(e); ${statementCatch} });`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_wait_reply_value\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_WAIT_REPLY_VALUE}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(){\r\n const code = [\"s4d.reply\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"hasparent\",\r\n message: \"RES_SEND_WAIT_REPLY_VALUE_PARENT\",\r\n types: [\r\n \"s4d_send_wait_reply\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_boost_level\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_BOOST_LEVEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Number\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.premiumTier`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_server\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_SERVER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"NAME\"){\r\n return [ `s4d.client.guilds.cache.find((guild) => guild.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `s4d.client.guilds.cache.get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_SERVER_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_icon_url\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ICON_URL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.iconURL({ dynamic: true })`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_count\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_COUNT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Number\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.memberCount`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_server_name\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_NAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.name`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_server_owner\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_OWNER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.owner || await ${server}.members.fetch(${server}.ownerID)`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_server_name\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_SERVER_NAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NEW_NICKNAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const newName = Blockly.JavaScript.valueToCode(block, \"NEW_NICKNAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${server}.setName(${newName});\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_SERVER_NAME_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_SERVER_NAME_NEW_NICKNAME\",\r\n types: [\r\n \"NEW_NICKNAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_add_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"ROLE\",\r\n \"check\": [ \"String\", \"Role\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const role = Blockly.JavaScript.valueToCode(block, \"ROLE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"ROLE\").connection.targetConnection){\r\n const roleType = block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if(roleType === \"String\"){\r\n const code = `${member}.roles.add(${member}.guild.roles.cache.find((role) => role.id === ${role} || role.name === ${role} || '@'+role.name === ${role}));\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.roles.add(${role});\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.roles.add(${role});\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_ROLE_MISSING_ROLE\",\r\n types: [\r\n \"ROLE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_ROLE_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport BaseBlockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst BORDER_FIELDS = [ \"GET_ROLE_SERVER\" ];\r\n\r\nconst BORDER_TYPES = [ \"Server\" ];\r\n\r\nconst blockName = \"s4d_get_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#2EB66B\",\r\n \"output\": \"Role\",\r\n \"mutator\": \"s4d_get_role_mutator\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.Blocks[\"s4d_get_role_mutator\"] = {\r\n init: function() {\r\n this.setColour(\"#CECDCE\");\r\n this.setTooltip(\"\");\r\n this.setHelpUrl(\"\");\r\n }\r\n};\r\n\r\nconst BORDER_MUTATOR_MIXIN = {\r\n inputs_: [ false ],\r\n\r\n mutationToDom: function() {\r\n if (!this.inputs_) {\r\n return null;\r\n }\r\n const container = document.createElement(\"mutation\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) container.setAttribute(BORDER_FIELDS[i], this.inputs_[i])\r\n }\r\n return container;\r\n },\r\n \r\n domToMutation: function(xmlElement) {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = xmlElement.getAttribute(BORDER_FIELDS[i]) == \"true\";\r\n }\r\n this.updateShape_();\r\n },\r\n\r\n decompose: function(workspace) {\r\n const containerBlock = workspace.newBlock(\"s4d_get_role_mutator\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n containerBlock.appendDummyInput()\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]])\r\n .appendField(new Blockly.FieldCheckbox(this.inputs_[i] ? \"TRUE\" : \"FALSE\"), BORDER_FIELDS[i].toUpperCase());\r\n }\r\n containerBlock.initSvg();\r\n return containerBlock;\r\n },\r\n\r\n compose: function(containerBlock) {\r\n // Set states\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = (containerBlock.getFieldValue(BORDER_FIELDS[i].toUpperCase()) == \"TRUE\"); \r\n }\r\n this.updateShape_();\r\n },\r\n\r\n updateShape_: function() {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.getInput(BORDER_FIELDS[i].toUpperCase())) this.removeInput(BORDER_FIELDS[i].toUpperCase());\r\n }\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) {\r\n this.appendValueInput(BORDER_FIELDS[i].toUpperCase())\r\n .setCheck(BORDER_TYPES[i])\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]]);\r\n }\r\n }\r\n }\r\n};\r\n\r\nBlockly.Extensions.registerMutator(\"s4d_get_role_mutator\", BORDER_MUTATOR_MIXIN, null, [\"\"]);\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n const server = block.getFieldValue(\"GET_ROLE_SERVER\");\r\n if(searchType === \"NAME\"){\r\n if(server){\r\n return [ `${server}.roles.cache.find((role) => role.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).find((role) => role.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n } else {\r\n if(server){\r\n return [ `${server}.roles.get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_ROLE_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_remove_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REMOVE_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"ROLE\",\r\n \"check\": [ \"String\", \"Role\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const role = Blockly.JavaScript.valueToCode(block, \"ROLE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"ROLE\").connection.targetConnection){\r\n const roleType = block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if(roleType === \"String\"){\r\n const code = `${member}.roles.remove(${member}.guild.roles.cache.find((role) => role.id === ${role} || role.name === ${role} || '@'+role.name === ${role}));\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.roles.remove(${role});\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.roles.remove(${role});\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REMOVE_ROLE_MISSING_ROLE\",\r\n types: [\r\n \"ROLE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REMOVE_ROLE_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_ban_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BAN_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.ban();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_BAN_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(searchType === \"USERNAME\"){\r\n return [ `${server}.members.cache.find((m) => m.user.username === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `(${server}.members.cache.get(${value}) || await ${server}.members.fetch(${value}))`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_MEMBER_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_MEMBER_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_kick_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_KICK_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.kick();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_KICK_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_discriminator\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_DISCRIMINATOR}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.discriminator`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_has_permission\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_HAS_PERMISSION}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"PERMISSION\",\r\n \"options\": [\r\n [\r\n \"%{BKY_PERM_CREATE_INSTANT_INVITE}\",\r\n \"CREATE_INSTANT_INVITE\"\r\n ],\r\n [\r\n \"%{BKY_PERM_KICK_MEMBERS}\",\r\n \"KICK_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_BAN_MEMBERS}\",\r\n \"BAN_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ADMINISTRATOR}\",\r\n \"ADMINISTRATOR\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_CHANNELS}\",\r\n \"MANAGE_CHANNELS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_GUILD}\",\r\n \"MANAGE_GUILD\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ADD_REACTIONS}\",\r\n \"ADD_REACTIONS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_VIEW_AUDIT_LOG}\",\r\n \"VIEW_AUDIT_LOG\"\r\n ],\r\n [\r\n \"%{BKY_PERM_PRIORITY_SPEAKER}\",\r\n \"PRIORITY_SPEAKER\"\r\n ],\r\n [\r\n \"%{BKY_PERM_VIEW_CHANNEL}\",\r\n \"VIEW_CHANNEL\"\r\n ],\r\n [\r\n \"%{BKY_PERM_READ_MESSAGES}\",\r\n \"READ_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SEND_MESSAGES}\",\r\n \"SEND_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SEND_TTS_MESSAGES}\",\r\n \"SEND_TTS_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_MESSAGES}\",\r\n \"MANAGE_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_EMBED_LINKS}\",\r\n \"EMBED_LINKS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ATTACH_FILES}\",\r\n \"ATTACH_FILES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_READ_MESSAGE_HISTORY}\",\r\n \"READ_MESSAGE_HISTORY\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MENTION_EVERYONE}\",\r\n \"MENTION_EVERYONE\"\r\n ],\r\n [\r\n \"%{BKY_PERM_EXTERNAL_EMOJIS}\",\r\n \"EXTERNAL_EMOJIS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_USE_EXTERNAL_EMOJIS}\",\r\n \"USE_EXTERNAL_EMOJIS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_CONNECT}\",\r\n \"CONNECT\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SPEAK}\",\r\n \"SPEAK\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MUTE_MEMBERS}\",\r\n \"MUTE_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_DEAFEN_MEMBERS}\",\r\n \"DEAFEN_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MOVE_MEMBERS}\",\r\n \"MOVE_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_USE_VAD}\",\r\n \"USE_VAD\"\r\n ],\r\n [\r\n \"%{BKY_PERM_CHANGE_NICKNAME}\",\r\n \"CHANGE_NICKNAME\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_NICKNAMES}\",\r\n \"MANAGE_NICKNAMES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_ROLES}\",\r\n \"MANAGE_ROLES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_WEBHOOKS}\",\r\n \"MANAGE_WEBHOOKS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_EMOJIS}\",\r\n \"MANAGE_EMOJIS\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#5B80A5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Boolean\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const permission = block.getFieldValue(\"PERMISSION\");\r\n const code = [ `${member}.hasPermission('${permission}')`, Blockly.JavaScript.ORDER_FUNCTION_CALL ];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_MEMBER_HAS_PERMISSION\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_ID}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.id`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_is_bot\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_IS_BOT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#5B80A5\",\r\n \"output\": \"Boolean\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.bot`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_tag\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_TAG}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.tag`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_username\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_USERNAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.username`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `${member}.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_member_nickname\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_MEMBER_NICKNAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NEW_NICKNAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const newName = Blockly.JavaScript.valueToCode(block, \"NEW_NICKNAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.setNickname(${newName});\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_MEMBER_NICKNAME_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_MEMBER_NICKNAME_NEW_NICKNAME\",\r\n types: [\r\n \"NEW_NICKNAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_add_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"COUNT\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"nextStatement\": null,\r\n \"previousStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const count = Blockly.JavaScript.valueToCode(block, \"COUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.add(String(${key}), parseInt(${count}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_delete_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_DELETE_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.delete(String(${key}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_get_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"output\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ 's4d.database.get(String('+key+'))', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_has_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_HAS_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ 's4d.database.has(String('+key+'))', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_set_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.set(String(${key}), ${value});\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_subtract_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SUBTRACT_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"COUNT\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"nextStatement\": null,\r\n \"previousStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const count = Blockly.JavaScript.valueToCode(block, \"COUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.subtract(String(${key}), parseInt(${count}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_newline\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_NEWLINE}\",\r\n \"output\": \"String\",\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n return [ '\\'\\\\n\\'', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_starts_with\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_STARTS_WITH}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"STRING\",\r\n \"check\": [ \"String\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SUBSTRING\",\r\n \"check\": [ \"String\" ]\r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const string = Blockly.JavaScript.valueToCode(block, \"STRING\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const substring = Blockly.JavaScript.valueToCode(block, \"SUBSTRING\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [ `(${string} || '').startsWith(${substring} || '')`, Blockly.JavaScript.ORDER_NONE ];\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_includes\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_INCLUDES}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TEXT\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"INCLUDES\",\r\n \"check\": \"String\" \r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const text = Blockly.JavaScript.valueToCode(block, \"TEXT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const includes = Blockly.JavaScript.valueToCode(block, \"INCLUDES\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [`String(${text}).includes(String(${includes}))`, Blockly.JavaScript.ORDER_NONE];\r\n \r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_INCLUDES_TEXT\",\r\n types: [\r\n \"TEXT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_INCLUDES_INCLUDES\",\r\n types: [\r\n \"INCLUDES\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_replace\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REPLACE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TEXT\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"REPLACE\",\r\n \"check\": \"String\" \r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"WITH\",\r\n \"check\": \"String\" \r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const text = Blockly.JavaScript.valueToCode(block, \"TEXT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const replace = Blockly.JavaScript.valueToCode(block, \"REPLACE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const replaceWith = Blockly.JavaScript.valueToCode(block, \"WITH\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [`String(${text}).replace(new RegExp(String(${replace}), 'g'), String(${replaceWith}))`, Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_STRING\",\r\n types: [\r\n \"TEXT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_REPLACE\",\r\n types: [\r\n \"REPLACE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_WITH\",\r\n types: [\r\n \"WITH\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_forever\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_FOREVER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENT\"\r\n }\r\n ],\r\n \"colour\": \"#5BA55B\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n return `\r\n while(s4d.client && s4d.client.token) {\r\n await delay(50);\r\n ${Blockly.JavaScript.statementToCode(block, 'STATEMENT')}\r\n console.log('ran')\r\n }\r\n `;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_current\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_CURRENT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"DATA_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_SECOND}\",\r\n \"SECOND\"\r\n ],\r\n [\r\n \"%{BKY_MINUTE}\",\r\n \"MINUTE\"\r\n ],\r\n [\r\n \"%{BKY_HOUR}\",\r\n \"HOUR\"\r\n ],\r\n [\r\n \"%{BKY_DATE}\",\r\n \"DATE\"\r\n ],\r\n [\r\n \"%{BKY_DAY_OF_WEEK}\",\r\n \"DAY_OF_WEEK\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"Number\",\r\n \"colour\": \"#D14081\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const dataType = block.getFieldValue(\"DATA_TYPE\");\r\n if(dataType === \"SECOND\"){\r\n return [\"(new Date().getSeconds())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"MINUTE\"){\r\n return [\"(new Date().getMinutes())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"HOUR\"){\r\n return [\"(new Date().getHours())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"DATE\"){\r\n return [\"(new Date().getDate())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"DAY_OF_WEEK\"){\r\n return [\"(new Date().getDay())\", Blockly.JavaScript.ORDER_NONE];\r\n }\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_run_save_output\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_RUN_SAVE_OUTPUT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENT\",\r\n \"check\": \"RunnableActionWithResult\"\r\n },\r\n {\r\n \"type\": \"field_variable\",\r\n \"name\": \"VAR\",\r\n \"variable\": null\r\n }\r\n ],\r\n \"colour\": \"#D14081\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\",\r\n \"inputsInline\": false,\r\n \"previousStatement\": null,\r\n \"nextStatement\": null\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const code = `${Blockly.JavaScript.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE)} = await ${Blockly.JavaScript.statementToCode(block, 'STATEMENT')}`\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"custom\",\r\n message: \"The 'run' block must encapsulate exactly one statement\",\r\n code: \"if (block.getFirstStatementConnection().isConnected()) _return = !block.getFirstStatementConnection().targetBlock().getNextBlock(); else _return = false;\"\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_wait_seconds\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_WAIT_SECONDS}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TIME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"colour\": \"#D14081\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const time = Blockly.JavaScript.valueToCode(block, \"TIME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `await delay(Number(${time})*1000);\\n`;\r\n};","/* eslint-disable no-import-assign */\r\n/**\r\n * @license\r\n * \r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * @fileoverview Define custom blocks.\r\n * @author abbychau@gmail.com (Abby Chau)\r\n */\r\n\r\n\r\nimport * as Blockly from 'blockly/core';\r\nimport Swal from \"sweetalert2\";\r\n\r\nvar renameVar = function(name) {\r\n return name;\r\n};\r\n\r\nBlockly.prompt = function(msg, defaultValue, callback) {\r\n\tSwal.fire({\r\n\t\ttitle: \"Variable:\",\r\n\t\tinput: \"text\",\r\n\t\tinputAttributes: {\r\n\t\t\tautocapitalize: \"off\"\r\n\t\t},\r\n\t\tshowCancelButton: true,\r\n\t\tconfirmButtonText: \"Look up\",\r\n\t\tshowLoaderOnConfirm: true,\r\n\t\tallowOutsideClick: () => !Swal.isLoading()\r\n\t}).then(result => {\r\n\t\tif (result.value) {\r\n\t\t\tcallback(renameVar(result.value));\r\n\t\t}\r\n\t});\r\n};\r\n","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=f22da3c4&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue';\r\nimport Vuex from 'vuex';\r\n\r\nVue.use(Vuex);\r\n\r\nexport default new Vuex.Store({\r\n state: {\r\n workspace: 0,\r\n blocklyLocale: ([\"en\", \"fr\"].includes(navigator.language.split(\"-\")[0]) ? navigator.language.split(\"-\")[0] : \"en\"),\r\n tourDone: false\r\n },\r\n mutations: {\r\n setWorkspace (state, { workspace }) {\r\n state.workspace = workspace;\r\n },\r\n setLocale (state, { newLocale }) {\r\n state.blocklyLocale = newLocale;\r\n localStorage.setItem('blocklyLocale', newLocale);\r\n },\r\n setTour (state, { status }){\r\n state.tourDone = status;\r\n localStorage.setItem('tourDone', status);\r\n }\r\n }\r\n});\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./en-US.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Untitled document\",\r\n help: \"Help\",\r\n load: {\r\n error: \"The uploaded file is corrupted and cannot be loaded by Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"File\",\r\n javascript: \"Export to Javascript\",\r\n open: \"Open a file...\",\r\n save: \"Save\"\r\n },\r\n edit: {\r\n title: \"Edit\",\r\n undo: \"Undo\",\r\n redo: \"Redo\",\r\n clear: \"Clear {blockCount} blocks\",\r\n cleanup: \"Clean up blocks\",\r\n cleardb: \"Clear the database\"\r\n },\r\n lang: {\r\n title: \"Language\"\r\n },\r\n examples: {\r\n title: \"Examples\",\r\n confirm: {\r\n title: \"Delete current blocks?\",\r\n text: \"Would you like to remove the blocks from the current project before importing the example?\",\r\n cancel: \"Cancel\",\r\n yes: \"Yes\",\r\n no: \"No\"\r\n },\r\n loaded: \"Example {example} successfully imported!\",\r\n ping_pong: \"ping-pong command\",\r\n command_parsing: \"commands handler\",\r\n leveling: \"XP and levels system\"\r\n },\r\n download: {\r\n title: \"Download your bot\",\r\n content: {\r\n title: \"How to start your bot once downloaded?\",\r\n unzipFile: \"Unzip the downloaded file.\",\r\n node: \"Install NPM and Node.js (search for tutorials on Google)\",\r\n start: \"Run 'npm install' and 'npm start' in a terminal\",\r\n done: \"Your bot is started!\"\r\n },\r\n cancel: \"Cancel\",\r\n confirm: \"Download\"\r\n },\r\n tour: {\r\n skip: \"Skip tour\",\r\n previous: \"Previous\",\r\n next: \"Next\",\r\n finish: \"Finish\",\r\n steps: {\r\n load_examples: \"Import examples to discover Scratch4Discord!\",\r\n run_test: \"Test the functionalities of your bot here!\",\r\n export_code: \"Export your code here!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"The \\\"Connect to Discord\\\" block in the \\\"Base\\\" category is mandatory.\"\r\n },\r\n run_modal: {\r\n title: \"Click Start to test your bot!\",\r\n start: \"Start the bot\",\r\n stop: \"Stop the bot\",\r\n invalid_token: \"Unable to connect to Discord... Maybe the bot's token isn't valid!\",\r\n error: \"Unable to connect to Discord... Try again later!\",\r\n disabled: \"⚠️ This feature is only available using the Scratch For Discord App (get it {here})\",\r\n here: \"here\"\r\n },\r\n code_modal: {\r\n title: \"JavaScript code of your bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./fr-FR.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Document sans titre\",\r\n help: \"Aide\",\r\n load: {\r\n error: \"Le fichier téléversé est corrompu et ne peut pas être chargé par Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"Fichier\",\r\n javascript: \"Exporter vers Javascript\",\r\n open: \"Ouvrir un fichier...\",\r\n save: \"Sauvegarder\"\r\n },\r\n edit: {\r\n title: \"Modifier\",\r\n undo: \"Annuler\",\r\n redo: \"Rétablir\",\r\n clear: \"Nettoyer {blockCount} blocks\",\r\n cleanup: \"Réorganiser les blocks\",\r\n cleardb: \"Effacer la base de données\"\r\n },\r\n lang: {\r\n title: \"Langue\"\r\n },\r\n examples: {\r\n title: \"Exemples\",\r\n confirm: {\r\n title: \"Supprimer les blocks\",\r\n text: \"Souhaitez-vous supprimer les blocks du projet actuel avant d'importer l'exemple ?\",\r\n cancel: \"Annuler\",\r\n yes: \"Oui\",\r\n no: \"Non\"\r\n },\r\n loaded: \"Exemple {example} importé avec succès !\",\r\n ping_pong: \"Commande ping-pong\",\r\n command_parsing: \"Traitement des commandes\",\r\n leveling: \"Système d'XP et niveaux\"\r\n },\r\n download: {\r\n title: \"Télécharger votre bot\",\r\n content: {\r\n title: \"Comment lancer votre bot une fois le bot téléchargé ?\",\r\n unzipFile: \"Dézippez le fichier obtenu.\",\r\n node: \"Installez NPM et Node.js (cherchez des tutos sur google)\",\r\n start: \"Tapez 'npm install' et 'npm start' dans votre terminal\",\r\n done: \"Votre bot est lancé!\"\r\n },\r\n cancel: \"Annuler\",\r\n confirm: \"Télécharger\"\r\n },\r\n tour: {\r\n skip: \"Sauter la visite\",\r\n previous: \"Précédent\",\r\n next: \"Suivant\",\r\n finish: \"Finir\",\r\n steps: {\r\n load_examples: \"Importer des exemples pour découvrir Scratch4Discord!\",\r\n run_test: \"Testez le fonctionnement de votre bot ici!\",\r\n export_code: \"Exportez votre code ici!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"Le block \\\"Connexion à Discord\\\" de la catégorie \\\"Base\\\" est obligatoire !\"\r\n },\r\n run_modal: {\r\n title: \"Appuyez sur démarrer pour tester votre bot!\",\r\n start: \"Démarrer le bot\",\r\n stop: \"Arrêter le bot\",\r\n invalid_token: \"Impossible de se connecter à Discord... Peut-être que le token du bot n'est pas valide !\",\r\n error: \"Impossible de se connecter à Discord... Réessayez plus tard!\",\r\n disabled: \"⚠️ Cette fonction n'est disponible qu'avec l'application Scratch For Discord (obtenez la {here})\",\r\n here: \"ici\"\r\n },\r\n code_modal: {\r\n title: \"Code JavaScript de votre bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./pt-BR.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Documento sem nome\",\r\n help: \"Ajuda\",\r\n load: {\r\n error: \"O arquivo enviado está corrompido e não pode ser carregado pelo Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"Arquivo\",\r\n javascript: \"Exporta para javascirpt\",\r\n open: \"abrir arquivo...\",\r\n save: \"Salva\"\r\n },\r\n edit: {\r\n title: \"Edita\",\r\n undo: \"desfazer\",\r\n redo: \"refazer\",\r\n clear: \"deleta {blockCount} blocos\",\r\n cleanup: \"limpa blocos\",\r\n cleardb: \"limpa database\"\r\n },\r\n lang: {\r\n title: \"linguagem\"\r\n },\r\n examples: {\r\n title: \"Exemplos\",\r\n confirm: {\r\n title: \"Deleta os blocos atual?\",\r\n text: \"Você gostaria de remover os blocos do projeto atual antes de importar o exemplo?\",\r\n cancel: \"Cancela\",\r\n yes: \"Sim\",\r\n no: \"Não\"\r\n },\r\n loaded: \"Exemplo {example} importando com sucesso!\",\r\n ping_pong: \"comando ping-pong\",\r\n command_parsing: \"handler de comandos\",\r\n leveling: \"XP e sistema de níveis\"\r\n },\r\n download: {\r\n title: \"Instale o seu bot\",\r\n content: {\r\n title: \"Como iniciar o seu bot depois de baixado?\",\r\n unzipFile: \"Descompacte o arquivo baixado.\",\r\n node: \"Instale o NPM e o Node.js (pesquise tutoriais no Google)\",\r\n start: \"Execute 'npm install' e 'npm start' em um terminal\",\r\n done: \"Seu bot foi iniciado!\"\r\n },\r\n cancel: \"Cancela\",\r\n confirm: \"Instala\"\r\n },\r\n tour: {\r\n skip: \"Pular tour\",\r\n previous: \"Anterior\",\r\n next: \"Próximo\",\r\n finish: \"Termina\",\r\n steps: {\r\n load_examples: \"Importe exemplos para descobrir Scratch4Discord!\",\r\n run_test: \"Teste as funcionalidades do seu bot aqui!\",\r\n export_code: \"Exporte seu código aqui!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"O bloco \\\"Conectar ao Discord\\\" na categoria \\\"Base\\\" é obrigatório.\"\r\n },\r\n run_modal: {\r\n title: \"Clique em Iniciar para testar seu bot!\",\r\n start: \"Inicie o bot\",\r\n stop: \"Pare o bot\",\r\n invalid_token: \"Unable to connect to Discord... Maybe the bot's token isn't valid!\",\r\n error: \"Incapaz de conectar ao Discord ... Talvez o token do bot não seja válido!\",\r\n disabled: \"⚠️ Este recurso está disponível apenas usando o aplicativo Scratch For Discord (pegue ele {here})\",\r\n here: \"aqui\"\r\n },\r\n code_modal: {\r\n title: \"Código JavaScript do seu bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Vue from 'vue';\r\nimport { BootstrapVue, IconsPlugin } from 'bootstrap-vue';\r\nimport App from './App.vue';\r\nimport store from './store';\r\nimport VueSwal from 'vue-swal';\r\nimport Vuei18n from 'vue-i18n';\r\nimport Blockly from \"blockly\";\r\nimport VueToast from 'vue-toast-notification';\r\nimport VueTour from 'vue-tour';\r\nimport { library } from '@fortawesome/fontawesome-svg-core'\r\nimport { faPowerOff } from '@fortawesome/free-solid-svg-icons'\r\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'\r\n\r\nlibrary.add(faPowerOff)\r\n\r\nVue.component('font-awesome-icon', FontAwesomeIcon)\r\n\r\nVue.use(VueTour);\r\nVue.use(VueToast);\r\nVue.use(Vuei18n);\r\nVue.use(VueSwal);\r\nVue.use(BootstrapVue);\r\nVue.use(IconsPlugin);\r\n\r\nVue.config.productionTip = false;\r\nVue.config.ignoredElements = [\"field\",\"block\",\"category\",\"xml\",\"mutation\",\"value\",\"sep\"];\r\n\r\nimport blocklyLocaleEN from \"blockly/msg/en\";\r\nimport blocklyLocaleFR from \"blockly/msg/fr\";\r\nimport blocklyLocalePT from \"blockly/msg/pt\";\r\n\r\nimport customLocaleEN from './locales/en';\r\nimport customLocaleFR from './locales/fr';\r\nimport customLocalePT from './locales/pt';\r\n\r\nconst messages = {\r\n en: customLocaleEN.websiteMessages,\r\n fr: customLocaleFR.websiteMessages,\r\n pt: customLocalePT.websiteMessages\r\n};\r\n\r\nconst i18n = new Vuei18n({\r\n locale: (messages[navigator.language.split(\"-\")[0]] ? navigator.language.split(\"-\")[0] : \"en\"),\r\n messages: messages\r\n});\r\n\r\nimport toolbox from \"./toolbox\";\r\nimport Theme from '@blockly/theme-modern';\r\n\r\nVue.mixin({\r\n methods: {\r\n reloadWorkspace(){\r\n // Get current workspace\r\n const workspace = this.$store.state.workspace;\r\n // Convert it to a dom string\r\n const dom = Blockly.Xml.workspaceToDom(workspace);\r\n // Delete the current workspace\r\n workspace.dispose();\r\n // Create a new workspace (with the good language)\r\n const newWorkspace = Blockly.inject(document.getElementById(\"blocklyDiv\"), {\r\n renderer: \"zelos\",\r\n theme: Theme,\r\n grid: {\r\n spacing: 25,\r\n length: 3,\r\n colour: \"#ccc\",\r\n snap: true\r\n },\r\n zoom: {\r\n controls: true,\r\n startScale: 0.9,\r\n maxScale: 3,\r\n minScale: 0.3,\r\n scaleSpeed: 1.2\r\n },\r\n toolbox: toolbox(Blockly)\r\n });\r\n // And restore the blocks\r\n Blockly.Xml.domToWorkspace(dom, newWorkspace);\r\n // Update the workspace in the vuex store\r\n this.$store.commit(\"setWorkspace\", {\r\n workspace: newWorkspace\r\n });\r\n workspace.addChangeListener(Blockly.Events.disableOrphans);\r\n // Return the workspace\r\n return workspace;\r\n },\r\n setLanguage(locale){\r\n switch (locale) {\r\n case \"en\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocaleEN);\r\n // Change Blockly language for custom blocks\r\n customLocaleEN.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"en\";\r\n break;\r\n case \"fr\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocaleFR);\r\n // Change Blockly language for custom blocks\r\n customLocaleFR.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"fr\";\r\n break;\r\n case \"pt\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocalePT);\r\n // Change Blockly language for custom blocks\r\n customLocalePT.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"pt\";\r\n break;\r\n default:\r\n break;\r\n }\r\n },\r\n getWorkspaceCode(){\r\n if(!this.$store.state.workspace) return \"\";\r\n return `\r\n (async()=>{\r\n const Discord = require(\"discord.js\");\r\n const Database = require(\"easy-json-database\");\r\n const devMode = typeof __E_IS_DEV !== \"undefined\" && __E_IS_DEV;\r\n const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\r\n const s4d = {\r\n Discord,\r\n database: new Database(\\`\\${devMode ? S4D_NATIVE_GET_PATH : \"./\"}/db.json\\`),\r\n joiningMember:null,\r\n reply:null,\r\n tokenInvalid:false,\r\n tokenError: null,\r\n checkMessageExists() {\r\n if (!s4d.client) throw new Error('You cannot perform message operations without a Discord.js client')\r\n if (!s4d.client.readyTimestamp) throw new Error('You cannot perform message operations while the bot is not connected to the Discord API')\r\n }\r\n };\r\n s4d.client = new s4d.Discord.Client({\r\n intents: [Object.values(s4d.Discord.Intents.FLAGS).reduce((acc, p) => acc | p, 0)],\r\n partials: [\"REACTION\"]\r\n });\r\n\r\n ${Blockly.JavaScript.workspaceToCode(this.$store.state.workspace)}\r\n\r\n return s4d;\r\n })();\r\n `;\r\n }\r\n }\r\n});\r\n \r\nnew Vue({\r\n store,\r\n render: h => h(App),\r\n i18n\r\n}).$mount(\"#app\");\r\n\r\nimport 'bootstrap/dist/css/bootstrap.css';\r\nimport 'bootstrap-vue/dist/bootstrap-vue.css';\r\nimport 'vue-toast-notification/dist/theme-default.css';\r\nimport 'vue-tour/dist/vue-tour.css';\r\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\""],"sourceRoot":""} \ No newline at end of file diff --git a/environments/core/server/sources/s4d/js/app.f87207ed.js b/environments/core/server/sources/s4d/js/app.f87207ed.js new file mode 100644 index 0000000..ca218f1 --- /dev/null +++ b/environments/core/server/sources/s4d/js/app.f87207ed.js @@ -0,0 +1,2 @@ +(function(e){function t(t){for(var a,i,s=t[0],l=t[1],c=t[2],_=0,d=[];_=0}},methods:{getBotImageStyle:function(){return{"background-size":"50px","background-image":"url(".concat(this.botAvatar,")"),width:"50px",height:"50px","min-height":"50px","min-width":"50px","border-radius":"50%"}},getUsernameSpanClass:function(){return"botname ".concat(this.electronApp?"":"unselectable")},getTooltipContent:function(){return this.botStarted?this.$t("run_modal.stop"):this.$t("run_modal.start")},getHandleButtonClass:function(){return{btn:!0,"btn-block":!0,handlebutton:!0,"btn-danger":this.botStarted,"btn-success":!this.botStarted}},start:function(){var e,t,n,a,o,r,i,s=this;if("ScratchNative"in window){this.botStarting=!0;var l=this.getWorkspaceCode();null===(e=window.ScratchNative)||void 0===e||e.onMessage("executeCode",(function(e,t){setTimeout((function(){try{t.s4d.tokenInvalid?(console.error(t.s4d.tokenError),s.botStarting=!1,s.botStarted=!1,s.$toast.open({message:t.s4d.tokenError||s.$t("run_modal.invalid_token"),type:"error",dismissible:!0,duration:1e4,position:"top-right"}),s.$bvModal.hide("run-modal")):t.s4d.client&&!t.s4d.client.readyTimestamp&&(s.botStarting=!1,s.botStarted=!1,s.$toast.open({message:t.s4d.tokenError||s.$t("run_modal.error"),type:"error",dismissible:!0,duration:1e4,position:"top-right"}),s.$bvModal.hide("run-modal"))}catch(e){}}),5e3)})),null===(t=window.ScratchNative)||void 0===t||t.onMessage("clientReady",(function(e,t){s.botStarting=!1,s.botStarted=!0,s.botRawAvatar=t.displayAvatarURL,s.botTag=t.tag})),null===(n=window.ScratchNative)||void 0===n||n.onMessage("clientDebug",(function(e,t){console.log("[S4D_DEBUG] ".concat(t))})),null===(a=window.ScratchNative)||void 0===a||a.onMessage("clientError",(function(e,t){console.error("[S4D_ERROR] ".concat(t))})),null===(o=window.ScratchNative)||void 0===o||o.onMessage("clientWarn",(function(e,t){console.warn("[S4D_WARN] ".concat(t))})),null===(r=window.ScratchNative)||void 0===r||r.onMessage("clientShardDisconnect",(function(){s.botStarted=!1,s.s4d=null})),null===(i=window.ScratchNative)||void 0===i||i.sendMessage("executeCode",l)}},stop:function(){var e,t;null===(e=window.ScratchNative)||void 0===e||e.sendMessage("destroyClient"),null===(t=window.ScratchNative)||void 0===t||t.unregisterEvents(["executeCode","clientShardDisconnect","clientWarn","clientError","clientDebug","clientReady"]),this.botRawAvatar=null,this.botTag=null},handle:function(){this.botStarted?this.stop():this.start()},onHidden:function(){this.$refs.button.focus()}}},U=G,V=(n("39f7"),Object(R["a"])(U,L,D,!1,null,null,null)),x=V.exports,J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-nav-item-dropdown",{attrs:{id:"v-step-0",text:e.$t("examples.title"),right:""}},[n("b-dropdown-item",{on:{click:function(t){return e.load("ping-pong")}}},[e._v(e._s(e.$t("examples.ping_pong")))]),n("b-dropdown-item",{on:{click:function(t){return e.load("command-parsing")}}},[e._v(e._s(e.$t("examples.command_parsing")))]),n("b-dropdown-item",{on:{click:function(t){return e.load("leveling")}}},[e._v(e._s(e.$t("examples.leveling")))])],1)},P=[],Y='\n \n \n \n \n Your bot token\n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !ping\n \n \n \n \n \n \n \n \n pong!\n \n \n \n \n \n \n \n \n',K='\n \n \n arguments\n command\n \n \n \n \n Your bot token\n \n \n \n \n \n \n arguments\n \n \n \n SPLIT\n \n \n \n \n \n \n \n \n \n \n \n \n command\n \n \n \n GET_REMOVE\n FROM_START\n \n \n arguments\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n EQ\n \n \n command\n \n \n \n \n !say\n \n \n \n \n \n \n \n \n You have written the following content after !say:\n \n \n \n \n \n \n Salut!\n \n \n \n JOIN\n \n \n arguments\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',j='\n\n \n member_xp\n member_level\n \n \n \n \n Your bot token\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n member_xp\n \n \n \n \n hello\n \n \n \n \n \n xp-\n \n \n \n \n ID\n \n \n \n \n \n \n \n \n member_level\n \n \n \n \n hello\n \n \n \n \n \n level-\n \n \n \n \n ID\n \n \n \n \n \n \n \n \n \n \n \n \n \n member_xp\n \n \n \n \n \n \n member_xp\n \n \n 0\n \n \n \n \n \n \n \n \n member_level\n \n \n \n \n \n \n member_level\n \n \n 0\n \n \n \n \n \n \n \n \n hello\n \n \n \n \n \n xp-\n \n \n \n \n ID\n \n \n \n \n \n \n world\n \n \n ADD\n \n \n 1\n \n \n member_xp\n \n \n \n \n 1\n \n \n \n \n \n \n member_xp\n \n \n ADD\n \n \n 1\n \n \n member_xp\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n GT\n \n \n member_xp\n \n \n \n \n 100\n \n \n \n \n \n \n \n \n hello\n \n \n \n \n \n level-\n \n \n \n \n ID\n \n \n \n \n \n \n world\n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n member_level\n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n Congratulations, \n \n \n \n \n \n \n \n you jumped to level \n \n \n \n \n member_level\n \n \n \n \n !!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !level\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n \n \n \n , you are currently level: \n \n \n \n \n member_level\n \n \n \n \n \n \n \n \n EQ\n \n \n \n \n \n !xp\n \n \n \n \n \n \n \n \n Salut!\n \n \n \n \n \n \n \n \n , you need \n \n \n \n \n MINUS\n \n \n 100\n \n \n \n \n 100\n \n \n member_xp\n \n \n \n \n \n \n to jump to level \n \n \n \n \n ADD\n \n \n 1\n \n \n member_level\n \n \n \n \n 1\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',H={"ping-pong":Y,"command-parsing":K,leveling:j},F={name:"editmenu",computed:{},methods:{load:function(e){var t=this;this.$swal({title:this.$t("examples.confirm.title"),text:this.$t("examples.confirm.text"),buttons:{cancel:this.$t("examples.confirm.cancel"),no:{text:this.$t("examples.confirm.no"),value:!1,className:"red-button"},yes:{text:this.$t("examples.confirm.yes"),value:!0}},closeOnClickOutside:!1}).then((function(n){if("object"!==Object(w["a"])(n)){n&&t.$store.state.workspace.getAllBlocks().forEach((function(e){return e.dispose()}));var a=H[e];c.a.Xml.domToWorkspace(c.a.Xml.textToDom(a),t.$store.state.workspace),setTimeout((function(){t.$toast.open({message:t.$t("examples.loaded",{example:e}),type:"success",dismissible:!0,duration:1e4})}),200)}}))}}},X=F,W=Object(R["a"])(X,J,P,!1,null,null,null),$=W.exports,z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:"code-modal",title:e.$t("code_modal.title"),"ok-only":""}},[n("textarea",{attrs:{disabled:"",id:"code"},domProps:{value:e.content}})])},q=[],Q=n("e552"),Z=n.n(Q),ee={name:"editmenu",computed:{content:function(){return Z.a.js(this.getWorkspaceCode(),{indent_size:4,space_in_empty_paren:!0})}}},te=ee,ne=(n("627b"),Object(R["a"])(te,z,q,!1,null,null,null)),ae=ne.exports,oe={name:"navbar",components:{FileMenu:N,EditMenu:f,LanguageMenu:k,RunModal:x,ExamplesMenu:$,CodeModal:ae},computed:{configurationValidated:function(){return this.$store.state.workspace&&this.$store.state.workspace.getAllBlocks().some((function(e){return"s4d_login"===e.type}))&&this.$store.state.workspace.getAllBlocks().every((function(e){return!e.disabled&&!e.warning}))}},mounted:function(){document.getElementById("docName").addEventListener("input",(function(){document.title="Scratch For Discord - ".concat(document.querySelector("#docName").textContent)}),!1);var e=document.querySelector("#docName");e.spellcheck=!1,e.focus(),e.blur()},methods:{exportToCode:function(){var e=this,t=document.createElement("div");t.innerHTML="
".concat(this.$t("download.content.title"),"
  • ").concat(this.$t("download.content.unzipFile"),"
  • ").concat(this.$t("download.content.node"),"
  • ").concat(this.$t("download.content.start"),"
  • ").concat(this.$t("download.content.done"),"
"),this.$swal({title:this.$t("download.title"),content:t,buttons:{cancel:this.$t("download.cancel"),confirm:this.$t("download.confirm")}}).then((function(t){if(t){var n=new u.a,a=c.a.Xml.domToPrettyText(c.a.Xml.workspaceToDom(e.$store.state.workspace)),o="".concat(encodeURIComponent(document.querySelector("#docName").textContent).replace(/%20/g," "),".zip");n.file("blocks.xml",a);var r=e.getWorkspaceCode();n.file("bot.js",r),n.file(".replit",'run = "node bot.js"'),n.file("package.json",JSON.stringify({name:"scratch-for-discord-bot",version:"1.0.0",main:"bot.js",scripts:{start:"node ."},dependencies:{"discord.js":"^13.1.0","easy-json-database":"^1.5.0"}})),n.generateAsync({type:"blob"}).then((function(e){var t=document.createElement("a");t.style="display: none",document.body.appendChild(t);var n=window.URL.createObjectURL(e);t.href=n,t.download=o,t.click(),window.URL.revokeObjectURL(n),document.body.removeChild(t)}))}}))}}},re=oe,ie=Object(R["a"])(re,E,_,!1,null,null,null),se=ie.exports,le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{ref:"blocklyDiv",staticClass:"blocklyDiv",attrs:{id:"blocklyDiv"}}),n("xml",{ref:"blocklyToolbox",staticStyle:{display:"none"}},[e._t("default")],2)],1)},ce=[],Ee=n("5530"),_e=n("b85c"),de=(n("a15b"),n("2ca0"),n("caad"),n("2532"),n("4de4"),{});function ue(e,t){de[e]=t}var me=function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},pe=function(e){var t,n=e.getAllBlocks(!1),a=Object(_e["a"])(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;if(o){de[o.type]||(de[o.type]=[]);var r,i=[],s=0,l=Object(_e["a"])(de[o.type]);try{for(l.s();!(r=l.n()).done;){var E=r.value;ve(o,E)&&(Se(o,n,E)||(E.message&&(c.a.Msg[E.message]?i.push(c.a.Msg[E.message]):(window.alert("KEY NOT FOUND: "+E.message),i.push(me(E.message)))),s++))}}catch(_){l.e(_)}finally{l.f()}s<1?o.setWarningText(null):i.length>0&&o.setWarningText(i.join("\n"))}}}catch(_){a.e(_)}finally{a.f()}};function Se(e,t,n){var a=!1,o=n.type;switch("custom"!==o&&o.startsWith("!")&&(o=o.substring(1),a=!0),o){case"toplevelparent":return n.types.includes(be(e).type)!==a;case"blockexists":return t.filter((function(e){return n.types.includes(e.type)&&!e.disabled})).length>0!==a;case"parent":return n.types.includes(e.getParent().type)!==a;case"hasparent":return Re(e,n.types)!==a;case"notempty":var r,i=Object(_e["a"])(n.types);try{for(i.s();!(r=i.n()).done;){var s=r.value;try{if(!e.getInput(s).connection.targetBlock())return!1}catch(l){console.log(e.type)}}}catch(c){i.e(c)}finally{i.f()}return!0;default:return!0}}function ve(e,t){switch(t.type){case"toplevelparent":case"!toplevelparent":return be(e)&&!be(e).disabled;case"blockexists":case"!blockexists":return!0;case"parent":case"!parent":return e.getParent()&&!e.getParent().disabled;case"hasparent":case"custom":case"notempty":return!0;default:return!1}}function Re(e,t){var n=!1;while(e.getParent())t.includes(e.getParent().type)&&(n=!0),e=e.getParent();return n}function be(e){return e?e.getParent()?be(e.getParent()):e:null}var Ne=function(e){return'\n \n'.replace(/{{\s([A-z]{3,})\s}}/g,(function(t){return e.Msg[t.replace("{{ ","").replace(" }}","")]}))},Te={name:"BlocklyComponent",props:["options"],data:function(){return{toastLogin:!1,workspace:this.$store.state.workspace}},mounted:function(){var e=this;this.setLanguage(this.$store.state.blocklyLocale);var t=this.$props.options||{};t.toolbox=this.$refs["blocklyToolbox"];var n=c.a.inject(this.$refs["blocklyDiv"],Object(Ee["a"])(Object(Ee["a"])({},t),{toolbox:Ne(c.a)}));this.$store.commit("setWorkspace",{workspace:n}),n.addChangeListener(c.a.Events.disableOrphans),this.$nextTick((function(){window.setInterval((function(){pe(e.$store.state.workspace);var t=e.$store.state.workspace.getAllBlocks().some((function(e){return"s4d_login"===e.type}));t?e.toastLogin&&(e.toastLogin=!1,e.$toast.clear()):e.toastLogin||(e.toastLogin=!0,e.$toast.open({message:e.$t("warnings.login_block"),type:"warning",dismissible:!1,duration:1e9}))}),100)}))}},Ae=Te,Me=(n("7ec4"),Object(R["a"])(Ae,le,ce,!1,null,"180ad633",null)),Oe=Me.exports,ge=n("b7fd"),fe=n.n(ge),Ie="s4d_bot_ping",he={message0:"%{BKY_BOT_PING}",colour:"#5b67a5",tooltip:"",output:"Number",helpUrl:""};ge["Blocks"][Ie]={init:function(){this.jsonInit(he)}},ge["JavaScript"][Ie]=function(){var e=["s4d.client.ws.ping",ge["JavaScript"].ORDER_NONE];return e};var ye="s4d_bot_server_count",Be={message0:"%{BKY_BOT_SERVER_COUNT}",colour:"#5b67a5",tooltip:"",output:"Number",helpUrl:""};ge["Blocks"][ye]={init:function(){this.jsonInit(Be)}},ge["JavaScript"][ye]=function(){var e=["s4d.client.guilds.cache.size",ge["JavaScript"].ORDER_NONE];return e};var Ce="s4d_login",ke={type:"block_type",message0:"%{BKY_LOGIN}",args0:[{type:"input_value",name:"TOKEN",check:"String"}],colour:"#F46580",tooltip:"%{BKY_LOGIN_TOOLTIP}",helpUrl:""};ge["Blocks"][Ce]={init:function(){this.jsonInit(ke)}},ge["JavaScript"][Ce]=function(e){var t=ge["JavaScript"].valueToCode(e,"TOKEN",ge["JavaScript"].ORDER_ATOMIC),n="await s4d.client.login(".concat(t,").catch((e) => { s4d.tokenInvalid = true; s4d.tokenError = e; });\n");return n};var Le="s4d_on_connected",De={message0:"%{BKY_ON_CONNECTED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}],tooltip:"%{BKY_ON_CONNECTED_TOOLTIP}"};fe.a.Blocks[Le]={init:function(){this.jsonInit(De)}},fe.a.JavaScript[Le]=function(e){var t=fe.a.JavaScript.statementToCode(e,"STATEMENTS"),n="s4d.client.on('ready', async () => {\n".concat(t,"\n});\n");return n};var we="s4d_set_bot_game",Ge={message0:"%{BKY_SET_BOT_GAME}",args0:[{type:"input_value",name:"GAME",check:["Number","String"]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][we]={init:function(){this.jsonInit(Ge)}},ge["JavaScript"][we]=function(e){var t=ge["JavaScript"].valueToCode(e,"GAME",ge["JavaScript"].ORDER_ATOMIC),n="s4d.client.user.setActivity(String(".concat(t,"));\n");return n},ue(we,[{type:"notempty",message:"RES_MISSING_GAME",types:["GAME"]}]);var Ue="s4d_add_reaction",Ve={message0:"%{BKY_ADD_REACTION}",args0:[{type:"input_value",name:"REACTION",check:"String"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Ue]={init:function(){this.jsonInit(Ve)}},fe.a.JavaScript[Ue]=function(e){var t=fe.a.JavaScript.valueToCode(e,"REACTION",fe.a.JavaScript.ORDER_ATOMIC),n="s4dmessage.react(".concat(t,");");return n},ue(Ue,[{type:"notempty",message:"RES_ADD_REACTION_MISSING_REACTION",types:["REACTION"]}]);var xe="s4d_delete",Je={message0:"%{BKY_DELETE_MESSAGE}",colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][xe]={init:function(){this.jsonInit(Je)}},ge["JavaScript"][xe]=function(){var e="s4dmessage.delete();\n";return e},ue(xe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Pe="s4d_mentioned_member",Ye={message0:"%{BKY_MENTIONED_MEMBER}",colour:"#187795",tooltip:"",output:"Member",helpUrl:""};fe.a.Blocks[Pe]={init:function(){this.jsonInit(Ye)}},fe.a.JavaScript[Pe]=function(){var e=["s4dmessage.mentions.members.first()",fe.a.JavaScript.ORDER_NONE];return e},ue(Pe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Ke="s4d_message_id",je={message0:"%{BKY_MESSAGE_ID}",colour:"#5BA58C",tooltip:"",output:"String",helpUrl:""};ge["Blocks"][Ke]={init:function(){this.jsonInit(je)}},ge["JavaScript"][Ke]=function(){var e=["s4dmessage.id",ge["JavaScript"].ORDER_NONE];return e},ue(Ke,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var He="s4d_message_author",Fe={message0:"%{BKY_MESSAGE_AUTHOR}",colour:"#187795",output:"Member",tooltip:"",helpUrl:""};fe.a.Blocks[He]={init:function(){this.jsonInit(Fe)}},fe.a.JavaScript[He]=function(){var e=["s4dmessage.member",fe.a.JavaScript.ORDER_NONE];return e},ue(He,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Xe="s4d_message_author_raw",We={message0:"%{BKY_MESSAGE_AUTHOR_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][Xe]={init:function(){this.jsonInit(We)}},l["JavaScript"][Xe]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4dmessage.author.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4dmessage.author.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["(s4dmessage.member || await s4dmessage.guild.members.fetch(s4dmessage.author.id)).nickname",l["JavaScript"].ORDER_NONE];return o}},ue(Xe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var $e="s4d_message_channel",ze={message0:"%{BKY_MESSAGE_CHANNEL}",colour:"#a55b80",output:"Channel",tooltip:"",helpUrl:""};fe.a.Blocks[$e]={init:function(){this.jsonInit(ze)}},fe.a.JavaScript[$e]=function(){var e=["s4dmessage.channel",fe.a.JavaScript.ORDER_NONE];return e},ue($e,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var qe="s4d_message_channel_raw",Qe={message0:"%{BKY_MESSAGE_CHANNEL_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};fe.a.Blocks[qe]={init:function(){this.jsonInit(Qe)}},fe.a.JavaScript[qe]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["(s4dmessage.channel || {}).id",fe.a.JavaScript.ORDER_NONE];return n}if("NAME"===t){var a=["(s4dmessage.channel || {}).name",fe.a.JavaScript.ORDER_NONE];return a}},ue(qe,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var Ze="s4d_message_content",et={message0:"%{BKY_MESSAGE_CONTENT}",colour:"#5BA58C",tooltip:"",output:"String",helpUrl:""};ge["Blocks"][Ze]={init:function(){this.jsonInit(et)}},ge["JavaScript"][Ze]=function(){var e=["s4dmessage.content",ge["JavaScript"].ORDER_NONE];return e},ue(Ze,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var tt=["MESSAGE","COLOR","TITLE","IMAGE","FOOTER","THUMBNAIL"],nt=["String","Colour","String","String","String","String"],at={message0:"%{BKY_MESSAGE_EMBED}",mutator:"s4d_message_embed_mutator",output:"MessageEmbed",helpUrl:"",tooltip:"",colour:"#40BF4A"};fe.a.Blocks["s4d_message_embed"]={init:function(){this.jsonInit(at)}},fe.a.Blocks["s4d_message_embed_mutator"]={init:function(){this.setColour("#CECDCE"),this.setTooltip(""),this.setHelpUrl("")}};var ot={inputs_:[!0,!1,!1,!1,!1,!1],mutationToDom:function(){if(!this.inputs_)return null;for(var e=document.createElement("mutation"),t=0;t {\n".concat(t,"\n});\n");return n};var _t="s4d_reply",dt={message0:"%{BKY_REPLY}",args0:[{type:"input_value",name:"CONTENT",check:["Number","String","MessageEmbed"]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][_t]={init:function(){this.jsonInit(dt)}},ge["JavaScript"][_t]=function(e){var t=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var n=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===n||!n&&"object"===Object(w["a"])(n)){var a="s4dmessage.channel.send(".concat(t,");\n");return a}var o="s4dmessage.channel.send(String(".concat(t,"));\n");return o}var r="s4dmessage.channel.send(String(".concat(t,"));\n");return r},ue(_t,[{type:"notempty",message:"RES_MISSING_CONTENT",types:["CONTENT"]},{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MESSAGE",types:["s4d_on_message"]}]);var ut="s4d_purge",mt={message0:"%{BKY_PURGE}",args0:[{type:"input_value",name:"CHANNEL",check:"Channel"},{type:"input_value",name:"AMOUNT",check:"Number"}],previousStatement:null,nextStatement:null,inputsInline:!0,colour:"#1a75ff",tooltip:"",helpUrl:""};fe.a.Blocks[ut]={init:function(){this.jsonInit(mt)}},fe.a.JavaScript[ut]=function(e){var t=fe.a.JavaScript.valueToCode(e,"CHANNEL",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"AMOUNT",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".bulkDelete((").concat(n,"|1))");return a},ue(ut,[{type:"notempty",message:"RES_PURGE_CHANNEL",types:["CHANNEL"]},{type:"notempty",message:"RES_PURGE_AMOUNT",types:["AMOUNT"]}]);var pt="s4d_joining_guild",St={message0:"%{BKY_JOINING_GUILD}",colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};fe.a.Blocks[pt]={init:function(){this.jsonInit(St)}},fe.a.JavaScript[pt]=function(){var e=["s4d.joiningMember.guild",fe.a.JavaScript.ORDER_NONE];return e},ue(pt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var vt="s4d_joining_guild_raw",Rt={message0:"%{BKY_JOINING_GUILD_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][vt]={init:function(){this.jsonInit(Rt)}},l["JavaScript"][vt]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.joiningMember.guild.id",l["JavaScript"].ORDER_NONE];return n}if("NAME"===t){var a=["s4d.joiningMember.guild.name",l["JavaScript"].ORDER_NONE];return a}},ue(vt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var bt="s4d_joining_member",Nt={message0:"%{BKY_JOINING_MEMBER}",colour:"#187795",output:"Member",tooltip:"",helpUrl:""};fe.a.Blocks[bt]={init:function(){this.jsonInit(Nt)}},fe.a.JavaScript[bt]=function(){var e=["s4d.joiningMember",fe.a.JavaScript.ORDER_NONE];return e},ue(bt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var Tt="s4d_joining_member_raw",At={message0:"%{BKY_JOINING_MEMBER_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][Tt]={init:function(){this.jsonInit(At)}},l["JavaScript"][Tt]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.joiningMember.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4d.joiningMember.user.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["s4d.joiningMember.nickname",l["JavaScript"].ORDER_NONE];return o}},ue(Tt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_JOIN",types:["s4d_on_member_join"]}]);var Mt="s4d_on_member_join",Ot={message0:"%{BKY_ON_MEMBER_JOIN} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};ge["Blocks"][Mt]={init:function(){this.jsonInit(Ot)}},ge["JavaScript"][Mt]=function(e){var t=ge["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('guildMemberAdd', async (param1) => {\ns4d.joiningMember = param1;\n".concat(t,"s4d.joiningMember = null\n});\n");return n};var gt="s4d_leaving_guild",ft={message0:"%{BKY_LEAVING_GUILD}",colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};fe.a.Blocks[gt]={init:function(){this.jsonInit(ft)}},fe.a.JavaScript[gt]=function(){var e=["s4d.leavingMember.guild",fe.a.JavaScript.ORDER_NONE];return e},ue(gt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var It="s4d_leaving_guild_raw",ht={message0:"%{BKY_LEAVING_GUILD_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][It]={init:function(){this.jsonInit(ht)}},l["JavaScript"][It]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.leavingMember.guild.id",l["JavaScript"].ORDER_NONE];return n}if("NAME"===t){var a=["s4d.leavingMember.guild.name",l["JavaScript"].ORDER_NONE];return a}},ue(It,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var yt="s4d_leaving_member_raw",Bt={message0:"%{BKY_LEAVING_MEMBER_RAW}",args0:[{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["%{BKY_NICKNAME}","NICKNAME"],["id","ID"]]}],output:"String",colour:"#5BA58C",tooltip:"",helpUrl:""};l["Blocks"][yt]={init:function(){this.jsonInit(Bt)}},l["JavaScript"][yt]=function(e){var t=e.getFieldValue("SEARCH_TYPE");if("ID"===t){var n=["s4d.leavingMember.id",l["JavaScript"].ORDER_NONE];return n}if("USERNAME"===t){var a=["s4d.leavingMember.user.username",l["JavaScript"].ORDER_NONE];return a}if("NICKNAME"===t){var o=["s4d.leavingMember.nickname",l["JavaScript"].ORDER_NONE];return o}},ue(yt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_MEMBER_LEAVE",types:["s4d_on_member_leave"]}]);var Ct="s4d_on_member_leave",kt={message0:"%{BKY_ON_MEMBER_LEAVE} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};ge["Blocks"][Ct]={init:function(){this.jsonInit(kt)}},ge["JavaScript"][Ct]=function(e){var t=ge["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('guildMemberRemove', async (param1) => {\ns4d.leavingMember = param1;\n".concat(t,"s4d.leavingMember = null\n});\n");return n};var Lt="s4d_on_react_added",Dt={message0:"%{BKY_ON_REACT_ADDED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};l["Blocks"][Lt]={init:function(){this.jsonInit(Dt)}},l["JavaScript"][Lt]=function(e){var t=l["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('MESSAGE_REACTION_ADD', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\n".concat(t,"\n});\n");return n};var wt="s4d_on_react_removed",Gt={message0:"%{BKY_ON_REACT_REMOVED} %1 %2",colour:"#F5AB1A",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENTS"}]};l["Blocks"][wt]={init:function(){this.jsonInit(Gt)}},l["JavaScript"][wt]=function(e){var t=l["JavaScript"].statementToCode(e,"STATEMENTS"),n="s4d.client.on('MESSAGE_REACTION_REMOVED', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\n".concat(t,"\n});\n");return n};var Ut="s4d_react_emoji",Vt={message0:"%{BKY_REACT_EMOJI}",colour:"#5BA58C",output:"String"};l["Blocks"][Ut]={init:function(){this.jsonInit(Vt)}},l["JavaScript"][Ut]=function(){var e=["rEmoji",l["JavaScript"].ORDER_NONE];return e},ue(Ut,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var xt="s4d_react_member",Jt={message0:"%{BKY_REACT_MEMBER}",colour:"#187795",output:"Member"};l["Blocks"][xt]={init:function(){this.jsonInit(Jt)}},l["JavaScript"][xt]=function(){var e=["rMember",l["JavaScript"].ORDER_NONE];return e},ue(xt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var Pt="s4d_react_message_id",Yt={message0:"%{BKY_REACT_MESSAGE_ID}",colour:"#5BA58C",output:"String"};l["Blocks"][Pt]={init:function(){this.jsonInit(Yt)}},l["JavaScript"][Pt]=function(){var e=["rMessage.id",l["JavaScript"].ORDER_NONE];return e},ue(Pt,[{type:"toplevelparent",message:"RES_MUST_BE_IN_ON_REACT",types:["s4d_on_react_added","s4d_on_react_removed"]}]);var Kt="s4d_create_channel",jt={message0:"%{BKY_CREATE_CHANNEL}",args0:[{type:"input_value",name:"NAME",check:["String","Number"]},{type:"input_value",name:"SERVER",check:["Server"]},{type:"field_dropdown",name:"TYPE",options:[["%{BKY_TEXT}","TEXT"],["%{BKY_VOICE}","VOICE"],["%{BKY_CATEGORY}","CATEGORY"]]}],colour:"#4C97FF",previousStatement:null,nextStatement:null,inputsInline:!1,tooltip:"",helpUrl:""};ge["Blocks"][Kt]={init:function(){this.jsonInit(jt)}},ge["JavaScript"][Kt]=function(e){var t=e.getFieldValue("TYPE"),n=ge["JavaScript"].valueToCode(e,"NAME",ge["JavaScript"].ORDER_ATOMIC),a=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC),o="".concat(a,".channels.create(").concat(n,", {\n type: '").concat(t.toLowerCase(),"'\n });\n");return o};var Ht="s4d_get_channel",Ft={message0:"%{BKY_GET_CHANNEL}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#a55b80",output:"Channel",tooltip:"",helpUrl:""};ge["Blocks"][Ht]={init:function(){this.jsonInit(Ft)}},ge["JavaScript"][Ht]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE");return"NAME"===n?["s4d.client.channels.cache.find((channel) => channel.name === ".concat(t,")"),ge["JavaScript"].ORDER_ATOMIC]:["s4d.client.channels.cache.get(".concat(t,")"),ge["JavaScript"].ORDER_ATOMIC]},ue(Ht,[{type:"notempty",message:"RES_MISSING_CHANNEL_VALUE",types:["VALUE"]}]);var Xt="s4d_send_channel",Wt={message0:"%{BKY_SEND_CHANNEL}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"CHANNEL",check:"Channel"}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][Xt]={init:function(){this.jsonInit(Wt)}},ge["JavaScript"][Xt]=function(e){var t=ge["JavaScript"].valueToCode(e,"CHANNEL",ge["JavaScript"].ORDER_ATOMIC),n=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var a=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===a||!a&&"object"===Object(w["a"])(a)){var o="".concat(t,".send(").concat(n,");\n");return o}var r="".concat(t,".send(String(").concat(n,"));\n");return r}var i="".concat(t,".send(String(").concat(n,"));\n");return i},ue(Xt,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_CHANNEL_CHANNEL",types:["CHANNEL"]}]);var $t="s4d_send_wait_reply",zt={message0:"%{BKY_SEND_WAIT_REPLY}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"CHANNEL",check:"Channel"},{type:"input_value",name:"MEMBER",check:"Member"},{type:"input_value",name:"TIME",check:"Number"},{type:"input_statement",name:"THEN"},{type:"input_statement",name:"CATCH"}],colour:"#4C97FF",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][$t]={init:function(){this.jsonInit(zt)}},ge["JavaScript"][$t]=function(e){var t=ge["JavaScript"].valueToCode(e,"CHANNEL",ge["JavaScript"].ORDER_ATOMIC),n=ge["JavaScript"].valueToCode(e,"CONTENT",ge["JavaScript"].ORDER_ATOMIC),a=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC),o=ge["JavaScript"].valueToCode(e,"TIME",ge["JavaScript"].ORDER_ATOMIC)||5,r=ge["JavaScript"].statementToCode(e,"THEN"),i=ge["JavaScript"].statementToCode(e,"CATCH"),s="";if(e.getInput("CONTENT").connection.targetConnection){var l=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;s="MessageEmbed"===l||!l&&"object"===Object(w["a"])(l)?"".concat(t,".send(").concat(n,");\n"):"".concat(t,".send(String(").concat(n,"));\n")}else s="".concat(t,".send(String(").concat(n,"));\n");return s+="".concat(t,".awaitMessages((m) => m.author.id === ").concat(a,".id, { time: (").concat(o,"*60*1000), max: 1 }).then(async (collected) => { s4d.reply = collected.first().content; \n ").concat(r," \n s4d.reply = null; }).catch(async (e) => { console.error(e); ").concat(i," });"),s},ue($t,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_CHANNEL_CHANNEL",types:["CHANNEL"]}]);var qt="s4d_send_wait_reply_value",Qt={message0:"%{BKY_SEND_WAIT_REPLY_VALUE}",colour:"#5BA58C",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][qt]={init:function(){this.jsonInit(Qt)}},ge["JavaScript"][qt]=function(){var e=["s4d.reply",ge["JavaScript"].ORDER_NONE];return e},ue(qt,[{type:"hasparent",message:"RES_SEND_WAIT_REPLY_VALUE_PARENT",types:["s4d_send_wait_reply"]}]);var Zt="s4d_boost_level",en={message0:"%{BKY_SERVER_BOOST_LEVEL}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Number",tooltip:"",helpUrl:""};ge["Blocks"][Zt]={init:function(){this.jsonInit(en)}},ge["JavaScript"][Zt]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".premiumTier"),ge["JavaScript"].ORDER_NONE]},ue(Zt,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var tn="s4d_get_server",nn={message0:"%{BKY_GET_SERVER}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#D85E47",output:"Server",tooltip:"",helpUrl:""};ge["Blocks"][tn]={init:function(){this.jsonInit(nn)}},ge["JavaScript"][tn]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE");return"NAME"===n?["s4d.client.guilds.cache.find((guild) => guild.name === ".concat(t,")"),ge["JavaScript"].ORDER_NONE]:["s4d.client.guilds.cache.get(".concat(t,")"),ge["JavaScript"].ORDER_NONE]},ue(tn,[{type:"notempty",message:"RES_GET_SERVER_VALUE",types:["VALUE"]}]);var an="s4d_icon_url",on={message0:"%{BKY_ICON_URL}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][an]={init:function(){this.jsonInit(on)}},ge["JavaScript"][an]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".iconURL({ dynamic: true })"),ge["JavaScript"].ORDER_NONE]},ue(an,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var rn="s4d_member_count",sn={message0:"%{BKY_MEMBER_COUNT}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Number",tooltip:"",helpUrl:""};ge["Blocks"][rn]={init:function(){this.jsonInit(sn)}},ge["JavaScript"][rn]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".memberCount"),ge["JavaScript"].ORDER_NONE]},ue(rn,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var ln="s4d_server_name",cn={message0:"%{BKY_SERVER_NAME}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][ln]={init:function(){this.jsonInit(cn)}},ge["JavaScript"][ln]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".name"),ge["JavaScript"].ORDER_NONE]},ue(ln,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var En="s4d_server_owner",_n={message0:"%{BKY_SERVER_OWNER}",args0:[{type:"input_value",name:"SERVER",check:"Server"}],colour:"#e07e6c",output:"Member",tooltip:"",helpUrl:""};ge["Blocks"][En]={init:function(){this.jsonInit(_n)}},ge["JavaScript"][En]=function(e){var t=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".owner || await ").concat(t,".members.fetch(").concat(t,".ownerID)"),ge["JavaScript"].ORDER_NONE]},ue(En,[{type:"notempty",message:"RES_VALID_SERVER",types:["SERVER"]}]);var dn="s4d_set_server_name",un={message0:"%{BKY_SET_SERVER_NAME}",args0:[{type:"input_value",name:"SERVER",check:"Server"},{type:"input_value",name:"NEW_NICKNAME",check:["Number","String"]}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[dn]={init:function(){this.jsonInit(un)}},fe.a.JavaScript[dn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"SERVER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"NEW_NICKNAME",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".setName(").concat(n,");\n");return a},ue(dn,[{type:"notempty",message:"RES_SET_SERVER_NAME_SERVER",types:["SERVER"]},{type:"notempty",message:"RES_SET_SERVER_NAME_NEW_NICKNAME",types:["NEW_NICKNAME"]}]);var mn="s4d_add_role",pn={message0:"%{BKY_ADD_ROLE}",args0:[{type:"input_value",name:"ROLE",check:["String","Role"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[mn]={init:function(){this.jsonInit(pn)}},fe.a.JavaScript[mn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"ROLE",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("ROLE").connection.targetConnection){var a=e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("String"===a){var o="".concat(n,".roles.add(").concat(n,".guild.roles.cache.find((role) => role.id === ").concat(t," || role.name === ").concat(t," || '@'+role.name === ").concat(t,"));\n");return o}var r="".concat(n,".roles.add(").concat(t,");\n");return r}var i="".concat(n,".roles.add(").concat(t,");\n");return i},ue(mn,[{type:"notempty",message:"RES_ADD_ROLE_MISSING_ROLE",types:["ROLE"]},{type:"notempty",message:"RES_ADD_ROLE_MISSING_MEMBER",types:["MEMBER"]}]);var Sn=["GET_ROLE_SERVER"],vn=["Server"],Rn="s4d_get_role",bn={message0:"%{BKY_GET_ROLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_NAME}","NAME"],["id","ID"]]}],colour:"#2EB66B",output:"Role",mutator:"s4d_get_role_mutator",tooltip:"",helpUrl:""};ge["Blocks"][Rn]={init:function(){this.jsonInit(bn)}},ge["Blocks"]["s4d_get_role_mutator"]={init:function(){this.setColour("#CECDCE"),this.setTooltip(""),this.setHelpUrl("")}};var Nn={inputs_:[!1],mutationToDom:function(){if(!this.inputs_)return null;for(var e=document.createElement("mutation"),t=0;t role.name === ").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).find((role) => role.name === ".concat(t,")"),ge["JavaScript"].ORDER_NONE]:a?["".concat(a,".roles.get(").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).get(".concat(t,")"),ge["JavaScript"].ORDER_NONE]},ue(Rn,[{type:"notempty",message:"RES_GET_ROLE_VALUE",types:["VALUE"]}]);var Tn="s4d_remove_role",An={message0:"%{BKY_REMOVE_ROLE}",args0:[{type:"input_value",name:"ROLE",check:["String","Role"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Tn]={init:function(){this.jsonInit(An)}},fe.a.JavaScript[Tn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"ROLE",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("ROLE").connection.targetConnection){var a=e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("ROLE").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("String"===a){var o="".concat(n,".roles.remove(").concat(n,".guild.roles.cache.find((role) => role.id === ").concat(t," || role.name === ").concat(t," || '@'+role.name === ").concat(t,"));\n");return o}var r="".concat(n,".roles.remove(").concat(t,");\n");return r}var i="".concat(n,".roles.remove(").concat(t,");\n");return i},ue(Tn,[{type:"notempty",message:"RES_REMOVE_ROLE_MISSING_ROLE",types:["ROLE"]},{type:"notempty",message:"RES_REMOVE_ROLE_MISSING_MEMBER",types:["MEMBER"]}]);var Mn="s4d_ban_member",On={message0:"%{BKY_BAN_MEMBER}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Mn]={init:function(){this.jsonInit(On)}},fe.a.JavaScript[Mn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n="".concat(t,".ban();\n");return n},ue(Mn,[{type:"notempty",message:"RES_BAN_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var gn="s4d_get_member",fn={message0:"%{BKY_GET_MEMBER}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"SEARCH_TYPE",options:[["%{BKY_USERNAME}","USERNAME"],["id","ID"]]},{type:"input_value",name:"SERVER",check:"Server"}],colour:"#187795",output:"Member",tooltip:"",helpUrl:""};ge["Blocks"][gn]={init:function(){this.jsonInit(fn)}},ge["JavaScript"][gn]=function(e){var t=ge["JavaScript"].valueToCode(e,"VALUE",ge["JavaScript"].ORDER_ATOMIC),n=e.getFieldValue("SEARCH_TYPE"),a=ge["JavaScript"].valueToCode(e,"SERVER",ge["JavaScript"].ORDER_ATOMIC);return"USERNAME"===n?["".concat(a,".members.cache.find((m) => m.user.username === ").concat(t,")"),ge["JavaScript"].ORDER_NONE]:["(".concat(a,".members.cache.get(").concat(t,") || await ").concat(a,".members.fetch(").concat(t,"))"),ge["JavaScript"].ORDER_NONE]},ue(gn,[{type:"notempty",message:"RES_GET_MEMBER_VALUE",types:["VALUE"]},{type:"notempty",message:"RES_GET_MEMBER_SERVER",types:["SERVER"]}]);var In="s4d_kick_member",hn={message0:"%{BKY_KICK_MEMBER}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[In]={init:function(){this.jsonInit(hn)}},fe.a.JavaScript[In]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n="".concat(t,".kick();\n");return n},ue(In,[{type:"notempty",message:"RES_KICK_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var yn="s4d_member_discriminator",Bn={message0:"%{BKY_MEMBER_DISCRIMINATOR}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][yn]={init:function(){this.jsonInit(Bn)}},ge["JavaScript"][yn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.discriminator"),ge["JavaScript"].ORDER_NONE]},ue(yn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Cn="s4d_member_has_permission",kn={message0:"%{BKY_MEMBER_HAS_PERMISSION}",args0:[{type:"input_value",name:"MEMBER",check:"Member"},{type:"field_dropdown",name:"PERMISSION",options:[["%{BKY_PERM_CREATE_INSTANT_INVITE}","CREATE_INSTANT_INVITE"],["%{BKY_PERM_KICK_MEMBERS}","KICK_MEMBERS"],["%{BKY_PERM_BAN_MEMBERS}","BAN_MEMBERS"],["%{BKY_PERM_ADMINISTRATOR}","ADMINISTRATOR"],["%{BKY_PERM_MANAGE_CHANNELS}","MANAGE_CHANNELS"],["%{BKY_PERM_MANAGE_GUILD}","MANAGE_GUILD"],["%{BKY_PERM_ADD_REACTIONS}","ADD_REACTIONS"],["%{BKY_PERM_VIEW_AUDIT_LOG}","VIEW_AUDIT_LOG"],["%{BKY_PERM_PRIORITY_SPEAKER}","PRIORITY_SPEAKER"],["%{BKY_PERM_VIEW_CHANNEL}","VIEW_CHANNEL"],["%{BKY_PERM_READ_MESSAGES}","READ_MESSAGES"],["%{BKY_PERM_SEND_MESSAGES}","SEND_MESSAGES"],["%{BKY_PERM_SEND_TTS_MESSAGES}","SEND_TTS_MESSAGES"],["%{BKY_PERM_MANAGE_MESSAGES}","MANAGE_MESSAGES"],["%{BKY_PERM_EMBED_LINKS}","EMBED_LINKS"],["%{BKY_PERM_ATTACH_FILES}","ATTACH_FILES"],["%{BKY_PERM_READ_MESSAGE_HISTORY}","READ_MESSAGE_HISTORY"],["%{BKY_PERM_MENTION_EVERYONE}","MENTION_EVERYONE"],["%{BKY_PERM_EXTERNAL_EMOJIS}","EXTERNAL_EMOJIS"],["%{BKY_PERM_USE_EXTERNAL_EMOJIS}","USE_EXTERNAL_EMOJIS"],["%{BKY_PERM_CONNECT}","CONNECT"],["%{BKY_PERM_SPEAK}","SPEAK"],["%{BKY_PERM_MUTE_MEMBERS}","MUTE_MEMBERS"],["%{BKY_PERM_DEAFEN_MEMBERS}","DEAFEN_MEMBERS"],["%{BKY_PERM_MOVE_MEMBERS}","MOVE_MEMBERS"],["%{BKY_PERM_USE_VAD}","USE_VAD"],["%{BKY_PERM_CHANGE_NICKNAME}","CHANGE_NICKNAME"],["%{BKY_PERM_MANAGE_NICKNAMES}","MANAGE_NICKNAMES"],["%{BKY_PERM_MANAGE_ROLES}","MANAGE_ROLES"],["%{BKY_PERM_MANAGE_WEBHOOKS}","MANAGE_WEBHOOKS"],["%{BKY_PERM_MANAGE_EMOJIS}","MANAGE_EMOJIS"]]}],colour:"#5B80A5",tooltip:"",output:"Boolean",helpUrl:""};fe.a.Blocks[Cn]={init:function(){this.jsonInit(kn)}},fe.a.JavaScript[Cn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=e.getFieldValue("PERMISSION"),a=["".concat(t,".hasPermission('").concat(n,"')"),fe.a.JavaScript.ORDER_FUNCTION_CALL];return a},ue(Cn,[{type:"notempty",message:"RES_MISSING_MEMBER_HAS_PERMISSION",types:["MEMBER"]}]);var Ln="s4d_member_id",Dn={message0:"%{BKY_MEMBER_ID}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][Ln]={init:function(){this.jsonInit(Dn)}},ge["JavaScript"][Ln]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.id"),ge["JavaScript"].ORDER_NONE]},ue(Ln,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var wn="s4d_member_is_bot",Gn={message0:"%{BKY_MEMBER_IS_BOT}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#5B80A5",output:"Boolean",tooltip:"",helpUrl:""};ge["Blocks"][wn]={init:function(){this.jsonInit(Gn)}},ge["JavaScript"][wn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.bot"),ge["JavaScript"].ORDER_NONE]},ue(wn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Un="s4d_member_tag",Vn={message0:"%{BKY_MEMBER_TAG}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][Un]={init:function(){this.jsonInit(Vn)}},ge["JavaScript"][Un]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.tag"),ge["JavaScript"].ORDER_NONE]},ue(Un,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var xn="s4d_member_username",Jn={message0:"%{BKY_MEMBER_USERNAME}",args0:[{type:"input_value",name:"MEMBER",check:"Member"}],colour:"#50a6c9",output:"String",tooltip:"",helpUrl:""};ge["Blocks"][xn]={init:function(){this.jsonInit(Jn)}},ge["JavaScript"][xn]=function(e){var t=ge["JavaScript"].valueToCode(e,"MEMBER",ge["JavaScript"].ORDER_ATOMIC);return["".concat(t,".user.username"),ge["JavaScript"].ORDER_NONE]},ue(xn,[{type:"notempty",message:"RES_VALID_MEMBER",types:["MEMBER"]}]);var Pn="s4d_send_member",Yn={message0:"%{BKY_SEND_MEMBER}",args0:[{type:"input_value",name:"CONTENT",check:["MessageEmbed","String","Number"]},{type:"input_value",name:"MEMBER",check:"Member"}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Pn]={init:function(){this.jsonInit(Yn)}},fe.a.JavaScript[Pn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"CONTENT",fe.a.JavaScript.ORDER_ATOMIC);if(e.getInput("CONTENT").connection.targetConnection){var a=e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_?e.getInput("CONTENT").connection.targetConnection.getSourceBlock().outputConnection.check_[0]:null;if("MessageEmbed"===a||!a&&"object"===Object(w["a"])(a)){var o="".concat(t,".send(").concat(n,");\n");return o}var r="".concat(t,".send(String(").concat(n,"));\n");return r}var i="".concat(t,".send(String(").concat(n,"));\n");return i},ue(Pn,[{type:"notempty",message:"RES_SEND_CHANNEL_CONTENT",types:["CONTENT"]},{type:"notempty",message:"RES_SEND_MEMBER_MISSING_MEMBER",types:["MEMBER"]}]);var Kn="s4d_set_member_nickname",jn={message0:"%{BKY_SET_MEMBER_NICKNAME}",args0:[{type:"input_value",name:"MEMBER",check:"Member"},{type:"input_value",name:"NEW_NICKNAME",check:["Number","String"]}],previousStatement:null,nextStatement:null,colour:"#4C97FF",tooltip:"",helpUrl:""};fe.a.Blocks[Kn]={init:function(){this.jsonInit(jn)}},fe.a.JavaScript[Kn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"MEMBER",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"NEW_NICKNAME",fe.a.JavaScript.ORDER_ATOMIC),a="".concat(t,".setNickname(").concat(n,");\n");return a},ue(Kn,[{type:"notempty",message:"RES_SET_MEMBER_NICKNAME_MEMBER",types:["MEMBER"]},{type:"notempty",message:"RES_SET_MEMBER_NICKNAME_NEW_NICKNAME",types:["NEW_NICKNAME"]}]);var Hn="s4d_add_data",Fn={message0:"%{BKY_ADD_DATA}",args0:[{type:"input_value",name:"COUNT",check:"Number"},{type:"input_value",name:"KEY",check:["String","Number"]}],nextStatement:null,previousStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Hn]={init:function(){this.jsonInit(Fn)}},fe.a.JavaScript[Hn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"COUNT",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.add(String(".concat(t,"), parseInt(").concat(n,"));\n")};var Xn="s4d_delete_data",Wn={message0:"%{BKY_DELETE_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],previousStatement:null,nextStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Xn]={init:function(){this.jsonInit(Wn)}},fe.a.JavaScript[Xn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.delete(String(".concat(t,"));\n")};var $n="s4d_get_data",zn={message0:"%{BKY_GET_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],output:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[$n]={init:function(){this.jsonInit(zn)}},fe.a.JavaScript[$n]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return["s4d.database.get(String("+t+"))",fe.a.JavaScript.ORDER_ATOMIC]};var qn="s4d_has_data",Qn={message0:"%{BKY_HAS_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]}],output:"Boolean",colour:"#5ba58b",helpUrl:""};fe.a.Blocks[qn]={init:function(){this.jsonInit(Qn)}},fe.a.JavaScript[qn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC);return["s4d.database.has(String("+t+"))",fe.a.JavaScript.ORDER_ATOMIC]};var Zn="s4d_set_data",ea={message0:"%{BKY_SET_DATA}",args0:[{type:"input_value",name:"KEY",check:["String","Number"]},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[Zn]={init:function(){this.jsonInit(ea)}},fe.a.JavaScript[Zn]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"VALUE",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.set(String(".concat(t,"), ").concat(n,");\n")};var ta="s4d_subtract_data",na={message0:"%{BKY_SUBTRACT_DATA}",args0:[{type:"input_value",name:"COUNT",check:"Number"},{type:"input_value",name:"KEY",check:["String","Number"]}],nextStatement:null,previousStatement:null,colour:"#5ba58b",helpUrl:""};fe.a.Blocks[ta]={init:function(){this.jsonInit(na)}},fe.a.JavaScript[ta]=function(e){var t=fe.a.JavaScript.valueToCode(e,"KEY",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"COUNT",fe.a.JavaScript.ORDER_ATOMIC);return"s4d.database.subtract(String(".concat(t,"), parseInt(").concat(n,"));\n")};var aa="s4d_newline",oa={message0:"%{BKY_NEWLINE}",output:"String",colour:"#5ba58b",helpUrl:""};fe.a.Blocks[aa]={init:function(){this.jsonInit(oa)}},fe.a.JavaScript[aa]=function(){return["'\\n'",fe.a.JavaScript.ORDER_ATOMIC]};var ra="s4d_starts_with",ia={message0:"%{BKY_STARTS_WITH}",args0:[{type:"input_value",name:"STRING",check:["String"]},{type:"input_value",name:"SUBSTRING",check:["String"]}],output:"Boolean",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[ra]={init:function(){this.jsonInit(ia)}},fe.a.JavaScript[ra]=function(e){var t=fe.a.JavaScript.valueToCode(e,"STRING",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"SUBSTRING",fe.a.JavaScript.ORDER_ATOMIC),a=["(".concat(t," || '').startsWith(").concat(n," || '')"),fe.a.JavaScript.ORDER_NONE];return a};var sa="s4d_includes",la={message0:"%{BKY_INCLUDES}",args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"INCLUDES",check:"String"}],output:"Boolean",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[sa]={init:function(){this.jsonInit(la)}},fe.a.JavaScript[sa]=function(e){var t=fe.a.JavaScript.valueToCode(e,"TEXT",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"INCLUDES",fe.a.JavaScript.ORDER_ATOMIC),a=["String(".concat(t,").includes(String(").concat(n,"))"),fe.a.JavaScript.ORDER_NONE];return a},ue(sa,[{type:"notempty",message:"RES_INCLUDES_TEXT",types:["TEXT"]},{type:"notempty",message:"RES_INCLUDES_INCLUDES",types:["INCLUDES"]}]);var ca="s4d_replace",Ea={message0:"%{BKY_REPLACE}",args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"REPLACE",check:"String"},{type:"input_value",name:"WITH",check:"String"}],output:"String",colour:"#5ba58b",tooltip:"",helpUrl:""};fe.a.Blocks[ca]={init:function(){this.jsonInit(Ea)}},fe.a.JavaScript[ca]=function(e){var t=fe.a.JavaScript.valueToCode(e,"TEXT",fe.a.JavaScript.ORDER_ATOMIC),n=fe.a.JavaScript.valueToCode(e,"REPLACE",fe.a.JavaScript.ORDER_ATOMIC),a=fe.a.JavaScript.valueToCode(e,"WITH",fe.a.JavaScript.ORDER_ATOMIC),o=["String(".concat(t,").replace(new RegExp(String(").concat(n,"), 'g'), String(").concat(a,"))"),fe.a.JavaScript.ORDER_NONE];return o},ue(ca,[{type:"notempty",message:"RES_REPLACE_STRING",types:["TEXT"]},{type:"notempty",message:"RES_REPLACE_REPLACE",types:["REPLACE"]},{type:"notempty",message:"RES_REPLACE_WITH",types:["WITH"]}]);var _a="s4d_forever",da={message0:"%{BKY_FOREVER}",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENT"}],colour:"#5BA55B",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};fe.a.Blocks[_a]={init:function(){this.jsonInit(da)}},fe.a.JavaScript[_a]=function(e){return"\n while(s4d.client && s4d.client.token) {\n await delay(50);\n ".concat(fe.a.JavaScript.statementToCode(e,"STATEMENT"),"\n console.log('ran')\n }\n ")};var ua="s4d_current",ma={message0:"%{BKY_CURRENT}",args0:[{type:"field_dropdown",name:"DATA_TYPE",options:[["%{BKY_SECOND}","SECOND"],["%{BKY_MINUTE}","MINUTE"],["%{BKY_HOUR}","HOUR"],["%{BKY_DATE}","DATE"],["%{BKY_DAY_OF_WEEK}","DAY_OF_WEEK"]]}],output:"Number",colour:"#D14081",tooltip:"",helpUrl:""};fe.a.Blocks[ua]={init:function(){this.jsonInit(ma)}},fe.a.JavaScript[ua]=function(e){var t=e.getFieldValue("DATA_TYPE");return"SECOND"===t?["(new Date().getSeconds())",fe.a.JavaScript.ORDER_NONE]:"MINUTE"===t?["(new Date().getMinutes())",fe.a.JavaScript.ORDER_NONE]:"HOUR"===t?["(new Date().getHours())",fe.a.JavaScript.ORDER_NONE]:"DATE"===t?["(new Date().getDate())",fe.a.JavaScript.ORDER_NONE]:"DAY_OF_WEEK"===t?["(new Date().getDay())",fe.a.JavaScript.ORDER_NONE]:void 0};var pa="s4d_run_save_output",Sa={message0:"%{BKY_RUN_SAVE_OUTPUT}",args0:[{type:"input_statement",name:"STATEMENT",check:"RunnableActionWithResult"},{type:"field_variable",name:"VAR",variable:null}],colour:"#D14081",tooltip:"",helpUrl:"",inputsInline:!1,previousStatement:null,nextStatement:null};ge["Blocks"][pa]={init:function(){this.jsonInit(Sa)}},ge["JavaScript"][pa]=function(e){var t="".concat(ge["JavaScript"].variableDB_.getName(e.getFieldValue("VAR"),ge["Variables"].NAME_TYPE)," = await ").concat(ge["JavaScript"].statementToCode(e,"STATEMENT"));return t},ue(pa,[{type:"custom",message:"The 'run' block must encapsulate exactly one statement",code:"if (block.getFirstStatementConnection().isConnected()) _return = !block.getFirstStatementConnection().targetBlock().getNextBlock(); else _return = false;"}]);var va="s4d_wait_seconds",Ra={message0:"%{BKY_WAIT_SECONDS}",args0:[{type:"input_value",name:"TIME",check:["Number","String"]}],colour:"#D14081",previousStatement:null,nextStatement:null,tooltip:"",helpUrl:""};ge["Blocks"][va]={init:function(){this.jsonInit(Ra)}},ge["JavaScript"][va]=function(e){var t=ge["JavaScript"].valueToCode(e,"TIME",ge["JavaScript"].ORDER_ATOMIC);return"await delay(Number(".concat(t,")*1000);\n")};var ba=n("3d20"),Na=n.n(ba),Ta=function(e){return e};ge["prompt"]=function(e,t,n){Na.a.fire({title:"Variable:",input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonText:"Look up",showLoaderOnConfirm:!0,allowOutsideClick:function(){return!Na.a.isLoading()}}).then((function(e){e.value&&n(Ta(e.value))}))};var Aa=n("4278");c.a.Tooltip.HOVER_MS=100;var Ma={name:"app",components:{BlocklyComponent:Oe,NavBarComponent:se},beforeCreate:function(){this.$root.$i18n.locale=this.$store.state.blocklyLocale},mounted:function(){var e;!("ScratchNative"in window)&&null!==(e=window.parent)&&void 0!==e&&e.ScratchNative&&(window.ScratchNative=window.parent.ScratchNative);var t=localStorage.getItem("tourDone");null!==t&&this.$store.commit("setTour",{status:t});var n=localStorage.getItem("blocklyLocale");null!==n&&(this.$store.commit("setLocale",{newLocale:n}),this.setLanguage(n)),this.$store.state.tourDone||(this.$tours["start-tour"].start(),this.$store.commit("setTour",{status:!0}))},data:function(){return{options:{renderer:"zelos",theme:Aa["a"],zoom:{controls:!0,startScale:.9,maxScale:3,minScale:.3,scaleSpeed:1.2}},vueTourOptions:{labels:{buttonSkip:this.$t("tour.skip"),buttonPrevious:this.$t("tour.previous"),buttonNext:this.$t("tour.next"),buttonStop:this.$t("tour.finish")},steps:[{target:"#v-step-0",content:this.$t("tour.steps.load_examples"),params:{enableScrolling:!1}},{target:"#v-step-1",content:this.$t("tour.steps.run_test"),params:{enableScrolling:!1}},{target:"#v-step-2",content:this.$t("tour.steps.export_code"),params:{enableScrolling:!1}}]}}}},Oa=Ma,ga=(n("034f"),Object(R["a"])(Oa,i,s,!1,null,null,null)),fa=ga.exports,Ia=n("2f62");a["default"].use(Ia["a"]);var ha=new Ia["a"].Store({state:{workspace:0,blocklyLocale:["en","fr"].includes(navigator.language.split("-")[0])?navigator.language.split("-")[0]:"en",tourDone:!1},mutations:{setWorkspace:function(e,t){var n=t.workspace;e.workspace=n},setLocale:function(e,t){var n=t.newLocale;e.blocklyLocale=n,localStorage.setItem("blocklyLocale",n)},setTour:function(e,t){var n=t.status;e.tourDone=n,localStorage.setItem("tourDone",n)}}}),ya=n("14ba"),Ba=n.n(ya),Ca=n("a925"),ka=n("b079"),La=n.n(ka),Da=n("2536"),wa=n.n(Da),Ga=n("ecee"),Ua=n("c074"),Va=n("ad3d"),xa=n("a884"),Ja=n.n(xa),Pa=n("6a79"),Ya=n.n(Pa),Ka=n("bfb0"),ja=n.n(Ka),Ha=n("e0e1"),Fa=function(){for(var e in Ha)c.a.Msg[e]=Ha[e]},Xa={untitled:"Untitled document",help:"Help",load:{error:"The uploaded file is corrupted and cannot be loaded by Scratch For Discord..."},file:{title:"File",javascript:"Export to Javascript",open:"Open a file...",save:"Save"},edit:{title:"Edit",undo:"Undo",redo:"Redo",clear:"Clear {blockCount} blocks",cleanup:"Clean up blocks",cleardb:"Clear the database"},lang:{title:"Language"},examples:{title:"Examples",confirm:{title:"Delete current blocks?",text:"Would you like to remove the blocks from the current project before importing the example?",cancel:"Cancel",yes:"Yes",no:"No"},loaded:"Example {example} successfully imported!",ping_pong:"ping-pong command",command_parsing:"commands handler",leveling:"XP and levels system"},download:{title:"Download your bot",content:{title:"How to start your bot once downloaded?",unzipFile:"Unzip the downloaded file.",node:"Install NPM and Node.js (search for tutorials on Google)",start:"Run 'npm install' and 'npm start' in a terminal",done:"Your bot is started!"},cancel:"Cancel",confirm:"Download"},tour:{skip:"Skip tour",previous:"Previous",next:"Next",finish:"Finish",steps:{load_examples:"Import examples to discover Scratch4Discord!",run_test:"Test the functionalities of your bot here!",export_code:"Export your code here!"}},warnings:{login_block:'The "Connect to Discord" block in the "Base" category is mandatory.'},run_modal:{title:"Click Start to test your bot!",start:"Start the bot",stop:"Stop the bot",invalid_token:"Unable to connect to Discord... Maybe the bot's token isn't valid!",error:"Unable to connect to Discord... Try again later!",disabled:"⚠️ This feature is only available using the Scratch For Discord App (get it {here})",here:"here"},code_modal:{title:"JavaScript code of your bot"}},Wa={applyBlocklyLocale:Fa,websiteMessages:Xa},$a=n("cfe4"),za=function(){for(var e in $a)c.a.Msg[e]=$a[e]},qa={untitled:"Document sans titre",help:"Aide",load:{error:"Le fichier téléversé est corrompu et ne peut pas être chargé par Scratch For Discord..."},file:{title:"Fichier",javascript:"Exporter vers Javascript",open:"Ouvrir un fichier...",save:"Sauvegarder"},edit:{title:"Modifier",undo:"Annuler",redo:"Rétablir",clear:"Nettoyer {blockCount} blocks",cleanup:"Réorganiser les blocks",cleardb:"Effacer la base de données"},lang:{title:"Langue"},examples:{title:"Exemples",confirm:{title:"Supprimer les blocks",text:"Souhaitez-vous supprimer les blocks du projet actuel avant d'importer l'exemple ?",cancel:"Annuler",yes:"Oui",no:"Non"},loaded:"Exemple {example} importé avec succès !",ping_pong:"Commande ping-pong",command_parsing:"Traitement des commandes",leveling:"Système d'XP et niveaux"},download:{title:"Télécharger votre bot",content:{title:"Comment lancer votre bot une fois le bot téléchargé ?",unzipFile:"Dézippez le fichier obtenu.",node:"Installez NPM et Node.js (cherchez des tutos sur google)",start:"Tapez 'npm install' et 'npm start' dans votre terminal",done:"Votre bot est lancé!"},cancel:"Annuler",confirm:"Télécharger"},tour:{skip:"Sauter la visite",previous:"Précédent",next:"Suivant",finish:"Finir",steps:{load_examples:"Importer des exemples pour découvrir Scratch4Discord!",run_test:"Testez le fonctionnement de votre bot ici!",export_code:"Exportez votre code ici!"}},warnings:{login_block:'Le block "Connexion à Discord" de la catégorie "Base" est obligatoire !'},run_modal:{title:"Appuyez sur démarrer pour tester votre bot!",start:"Démarrer le bot",stop:"Arrêter le bot",invalid_token:"Impossible de se connecter à Discord... Peut-être que le token du bot n'est pas valide !",error:"Impossible de se connecter à Discord... Réessayez plus tard!",disabled:"⚠️ Cette fonction n'est disponible qu'avec l'application Scratch For Discord (obtenez la {here})",here:"ici"},code_modal:{title:"Code JavaScript de votre bot"}},Qa={applyBlocklyLocale:za,websiteMessages:qa},Za=n("03bd"),eo=function(){for(var e in Za)c.a.Msg[e]=Za[e]},to={untitled:"Documento sem nome",help:"Ajuda",load:{error:"O arquivo enviado está corrompido e não pode ser carregado pelo Scratch For Discord..."},file:{title:"Arquivo",javascript:"Exporta para javascirpt",open:"abrir arquivo...",save:"Salva"},edit:{title:"Edita",undo:"desfazer",redo:"refazer",clear:"deleta {blockCount} blocos",cleanup:"limpa blocos",cleardb:"limpa database"},lang:{title:"linguagem"},examples:{title:"Exemplos",confirm:{title:"Deleta os blocos atual?",text:"Você gostaria de remover os blocos do projeto atual antes de importar o exemplo?",cancel:"Cancela",yes:"Sim",no:"Não"},loaded:"Exemplo {example} importando com sucesso!",ping_pong:"comando ping-pong",command_parsing:"handler de comandos",leveling:"XP e sistema de níveis"},download:{title:"Instale o seu bot",content:{title:"Como iniciar o seu bot depois de baixado?",unzipFile:"Descompacte o arquivo baixado.",node:"Instale o NPM e o Node.js (pesquise tutoriais no Google)",start:"Execute 'npm install' e 'npm start' em um terminal",done:"Seu bot foi iniciado!"},cancel:"Cancela",confirm:"Instala"},tour:{skip:"Pular tour",previous:"Anterior",next:"Próximo",finish:"Termina",steps:{load_examples:"Importe exemplos para descobrir Scratch4Discord!",run_test:"Teste as funcionalidades do seu bot aqui!",export_code:"Exporte seu código aqui!"}},warnings:{login_block:'O bloco "Conectar ao Discord" na categoria "Base" é obrigatório.'},run_modal:{title:"Clique em Iniciar para testar seu bot!",start:"Inicie o bot",stop:"Pare o bot",invalid_token:"Unable to connect to Discord... Maybe the bot's token isn't valid!",error:"Incapaz de conectar ao Discord ... Talvez o token do bot não seja válido!",disabled:"⚠️ Este recurso está disponível apenas usando o aplicativo Scratch For Discord (pegue ele {here})",here:"aqui"},code_modal:{title:"Código JavaScript do seu bot"}},no={applyBlocklyLocale:eo,websiteMessages:to};n("f9e3"),n("2dd8"),n("ce8c"),n("2440");Ga["c"].add(Ua["a"]),a["default"].component("font-awesome-icon",Va["a"]),a["default"].use(wa.a),a["default"].use(La.a),a["default"].use(Ca["a"]),a["default"].use(Ba.a),a["default"].use(o["a"]),a["default"].use(r["a"]),a["default"].config.productionTip=!1,a["default"].config.ignoredElements=["field","block","category","xml","mutation","value","sep"];var ao={en:Wa.websiteMessages,fr:Qa.websiteMessages,pt:no.websiteMessages},oo=new Ca["a"]({locale:ao[navigator.language.split("-")[0]]?navigator.language.split("-")[0]:"en",messages:ao});a["default"].mixin({methods:{reloadWorkspace:function(){var e=this.$store.state.workspace,t=c.a.Xml.workspaceToDom(e);e.dispose();var n=c.a.inject(document.getElementById("blocklyDiv"),{renderer:"zelos",theme:Aa["a"],grid:{spacing:25,length:3,colour:"#ccc",snap:!0},zoom:{controls:!0,startScale:.9,maxScale:3,minScale:.3,scaleSpeed:1.2},toolbox:Ne(c.a)});return c.a.Xml.domToWorkspace(t,n),this.$store.commit("setWorkspace",{workspace:n}),e.addChangeListener(c.a.Events.disableOrphans),e},setLanguage:function(e){switch(e){case"en":c.a.setLocale(Ja.a),Wa.applyBlocklyLocale(),this.$root.$i18n.locale="en";break;case"fr":c.a.setLocale(Ya.a),Qa.applyBlocklyLocale(),this.$root.$i18n.locale="fr";break;case"pt":c.a.setLocale(ja.a),no.applyBlocklyLocale(),this.$root.$i18n.locale="pt";break;default:break}},getWorkspaceCode:function(){return this.$store.state.workspace?'\n (async()=>{\n const Discord = require("discord.js");\n const Database = require("easy-json-database");\n const devMode = typeof __E_IS_DEV !== "undefined" && __E_IS_DEV;\n const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\n const s4d = {\n Discord,\n database: new Database(`${devMode ? S4D_NATIVE_GET_PATH : "."}/db.json`),\n joiningMember:null,\n reply:null,\n tokenInvalid:false,\n tokenError: null,\n checkMessageExists() {\n if (!s4d.client) throw new Error(\'You cannot perform message operations without a Discord.js client\')\n if (!s4d.client.readyTimestamp) throw new Error(\'You cannot perform message operations while the bot is not connected to the Discord API\')\n }\n };\n s4d.client = new s4d.Discord.Client({\n intents: [Object.values(s4d.Discord.Intents.FLAGS).reduce((acc, p) => acc | p, 0)],\n partials: ["REACTION"]\n });\n\n '.concat(c.a.JavaScript.workspaceToCode(this.$store.state.workspace),"\n\n return s4d;\n })();\n "):""}}}),new a["default"]({store:ha,render:function(e){return e(fa)},i18n:oo}).$mount("#app")},"627b":function(e,t,n){"use strict";var a=n("802e"),o=n.n(a);o.a},"7ec4":function(e,t,n){"use strict";var a=n("207c"),o=n.n(a);o.a},"802e":function(e,t,n){},"85ec":function(e,t,n){},a930:function(e,t,n){},cfe4:function(e){e.exports=JSON.parse('{"BASE_BLOCKS":"Blocks de base","REPLY":"répondre %1","MESSAGE_RELATED_BLOCKS":"Blocks relatifs aux messages","INIT_TOOLTIP":"Vous permet d\'utiliser les blocks Discord!","LOGIN":"Connexion à Discord avec le token %1","LOGIN_TOOLTIP":"Connecte votre bot à Discord. Pour trouver le token de votre bot, rendez-vous sur https://discord.com/developers/.","ON_MESSAGE":"Quand un message est reçu","ON_CONNECTED":"Quand le bot est connecté","ON_CONNECTED_TOOLTIP":"Évènement émis lorsque votre bot est connecté à Discord.","MESSAGE_ID":"ID du message","MESSAGE_CONTENT":"contenu du message","MESSAGE_AUTHOR":"auteur du message","MESSAGE_AUTHOR_RAW":"%1 de l\'auteur du message","USERNAME":"nom d\'utilisateur","NICKNAME":"pseudo","GET_GUILD":"trouver le serveur %1 via %2","NAME":"nom","ADD_ROLE":"ajouter le rôle %1 au membre %2","REMOVE_ROLE":"enlever le rôle %1 au membre %2","BAN_MEMBER":"bannir le membre %1","KICK_MEMBER":"expulser le membre %1","SEND_MEMBER":"envoyer %1 au membre %2","MESSAGE_GUILD_RAW":"%1 du serveur du message","MESSAGE_CHANNEL_RAW":"%1 du salon du message","MESSAGE_CHANNEL":"salon du message","MESSAGE_GUILD":"serveur du message","BASIC_BLOCKS":"Blocks basics","ADVANCED_BLOCKS":"Blocks avancés","MENTIONED_MEMBER":"membre mentionné","ADMINISTRATOR":"Administrateur","DETECT_MESSAGES":"Détecter les messages","MESSAGE_ACTIONS":"Actions sur le message","RELATED_TO_MESSAGE_STRINGS":"Chaînes relatives au message","DELETE_MESSAGE":"supprimer le message","RES_ADD_REACTION_MISSING_REACTION":"Vous devez spécifier un émoji valide !","ADD_REACTION":"ajouter la réaction %1 au message","MESSAGE_EMBED":"Message Embed","COLOR":"couleur","TITLE":"titre","MESSAGE":"message","IMAGE":"image","FOOTER":"pied de page","THUMBNAIL":"miniature","PURGE":"dans le salon %1 supprimer %2 messages","RES_PURGE_AMOUNT":"Vous devez préciser un nombre valide de messages à supprimer !","RES_PURGE_CHANNEL":"Vous devez préciser un salon valide !","CHANNEL_MESSAGE_ACTIONS":"Actions sur les messages du salon","TOOLS":"Outils","CHECK_PERMISSIONS":"Vérifier les permissions d\'un membre","MEMBER_HAS_PERMISSION":"le membre %1 a la permission %2","PERM_CREATE_INSTANT_INVITE":"créer une invitation instantanée","PERM_KICK_MEMBERS":"expulser des membres","PERM_BAN_MEMBERS":"bannir des membres","PERM_ADMINISTRATOR":"administrateur","PERM_MANAGE_CHANNELS":"gérer les salons","PERM_MANAGE_GUILD":"gérer le serveur","PERM_ADD_REACTIONS":"ajouter des réactions","PERM_VIEW_AUDIT_LOG":"voir les logs du serveur","PERM_PRIORITY_SPEAKER":"voix prioritaire","PERM_VIEW_CHANNEL":"voir le salon","PERM_READ_MESSAGES":"lire les messages","PERM_SEND_MESSAGES":"envoyer des messages","PERM_SEND_TTS_MESSAGES":"envoyer des messages TTS","PERM_MANAGE_MESSAGES":"gérer les messages","PERM_EMBED_LINKS":"intégrer des liens","PERM_ATTACH_FILES":"attacher des fichiers","PERM_READ_MESSAGE_HISTORY":"voir l\'historique des messages","PERM_MENTION_EVERYONE":"mentionner @everyone","PERM_EXTERNAL_EMOJIS":"voir les émojis externes","PERM_USE_EXTERNAL_EMOJIS":"utiliser des émojis externes","PERM_CONNECT":"se connecter","PERM_SPEAK":"parler","PERM_MUTE_MEMBERS":"couper le micro des membres","PERM_DEAFEN_MEMBERS":"mettre en sourdine des membres","PERM_MOVE_MEMBERS":"déplacer des membres","PERM_USE_VAD":"utiliser la détection de la voix","PERM_CHANGE_NICKNAME":"changer de pseudo","PERM_MANAGE_NICKNAMES":"gérer les pseudos","PERM_MANAGE_ROLES":"gérer les rôles","PERM_MANAGE_WEBHOOKS":"gérer les webhooks","PERM_MANAGE_EMOJIS":"gérer les émojis","JOINS_RELATED_BLOCKS":"Blocks relatifs aux arrivées de membre","DETECT_JOINS":"Détecter les arrivées","ON_MEMBER_JOIN":"Quand un membre rejoint le serveur","JOINING_MEMBER_INFORMATIONS":"Informations sur l\'arrivant","JOINING_MEMBER":"membre arrivant","JOINING_GUILD":"serveur du membre arrivant","RELATED_TO_JOIN_STRINGS":"Chaînes relatives à l\'arrivée","JOINING_MEMBER_RAW":"%1 du membre arrivant","JOINING_GUILD_RAW":"%1 du serveur du membre arrivant","TEMPORARILY":"Temporairement","HOURS":"heures","REASON":"raison","DURING_HOURS":"durant","WITH_REASON":"pour la raison","RES_MUST_BE_IN_ON_MESSAGE":"Ce block ne peut être utilisé que dans un évènement \\"Quand un message est reçu\\"","RES_MISSING_CONTENT":"Vous devez préciser un contenu valide à répondre !","RES_MISSING_MEMBER_HAS_PERMISSION":"Vous devez préciser un membre valide à qui vérifier les permissions !","RES_MUST_BE_IN_ON_MEMBER_JOIN":"Ce block ne peut être utilisé que dans un évènement \\"Quand un membre rejoint le serveur\\"","RES_ADD_ROLE_MISSING_ROLE":"Vous devez préciser un nom ou un identifiant de rôle valide à ajouter !","RES_ADD_ROLE_MISSING_MEMBER":"Vous devez préciser un membre valide à qui ajouter le rôle !","RES_REMOVE_ROLE_MISSING_ROLE":"Vous devez préciser un nom ou un identifiant de rôle valide à enlever !","RES_REMOVE_ROLE_MISSING_MEMBER":"Vous devez préciser un membre valide à qui enlever le rôle !","RES_KICK_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à expulser !","RES_BAN_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à bannir !","RES_SEND_MEMBER_MISSING_MEMBER":"Vous devez préciser un membre valide à qui envoyer le message !","MANDATORY_BLOCKS":"Blocks obligatoires","STARTS_WITH":"%1 commence par %2","REPLACE":"dans le texte %1 remplacer %2 par %3","RES_REPLACE_STRING":"Vous devez préciser un texte à modifier !","RES_REPLACE_REPLACE":"Vous devez préciser ce qu\'il faut remplacer dans le texte !","RES_REPLACE_WITH":"Vous devez préciser ce avec quoi remplacer dans le texte !","INCLUDES":"%1 contient %2","RES_INCLUDES_TEXT":"Vous devez préciser un texte dans lequel chercher !","RES_INCLUDES_INCLUDES":"Vous devez préciser un texte à rechercher !","NEWLINE":"nouvelle ligne","FIND_CHANNEL":"Trouver un salon","SEND_CHANNEL_LABEL":"Envoyer un message dans le salon trouvé","GET_CHANNEL":"obtenir le salon dont le %2 est %1","RES_MISSING_CHANNEL_VALUE":"Vous devez préciser un nom ou un identifiant de salon valide !","RES_SEND_CHANNEL_CONTENT":"Vous devez préciser un contenu à envoyer !","RES_SEND_CHANNEL_CHANNEL":"Vous devez préciser un salon dans lequel envoyer le contenu !","SEND_CHANNEL":"envoyer %1 dans le salon %2","TOOLBOX_LOGIC":"Logique","TOOLBOX_LOOPS":"Boucles","TOOLBOX_MATH":"Math","TOOLBOX_TEXT":"Texte","TOOLBOX_LISTS":"Listes","TOOLBOX_COLORS":"Couleurs","TOOLBOX_VARIABLES":"Variables","TOOLBOX_FUNCTIONS":"Fonctions","TOOLBOX_CHANNELS":"Salons","TOOLBOX_ACTIONS":"Actions","TOOLBOX_BASE":"Base","TOOLBOX_SERVER":"Serveurs","TOOLBOX_ROLES":"Rôles","TOOLBOX_MEMBERS":"Membres","FIND_SERVER":"Trouver un serveur","GET_SERVER":"obtenir le serveur dont le %2 est %1","RES_GET_SERVER_SERVER":"Vous devez préciser un nom ou un identifiant de serveur valide !","LABEL_SERVER_INFOS":"Informations sur le serveur","MEMBER_COUNT":"nombre de membres du serveur %1","RES_VALID_SERVER":"Vous devez préciser un serveur valide !","ICON_URL":"URL de l\'icône du serveur %1","SERVER_NAME":"nom du serveur %1","SERVER_OWNER":"propriétaire du serveur %1","RES_SET_SERVER_NAME_SERVER":"Vous devez préciser un serveur valide à qui changer le nom !","RES_SET_SERVER_NAME_NEW_NICKNAME":"Vous devez préciser un nouveau nom valide pour le serveur !","LABEL_MODIFY_SERVER":"Modifier le serveur","SET_SERVER_NAME":"changer le nom du serveur %1 nouveau nom %2","GET_ROLE_SERVER":"sur le serveur","GET_ROLE":"obtenir le rôle dont le %2 est %1","RES_GET_ROLE_VALUE":"Vous devez préciser un nom ou un identifiant de rôle valide !","RES_GET_SERVER_VALUE":"Vous devez préciser un nom ou un identifiant de serveur valide !","FIND_ROLE":"Trouver un rôle","ROLE_ASSIGNMENT":"Affectation des rôles","RES_GET_MEMBER_VALUE":"Vous devez préciser un nom ou un identifiant de membre valide !","RES_GET_MEMBER_SERVER":"Vous devez préciser un serveur valide sur lequel chercher le membre !","MEMBER_INFORMATIONS":"Informations des membres","RES_VALID_MEMBER":"Vous devez préciser un membre valide !","MEMBER_DISCRIMINATOR":"discriminateur du membre %1","MEMBER_ID":"id du membre %1","MEMBER_TAG":"tag du membre %1","MEMBER_USERNAME":"pseudo du membre %1","MEMBER_IS_BOT":"le membre %1 est un robot","GET_MEMBER":"obtenir le membre dont le %2 est %1 sur le serveur %3","FIND_MEMBER":"Trouver un membre","LABEL_MEMBER_ACTIONS":"Actions sur le membre","LABEL_MESSAGE_CONTEXT":"Contexte du message","SET_MEMBER_NICKNAME":"changer le surnom du membre %1 nouveau surnom %2","RES_SET_MEMBER_NICKNAME_MEMBER":"Vous devez préciser un membre valide à qui changer le surnom !","RES_SET_MEMBER_NICKNAME_NEW_NICKNAME":"Vous devez préciser un nouveau surnom valide pour le membre !","SERVER_BOOST_COUNT":"nombre de boosts du serveur %1","SERVER_BOOST_LEVEL":"niveau de boost du serveur %1","SEND_WAIT_REPLY":"envoyer %1 dans le salon %2 et attendre une réponse du membre %3 pendant (minutes) %4 quand une réponse est reçue %5 si aucune réponse n\'est reçue %6","RES_SEND_WAIT_REPLY_VALUE_PARENT":"Ce block ne peut être utilisé que dans un block \\"Attendre une réponse\\" !","SEND_WAIT_REPLY_VALUE":"réponse du membre","FORMS":"Formulaires","SEND_WAIT_REPLY_EXAMPLE":"Quel est votre prénom ?","REPLY_EXAMPLE":"Salut!","ON_REACT_ADDED":"Quand une réaction est ajoutée","REACT_RELATED_BLOCKS":"Blocks relatifs aux réactions","DETECT_REACT":"Détecter les réactions","REACT_INFORMATIONS":"Information sur la réaction ajoutée/enlevée","REACT_MESSAGE_ID":"ID du message","RES_MUST_BE_IN_ON_REACT":"Ce block ne peut être utilisé que dans un block \\"réaction ajoutée\\" ou \\"réaction enlevée\\" !","REACT_EMOJI":"émoji de la réaction","REACT_MEMBER":"membre réagissant","ON_REACT_REMOVED":"Quand une réaction est enlevée","BOT_PING":"ping du bot","BOT_INFORMATIONS":"Informations about the bot","BOT_ACTIONS":"Actions sur le bot","RES_MISSING_GAME":"Vous devez préciser un jeu pour le bot !","SET_BOT_GAME":"définir le jeu du bot à %1","BOT_SERVER_COUNT":"nombre de serveurs du bot","TOOLBOX_E_JOINS":"Arrivées","TOOLBOX_E_MESSAGES":"Messages","TOOLBOX_E_REACTIONS":"Réactions","TOOLBOX_DATABASE":"Base de données","GET_DATA":"obtenir %1 dans la base de données","LABEL_READ_DB":"Lire la base de données","LABEL_UPDATE_DB":"Modifier la base de données","SET_DATA":"définir %1 à %2 dans la base de données","DELETE_DATA":"supprimer %1 de la base de données","HAS_DATA":"%1 existe dans la base de données","ADD_DATA":"ajouter %1 à %2","SUBTRACT_DATA":"soustraire %1 à %2","DETECT_LEAVES":"Détecter les départs","LEAVING_GUILD":"serveur du membre partant","LEAVING_GUILD_RAW":"%1 du serveur du membre partant","LEAVING_MEMBER_INFORMATIONS":"Informations sur le membre","LEAVES_RELATED_BLOCKS":"Blocks relatifs aux départs de membre","ON_MEMBER_LEAVE":"Quand un membre part d\'un serveur","RELATED_TO_LEAVE_STRINGS":"Chaînes relatives au départ","TOOLBOX_E_LEAVES":"Départs","RES_MUST_BE_IN_ON_MEMBER_LEAVE":"Ce block ne peut être utilisé que dans un évènement \\"Quand un membre part d\'un serveur\\"","LEAVING_MEMBER_RAW":"%1 du membre partant","WAIT_SECONDS":"attendre %1 secondes","TOOLBOX_OTHER":"Autre","RUN_SAVE_OUTPUT":"faire %1 et sauvegarder le résultat dans %2","TOOLBOX_MESSAGES":"Messages","GET_MESSAGE":"obtenir le message dont l\'ID est %1 dans le salon %2","RES_GET_MESSAGE_CHANNEL":"Vous devez préciser un salon valide sur lequel chercher le message!","RES_GET_MESSAGE_VALUE":"Vous devez préciser un identifiant de message valide!","FIND_MESSAGE":"Trouver le message","MESSAGE_INFORMATIONS":"Informations sur le message","CURRENT":"%1 actuelle","HOUR":"heure","MINUTE":"minute","MONTH":"mois","DAY_OF_WEEK":"jour de la semaine","SECOND":"seconde","DATE":"date","FOREVER":"répéter indéfiniement %1 faire %2","YES":"oui","NO":"non","CREATE_CHANNEL":"créer un salon avec comme nom %1 sur le serveur %2 de type %3","CHANNEL_ACTIONS":"Actions sur le salon","TEXT":"textuel","VOICE":"vocal","CATEGORY":"catégorie"}')},e0e1:function(e){e.exports=JSON.parse('{"BASE_BLOCKS":"Base blocks","MESSAGE_RELATED_BLOCKS":"Blocks related to messages","REPLY":"reply %1","LOGIN":"Connect to Discord with the token %1","LOGIN_TOOLTIP":"Connect your bot to Discord. To get your bot token, go to https://discord.com/developers/.","ON_MESSAGE":"When a message is received","ON_CONNECTED":"When the bot is connected","ON_CONNECTED_TOOLTIP":"Event emitted when your bot is connected to Discord.","MESSAGE_ID":"message ID","MESSAGE_CONTENT":"message content","MESSAGE_AUTHOR":"message author","MESSAGE_AUTHOR_RAW":"%1 of the message author","USERNAME":"username","NICKNAME":"nickname","GET_GUILD":"find server %1 using %2","NAME":"name","ADD_ROLE":"add role %1 to member %2","REMOVE_ROLE":"remove role %1 from member %2","BAN_MEMBER":"ban member %1","KICK_MEMBER":"kick member %1","SEND_MEMBER":"send %1 to member %2","MESSAGE_GUILD":"message server","MESSAGE_CHANNEL":"message channel","BASIC_BLOCKS":"Basic blocks","ADVANCED_BLOCKS":"Advanced blocks","MENTIONED_MEMBER":"mentioned member","ADMINISTRATOR":"Administrator","DETECT_MESSAGES":"Detect messages","MESSAGE_ACTIONS":"Actions on the message","RELATED_TO_MESSAGE_STRINGS":"Strings related to the message","DELETE_MESSAGE":"delete the message","RES_ADD_REACTION_MISSING_REACTION":"You must specify a valid emoji !","ADD_REACTION":"add reaction %1 to the message","MESSAGE_EMBED":"Message Embed","COLOR":"color","TITLE":"title","MESSAGE":"message","IMAGE":"image","FOOTER":"footer","THUMBNAIL":"thumbnail","PURGE":"in channel %1 purge %2 messages","RES_PURGE_AMOUNT":"You must specify a valid amount of messages to purge!","RES_PURGE_CHANNEL":"You must specify a valid channel!","CHANNEL_MESSAGE_ACTIONS":"Action in the messages of channel","TOOLS":"Tools","CHECK_PERMISSIONS":"Check member permissions","MEMBER_HAS_PERMISSION":"the member %1 has permission %2","PERM_CREATE_INSTANT_INVITE":"create instant invites","PERM_KICK_MEMBERS":"kick members","PERM_BAN_MEMBERS":"ban members","PERM_ADMINISTRATOR":"administrator","PERM_MANAGE_CHANNELS":"manage channels","PERM_MANAGE_GUILD":"manage server","PERM_ADD_REACTIONS":"add reactions","PERM_VIEW_AUDIT_LOG":"view audit logs","PERM_PRIORITY_SPEAKER":"priority-speaker","PERM_VIEW_CHANNEL":"view channel","PERM_READ_MESSAGES":"read messages","PERM_SEND_MESSAGES":"send messages","PERM_SEND_TTS_MESSAGES":"send TTS messages","PERM_MANAGE_MESSAGES":"manage messages","PERM_EMBED_LINKS":"embed links","PERM_ATTACH_FILES":"attach files","PERM_READ_MESSAGE_HISTORY":"read message history","PERM_MENTION_EVERYONE":"mention @everyone","PERM_EXTERNAL_EMOJIS":"view external emojis","PERM_USE_EXTERNAL_EMOJIS":"use external emojis","PERM_CONNECT":"connect","PERM_SPEAK":"speak","PERM_MUTE_MEMBERS":"mute members","PERM_DEAFEN_MEMBERS":"deafen members","PERM_MOVE_MEMBERS":"move members","PERM_USE_VAD":"use voice activity","PERM_CHANGE_NICKNAME":"change nickname","PERM_MANAGE_NICKNAMES":"manage nicknames","PERM_MANAGE_ROLES":"manage roles","PERM_MANAGE_WEBHOOKS":"manage webhooks","PERM_MANAGE_EMOJIS":"manage emojis","JOINS_RELATED_BLOCKS":"Blocks related to member joins","DETECT_JOINS":"Detect joins","ON_MEMBER_JOIN":"When a member joins a server","JOINING_MEMBER_INFORMATIONS":"Informations about the member","JOINING_MEMBER":"joining member","RELATED_TO_JOIN_STRINGS":"Strings related to join","JOINING_MEMBER_RAW":"%1 of the joining member","JOINING_GUILD":"joining member server","TEMPORARILY":"Temporarily","HOURS":"hours","REASON":"reason","DURING_HOURS":"during","WITH_REASON":"for the reason","RES_MUST_BE_IN_ON_MESSAGE":"This block may only be used in a \\"When a message is received\\" event","RES_MISSING_CONTENT":"You must specify a valid content to reply!","RES_MISSING_MEMBER_HAS_PERMISSION":"You must specify a valid member to check permissions!","RES_MUST_BE_IN_ON_MEMBER_JOIN":"This block may only be used in a \\"When a member joins a server\\" event","RES_ADD_ROLE_MISSING_ROLE":"You must specify a valid name or role ID to add!","RES_ADD_ROLE_MISSING_MEMBER":"You must specify a valid member to add the role to!","RES_REMOVE_ROLE_MISSING_ROLE":"You must specify a valid name or role ID to remove!","RES_REMOVE_ROLE_MISSING_MEMBER":"You must specify a valid member to remove the role!","RES_KICK_MEMBER_MISSING_MEMBER":"You must specify a valid member to be kicked!","RES_BAN_MEMBER_MISSING_MEMBER":"You must specify a valid member to be banned!","RES_SEND_MEMBER_MISSING_MEMBER":"You must specify a valid member to send the message to!","MANDATORY_BLOCKS":"Mandatory blocks","STARTS_WITH":"%1 starts with %2","REPLACE":"in text %1 replace %2 with %3","RES_REPLACE_STRING":"You must specify a text to replace!","RES_REPLACE_REPLACE":"You must specify what to replace in the text!","RES_REPLACE_WITH":"You must specify the new value to replace!","INCLUDES":"%1 includes %2","RES_INCLUDES_TEXT":"You must specify a text to see if that includes something!","RES_INCLUDES_INCLUDES":"You must specify a text to see if in the other text includes that!","NEWLINE":"new line","FIND_CHANNEL":"Find a channel","SEND_CHANNEL_LABEL":"Send a message in the found channel","GET_CHANNEL":"get the channel with %2 equal to %1","RES_MISSING_CHANNEL_VALUE":"You must specify a valid channel name or ID!","RES_SEND_CHANNEL_CONTENT":"You must specify a content to send!","RES_SEND_CHANNEL_CHANNEL":"You must specify a channel in which to send the content!","SEND_CHANNEL":"send %1 in the channel %2","TOOLBOX_LOGIC":"Logic","TOOLBOX_LOOPS":"Loops","TOOLBOX_MATH":"Math","TOOLBOX_TEXT":"Text","TOOLBOX_LISTS":"Lists","TOOLBOX_COLORS":"Colors","TOOLBOX_VARIABLES":"Variables","TOOLBOX_FUNCTIONS":"Functions","TOOLBOX_CHANNELS":"Channels","TOOLBOX_ACTIONS":"Actions","TOOLBOX_BASE":"Base","TOOLBOX_SERVER":"Servers","TOOLBOX_ROLES":"Roles","FIND_SERVER":"Find a server","GET_SERVER":"get the server with %2 equal to %1","RES_GET_SERVER_SERVER":"You must specify a valid server name or ID!","LABEL_SERVER_INFOS":"Informations about the server","MEMBER_COUNT":"number of members of server %1","RES_VALID_SERVER":"You must specify a valid server!","ICON_URL":"icon url of server %1","SERVER_NAME":"name of server %1","SERVER_OWNER":"owner of server %1","RES_SET_SERVER_NAME_SERVER":"You must specify a valid server to change the name!","RES_SET_SERVER_NAME_NEW_NICKNAME":"You must specify a new valid name for the server!","LABEL_MODIFY_SERVER":"Modify the server","SET_SERVER_NAME":"change name of server %1 new name %2","GET_ROLE_SERVER":"on the server","GET_ROLE":"get role with %2 equal to %1","RES_GET_ROLE_VALUE":"You must specify a valid name or role ID!","RES_GET_SERVER_VALUE":"You must specify a valid server name or ID!","FIND_ROLE":"Find a role","ROLE_ASSIGNMENT":"Roles assignment","FIND_MEMBER":"Find a member","GET_MEMBER":"get member with %2 equal to %1 on server %3","INIT_TOOLTIP":"Allows you to use Discord blocks!","JOINING_GUILD_RAW":"%1 of the server of the joining member","LABEL_MEMBER_ACTIONS":"Actions on the member","LABEL_MESSAGE_CONTEXT":"Message context","MESSAGE_CHANNEL_RAW":"%1 of the channel of the message","MESSAGE_GUILD_RAW":"%1 of the server of the message","RES_GET_MEMBER_SERVER":"You must specify a valid server on which the member is!","RES_GET_MEMBER_VALUE":"You must specify a valid member ID or member name!","TOOLBOX_MEMBERS":"Member","MEMBER_INFORMATIONS":"Members informations","RES_VALID_MEMBER":"You must specify a valid member !","MEMBER_DISCRIMINATOR":"discriminator of member %1","MEMBER_ID":"id of member %1","MEMBER_TAG":"tag of member %1","MEMBER_USERNAME":"username of member %1","MEMBER_IS_BOT":"member %1 is a bot","SET_MEMBER_NICKNAME":"change nickname of member %1 new nickname %2","RES_SET_MEMBER_NICKNAME_MEMBER":"You must specify a valid member to change nicknam","RES_SET_MEMBER_NICKNAME_NEW_NICKNAME":"You must specify a valid new nickname for the member!","SERVER_BOOST_COUNT":"number of boosts of server %1","SERVER_BOOST_LEVEL":"boost level of server %1","SEND_WAIT_REPLY":"send %1 in the channel %2 and wait for an answer from member %3 during (minutes) %4 when an answer is received %5 if no answer is received %6","RES_SEND_WAIT_REPLY_VALUE_PARENT":"This block can only be used in a \\"Wait for an answer\\" bl!","SEND_WAIT_REPLY_VALUE":"answer of member","FORMS":"Forms","SEND_WAIT_REPLY_EXAMPLE":"What is your name?","REPLY_EXAMPLE":"Hey!","ON_REACT_ADDED":"When a reaction is added","REACT_RELATED_BLOCKS":"Blocks related to reactions","DETECT_REACT":"I\'m writigni\'m writign","REACT_INFORMATIONS":"Informations about the added/removed reaction","REACT_MESSAGE_ID":"reaction message ID","RES_MUST_BE_IN_ON_REACT":"This block can only be used in a \\"reaction added\\" block or a \\"reaction removed\\" block!","REACT_EMOJI":"emoji of the reaction","REACT_MEMBER":"reacting member","ON_REACT_REMOVED":"When a reaction is removed","BOT_PING":"bot ping","BOT_INFORMATIONS":"Bot Informations","BOT_ACTIONS":"Actions on the bot","RES_MISSING_GAME":"You must specify a game for the bot!","SET_BOT_GAME":"set bot game to %1","BOT_SERVER_COUNT":"bot server count","TOOLBOX_E_JOINS":"Joins","TOOLBOX_E_MESSAGES":"Messages","TOOLBOX_E_REACTIONS":"Reactions","TOOLBOX_DATABASE":"Database","GET_DATA":"get %1 from the database","LABEL_READ_DB":"Read database","LABEL_UPDATE_DB":"Update database","SET_DATA":"set %1 to %2 in database","DELETE_DATA":"delete %1 from database","HAS_DATA":"%1 exists in database","ADD_DATA":"add %1 to %2","SUBTRACT_DATA":"subtract %1 from %2","DETECT_LEAVES":"Detect leaves","LEAVING_GUILD":"leaving member server","LEAVING_GUILD_RAW":"%1 of the server of the leaving member","LEAVING_MEMBER_INFORMATIONS":"Informations about the member","LEAVES_RELATED_BLOCKS":"Blocks related to member leaves","ON_MEMBER_LEAVE":"When a member leaves a server","RELATED_TO_LEAVE_STRINGS":"Strings related to leave","TOOLBOX_E_LEAVES":"Leaves","RES_MUST_BE_IN_ON_MEMBER_LEAVE":"This block may only be used in a \\"When a member leaves a server\\" event","LEAVING_MEMBER_RAW":"%1 of the leaving member","WAIT_SECONDS":"wait %1 seconds","TOOLBOX_OTHER":"Other","RUN_SAVE_OUTPUT":"do %1 and save output in %2","TOOLBOX_MESSAGES":"Messages","GET_MESSAGE":"get message with ID equal to %1 in channel %2","RES_GET_MESSAGE_CHANNEL":"You must specify a valid channel on which the message is!","RES_GET_MESSAGE_VALUE":"You must specify a valid message ID!","FIND_MESSAGE":"Find the message","MESSAGE_INFORMATIONS":"Informations about the message","CURRENT":"current %1","HOUR":"hour","MINUTE":"minute","MONTH":"month","DAY_OF_WEEK":"day of week","SECOND":"second","DATE":"date","FOREVER":"repeat forever %1 do %2","YES":"yes","NO":"no","CREATE_CHANNEL":"create channel with name %1 on server %2 of type %3","CHANNEL_ACTIONS":"Actions for the channel","TEXT":"text","VOICE":"voice","CATEGORY":"category"}')}}); +//# sourceMappingURL=app.f87207ed.js.map \ No newline at end of file diff --git a/environments/core/server/sources/s4d/js/app.f87207ed.js.map b/environments/core/server/sources/s4d/js/app.f87207ed.js.map new file mode 100644 index 0000000..da825f7 --- /dev/null +++ b/environments/core/server/sources/s4d/js/app.f87207ed.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?7e02","webpack:///./src/components/NavigationBar/RunModal.vue?5e39","webpack:///./src/App.vue?cfa0","webpack:///./src/components/NavigationBar/NavigationBar.vue?bb93","webpack:///./src/components/NavigationBar/FileMenu.vue?74a4","webpack:///src/components/NavigationBar/FileMenu.vue","webpack:///./src/components/NavigationBar/FileMenu.vue?4818","webpack:///./src/components/NavigationBar/FileMenu.vue","webpack:///./src/components/NavigationBar/EditMenu.vue?acd0","webpack:///src/components/NavigationBar/EditMenu.vue","webpack:///./src/components/NavigationBar/EditMenu.vue?6315","webpack:///./src/components/NavigationBar/EditMenu.vue","webpack:///./src/components/NavigationBar/LanguageMenu.vue?b2ae","webpack:///src/components/NavigationBar/LanguageMenu.vue","webpack:///./src/components/NavigationBar/LanguageMenu.vue?f09d","webpack:///./src/components/NavigationBar/LanguageMenu.vue","webpack:///./src/components/NavigationBar/RunModal.vue?134d","webpack:///src/components/NavigationBar/RunModal.vue","webpack:///./src/components/NavigationBar/RunModal.vue?5982","webpack:///./src/components/NavigationBar/RunModal.vue","webpack:///./src/components/NavigationBar/ExamplesMenu.vue?0b01","webpack:///./src/examples/ping-pong.js","webpack:///./src/examples/command-parsing.js","webpack:///./src/examples/leveling.js","webpack:///src/components/NavigationBar/ExamplesMenu.vue","webpack:///./src/components/NavigationBar/ExamplesMenu.vue?bc21","webpack:///./src/components/NavigationBar/ExamplesMenu.vue","webpack:///./src/components/NavigationBar/CodeModal.vue?fe2a","webpack:///src/components/NavigationBar/CodeModal.vue","webpack:///./src/components/NavigationBar/CodeModal.vue?e6b9","webpack:///./src/components/NavigationBar/CodeModal.vue","webpack:///src/components/NavigationBar/NavigationBar.vue","webpack:///./src/components/NavigationBar/NavigationBar.vue?8352","webpack:///./src/components/NavigationBar/NavigationBar.vue","webpack:///./src/components/BlocklyComponent.vue?3eba","webpack:///./src/restrictions.js","webpack:///./src/toolbox.js","webpack:///src/components/BlocklyComponent.vue","webpack:///./src/components/BlocklyComponent.vue?4dac","webpack:///./src/components/BlocklyComponent.vue","webpack:///./src/blocks/discord/base/bot_ping.js","webpack:///./src/blocks/discord/base/bot_server_count.js","webpack:///./src/blocks/discord/base/login.js","webpack:///./src/blocks/discord/base/on_connected.js","webpack:///./src/blocks/discord/base/set_bot_game.js","webpack:///./src/blocks/discord/message-event/add_reaction.js","webpack:///./src/blocks/discord/message-event/delete_message.js","webpack:///./src/blocks/discord/message-event/mentioned_member.js","webpack:///./src/blocks/discord/message-event/message_id.js","webpack:///./src/blocks/discord/message-event/message_author.js","webpack:///./src/blocks/discord/message-event/message_author_raw.js","webpack:///./src/blocks/discord/message-event/message_channel.js","webpack:///./src/blocks/discord/message-event/message_channel_raw.js","webpack:///./src/blocks/discord/message-event/message_content.js","webpack:///./src/blocks/discord/message-event/message_embed.js","webpack:///./src/blocks/discord/message-event/message_guild.js","webpack:///./src/blocks/discord/message-event/message_guild_raw.js","webpack:///./src/blocks/discord/message-event/on_message.js","webpack:///./src/blocks/discord/message-event/reply.js","webpack:///./src/blocks/discord/message-event/purge.js","webpack:///./src/blocks/discord/join-event/joining_guild.js","webpack:///./src/blocks/discord/join-event/joining_guild_raw.js","webpack:///./src/blocks/discord/join-event/joining_member.js","webpack:///./src/blocks/discord/join-event/joining_member_raw.js","webpack:///./src/blocks/discord/join-event/on_member_join.js","webpack:///./src/blocks/discord/leave-event/leaving_guild.js","webpack:///./src/blocks/discord/leave-event/leaving_guild_raw.js","webpack:///./src/blocks/discord/leave-event/leaving_member_raw.js","webpack:///./src/blocks/discord/leave-event/on_member_leave.js","webpack:///./src/blocks/discord/reaction-event/on_react_added.js","webpack:///./src/blocks/discord/reaction-event/on_react_removed.js","webpack:///./src/blocks/discord/reaction-event/react_emoji.js","webpack:///./src/blocks/discord/reaction-event/react_member.js","webpack:///./src/blocks/discord/reaction-event/react_message_id.js","webpack:///./src/blocks/discord/channels/create_channel.js","webpack:///./src/blocks/discord/channels/get_channel.js","webpack:///./src/blocks/discord/channels/send_channel.js","webpack:///./src/blocks/discord/channels/send_wait_reply.js","webpack:///./src/blocks/discord/channels/send_wait_reply_value.js","webpack:///./src/blocks/discord/servers/boost_level.js","webpack:///./src/blocks/discord/servers/get_server.js","webpack:///./src/blocks/discord/servers/icon_url.js","webpack:///./src/blocks/discord/servers/member_count.js","webpack:///./src/blocks/discord/servers/server_name.js","webpack:///./src/blocks/discord/servers/server_owner.js","webpack:///./src/blocks/discord/servers/set_server_name.js","webpack:///./src/blocks/discord/roles/add_role.js","webpack:///./src/blocks/discord/roles/get_role.js","webpack:///./src/blocks/discord/roles/remove_role.js","webpack:///./src/blocks/discord/members/ban_member.js","webpack:///./src/blocks/discord/members/get_member.js","webpack:///./src/blocks/discord/members/kick_member.js","webpack:///./src/blocks/discord/members/member_discriminator.js","webpack:///./src/blocks/discord/members/member_has_permission.js","webpack:///./src/blocks/discord/members/member_id.js","webpack:///./src/blocks/discord/members/member_is_bot.js","webpack:///./src/blocks/discord/members/member_tag.js","webpack:///./src/blocks/discord/members/member_username.js","webpack:///./src/blocks/discord/members/send_message.js","webpack:///./src/blocks/discord/members/set_member_nickname.js","webpack:///./src/blocks/database/add_data.js","webpack:///./src/blocks/database/delete_data.js","webpack:///./src/blocks/database/get_data.js","webpack:///./src/blocks/database/has_data.js","webpack:///./src/blocks/database/set_data.js","webpack:///./src/blocks/database/subtract_data.js","webpack:///./src/blocks/text/newline.js","webpack:///./src/blocks/text/starts-with.js","webpack:///./src/blocks/text/includes.js","webpack:///./src/blocks/text/replace.js","webpack:///./src/blocks/loops/forever.js","webpack:///./src/blocks/other/current.js","webpack:///./src/blocks/other/run_save_output.js","webpack:///./src/blocks/other/wait_seconds.js","webpack:///./src/prompt.js","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue","webpack:///./src/store.js","webpack:///./src/locales/en.js","webpack:///./src/locales/fr.js","webpack:///./src/locales/pt.js","webpack:///./src/main.js","webpack:///./src/components/NavigationBar/CodeModal.vue?8e41","webpack:///./src/components/BlocklyComponent.vue?1210"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","options","vueTourOptions","steps","staticRenderFns","staticStyle","_v","_s","$t","staticClass","directives","rawName","modifiers","configurationValidated","on","exportToCode","askForFile","load","save","component","undo","redo","clear","blockCount","cleanUp","clearDB","$event","changeLanguage","electronApp","_e","scopedSlots","_u","fn","proxy","botStarting","style","getBotImageStyle","class","getUsernameSpanClass","botTag","ref","onHidden","getHandleButtonClass","getTooltipContent","handle","domProps","content","_t","restrictions","registerRestrictions","blockName","blockRestrictions","decode","html","txt","document","createElement","innerHTML","disableUnapplicable","workspace","blocks","getAllBlocks","block","type","messages","issues","restriction","validateConfiguration","validateRestriction","message","Blockly","Msg","alert","setWarningText","join","reverse","startsWith","substring","types","includes","getTopLevelParent","filter","b","disabled","getParent","hasParentOfType","getInput","connection","targetBlock","e","console","log","hasParent","replace","x","blockData","init","jsonInit","code","ORDER_NONE","valueToCode","ORDER_ATOMIC","Blocks","JavaScript","statements","statementToCode","game","reaction","searchType","getFieldValue","BORDER_FIELDS","BORDER_TYPES","s4d_message_embed","setColour","setTooltip","setHelpUrl","BORDER_MUTATOR_MIXIN","inputs_","mutationToDom","container","setAttribute","domToMutation","xmlElement","getAttribute","toLowerCase","updateShape_","decompose","containerBlock","newBlock","appendDummyInput","setAlign","ALIGN_RIGHT","appendField","BaseBlockly","FieldCheckbox","toUpperCase","initSvg","compose","removeInput","appendValueInput","setCheck","Extensions","registerMutator","targetConnection","contentType","getSourceBlock","outputConnection","check_","channel","amount","server","member","time","statementThen","statementCatch","newName","role","roleType","permission","ORDER_FUNCTION_CALL","count","string","text","replaceWith","dataType","variableDB_","getName","NAME_TYPE","renameVar","msg","defaultValue","callback","Swal","fire","title","input","inputAttributes","autocapitalize","showCancelButton","confirmButtonText","showLoaderOnConfirm","allowOutsideClick","isLoading","then","Vue","use","Vuex","Store","state","blocklyLocale","navigator","language","split","tourDone","mutations","setWorkspace","setLocale","newLocale","localStorage","setItem","setTour","status","applyBlocklyLocale","blocklyMessages","websiteMessages","untitled","help","error","file","javascript","open","edit","cleanup","cleardb","lang","examples","confirm","cancel","yes","no","loaded","ping_pong","command_parsing","leveling","download","unzipFile","node","start","done","tour","skip","previous","next","finish","load_examples","run_test","export_code","warnings","login_block","run_modal","stop","invalid_token","here","code_modal","library","add","faPowerOff","FontAwesomeIcon","VueTour","VueToast","Vuei18n","VueSwal","BootstrapVue","IconsPlugin","config","productionTip","ignoredElements","en","customLocaleEN","fr","customLocaleFR","pt","customLocalePT","i18n","locale","mixin","methods","reloadWorkspace","$store","dom","Xml","workspaceToDom","dispose","newWorkspace","inject","getElementById","renderer","theme","Theme","grid","spacing","colour","snap","zoom","controls","startScale","maxScale","minScale","scaleSpeed","toolbox","domToWorkspace","commit","addChangeListener","Events","disableOrphans","setLanguage","blocklyLocaleEN","$root","$i18n","blocklyLocaleFR","blocklyLocalePT","getWorkspaceCode","workspaceToCode","store","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,EAAiB5B,GAAY,CACzCK,EAAGL,EACH+B,GAAG,EACHF,QAAS,IAUV,OANAf,EAAQd,GAAUW,KAAKmB,EA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,EAAKI,GAEhCtR,KAAKiR,OAAOuB,OAAO,eAAgB,CAC/BxO,UAAWsN,IAEftN,EAAUyO,kBAAkB9N,IAAQ+N,OAAOC,gBAEpC3O,GAEX4O,YArCK,SAqCO/B,GACR,OAAQA,GACJ,IAAK,KAEDlM,IAAQ8H,UAAUoG,MAElBtC,GAAexD,qBAEf/M,KAAK8S,MAAMC,MAAMlC,OAAS,KAC1B,MACJ,IAAK,KAEDlM,IAAQ8H,UAAUuG,MAElBvC,GAAe1D,qBAEf/M,KAAK8S,MAAMC,MAAMlC,OAAS,KAC1B,MACJ,IAAK,KAEDlM,IAAQ8H,UAAUwG,MAElBtC,GAAe5D,qBAEf/M,KAAK8S,MAAMC,MAAMlC,OAAS,KAC1B,MACJ,QACI,QAGZqC,iBAnEK,WAoED,OAAIlT,KAAKiR,OAAOhF,MAAMjI,UACtB,qvCAuBMW,IAAQiC,WAAWuM,gBAAgBnT,KAAKiR,OAAOhF,MAAMjI,WAvB3D,wEADwC,OAiCpD,IAAI6H,aAAI,CACJuH,SACAC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,KACf3C,UACD4C,OAAO,S,oCC3JV,yBAAke,EAAG,G,oCCAre,yBAA+e,EAAG,G","file":"js/app.f87207ed.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('NavBarComponent',{attrs:{\"id\":\"navSpace\"}}),_c('BlocklyComponent',{attrs:{\"id\":\"blocklySpace\",\"options\":_vm.options}}),_c('v-tour',{attrs:{\"name\":\"start-tour\",\"steps\":_vm.vueTourOptions.steps,\"options\":_vm.vueTourOptions}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-navbar',{staticStyle:{\"background-color\":\"#161719\",\"user-select\":\"none\"},attrs:{\"toggleable\":\"lg\",\"type\":\"dark\",\"id\":\"navbar nav-main\"}},[_c('b-navbar-brand',[_c('img',{attrs:{\"src\":\"scratch.png\",\"width\":\"40\",\"draggable\":\"false\"}}),_vm._v(\" Scratch For Discord \")]),_c('b-navbar-toggle',{attrs:{\"target\":\"nav-collapse\"}}),_c('b-collapse',{attrs:{\"id\":\"nav-collapse\",\"is-nav\":\"\"}},[_c('b-navbar-nav',[_c('CodeModal'),_c('FileMenu'),_c('EditMenu'),_c('LanguageMenu'),_c('ExamplesMenu'),_c('b-nav-item',{attrs:{\"href\":\"https://androz2091.gitbook.io/scratch-for-discord/\",\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.$t('help')))])],1),_c('b-navbar-nav',{staticClass:\"ml-auto\"},[_c('RunModal'),_c('b-button',{staticStyle:{\"border-right-color\":\"#161719\",\"border-radius\":\"0em\",\"border-top-left-radius\":\"0.25em\",\"border-bottom-left-radius\":\"0.25em\"}},[_c('span',{attrs:{\"contenteditable\":\"true\",\"id\":\"docName\"}},[_vm._v(_vm._s(_vm.$t(\"untitled\")))])]),_c('b-button',{directives:[{name:\"b-modal\",rawName:\"v-b-modal.run-modal\",modifiers:{\"run-modal\":true}}],staticStyle:{\"border-right-color\":\"#161719\",\"border-radius\":\"0em\"},attrs:{\"id\":\"v-step-1\",\"disabled\":!_vm.configurationValidated}},[_c('b-icon-play')],1),_c('b-button',{staticStyle:{\"border-radius\":\"0em\",\"border-top-right-radius\":\"0.25em\",\"border-bottom-right-radius\":\"0.25em\"},attrs:{\"id\":\"v-step-2\",\"disabled\":!_vm.configurationValidated},on:{\"click\":_vm.exportToCode}},[_c('b-icon-download')],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('file.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":_vm.askForFile}},[_vm._v(_vm._s(_vm.$t('file.open')))]),_c('input',{attrs:{\"hidden\":\"\",\"id\":\"load-code\",\"type\":\"file\",\"accept\":\".s4d\"},on:{\"change\":_vm.load}}),_c('b-dropdown-item',{directives:[{name:\"b-modal\",rawName:\"v-b-modal.code-modal\",modifiers:{\"code-modal\":true}}]},[_vm._v(_vm._s(_vm.$t('file.javascript')))]),_c('b-dropdown-item',{on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t('file.save')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FileMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FileMenu.vue?vue&type=template&id=ffd127de&\"\nimport script from \"./FileMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./FileMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('edit.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":_vm.undo}},[_vm._v(_vm._s(_vm.$t('edit.undo')))]),_c('b-dropdown-item',{on:{\"click\":_vm.redo}},[_vm._v(_vm._s(_vm.$t('edit.redo')))]),_c('b-dropdown-item',{on:{\"click\":_vm.clear}},[_vm._v(_vm._s(_vm.$t('edit.clear', { blockCount: _vm.blockCount })))]),_c('b-dropdown-item',{on:{\"click\":_vm.cleanUp}},[_vm._v(_vm._s(_vm.$t('edit.cleanup')))]),_c('b-dropdown-item',{on:{\"click\":_vm.clearDB}},[_vm._v(_vm._s(_vm.$t('edit.cleardb')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EditMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./EditMenu.vue?vue&type=template&id=038d6629&\"\nimport script from \"./EditMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./EditMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"text\":_vm.$t('lang.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('en')}}},[_vm._v(\"English (EN)\")]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('fr')}}},[_vm._v(\"Français (FR)\")]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.changeLanguage('pt')}}},[_vm._v(\"Português (PT)\")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LanguageMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LanguageMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./LanguageMenu.vue?vue&type=template&id=387469d2&\"\nimport script from \"./LanguageMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./LanguageMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"id\":\"run-modal\",\"hide-footer\":\"\",\"title\":_vm.$t('run_modal.title')}},[_c('div',{staticClass:\"d-block\"},[_c('b-container',[(!_vm.electronApp)?_c('b-row',[_c('i18n',{attrs:{\"path\":\"run_modal.disabled\",\"tag\":\"h5\"},scopedSlots:_vm._u([{key:\"here\",fn:function(){return [_c('a',{attrs:{\"href\":\"https://androz2091.github.io/scratch-for-discord/download/index.html\",\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.$t('run_modal.here')))])]},proxy:true}],null,false,608003906)})],1):_vm._e(),_c('hr'),_c('b-row',[_c('b-col',{attrs:{\"sm\":\"12\",\"lg\":\"8\"}},[_c('div',{staticClass:\"botinfos\"},[_c('b-overlay',{staticClass:\"d-inline-block\",attrs:{\"show\":_vm.botStarting,\"rounded\":\"circle\"}},[_c('div',{style:(_vm.getBotImageStyle())})]),_c('span',{class:_vm.getUsernameSpanClass()},[_vm._v(\"Logged in as \"+_vm._s(_vm.botTag || \"Unknown#0000\"))])],1)]),_c('b-col',[_c('div',{staticClass:\"handlebuttondiv\"},[_c('b-overlay',{ref:\"button\",staticClass:\"d-inline-block\",attrs:{\"show\":_vm.botStarting,\"rounded\":\"\",\"opacity\":\"0.6\",\"spinner-small\":\"\",\"spinner-variant\":\"primary\"},on:{\"hidden\":_vm.onHidden}},[_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover\",modifiers:{\"hover\":true}}],class:_vm.getHandleButtonClass(),attrs:{\"title\":_vm.getTooltipContent()},on:{\"click\":function($event){return _vm.handle()}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"power-off\"}})],1)],1)],1)])],1)],1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RunModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RunModal.vue?vue&type=template&id=5685b124&\"\nimport script from \"./RunModal.vue?vue&type=script&lang=js&\"\nexport * from \"./RunModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RunModal.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-nav-item-dropdown',{attrs:{\"id\":\"v-step-0\",\"text\":_vm.$t('examples.title'),\"right\":\"\"}},[_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('ping-pong')}}},[_vm._v(_vm._s(_vm.$t('examples.ping_pong')))]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('command-parsing')}}},[_vm._v(_vm._s(_vm.$t('examples.command_parsing')))]),_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.load('leveling')}}},[_vm._v(_vm._s(_vm.$t('examples.leveling')))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export default `\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !ping\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n pong!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`;","export default `\r\n \r\n \r\n arguments\r\n command\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n SPLIT\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n command\r\n \r\n \r\n \r\n GET_REMOVE\r\n FROM_START\r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n command\r\n \r\n \r\n \r\n \r\n !say\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n You have written the following content after !say:\r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n JOIN\r\n \r\n \r\n arguments\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`;","export default `\r\n\r\n \r\n member_xp\r\n member_level\r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n xp-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n level-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n xp-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_xp\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n GT\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n level-\r\n \r\n \r\n \r\n \r\n ID\r\n \r\n \r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n Congratulations, \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n you jumped to level \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n !!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !level\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n , you are currently level: \r\n \r\n \r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n \r\n \r\n \r\n !xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Salut!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n , you need \r\n \r\n \r\n \r\n \r\n MINUS\r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n member_xp\r\n \r\n \r\n \r\n \r\n \r\n \r\n to jump to level \r\n \r\n \r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n member_level\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n`;","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExamplesMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ExamplesMenu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ExamplesMenu.vue?vue&type=template&id=683767eb&\"\nimport script from \"./ExamplesMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./ExamplesMenu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"id\":\"code-modal\",\"title\":_vm.$t('code_modal.title'),\"ok-only\":\"\"}},[_c('textarea',{attrs:{\"disabled\":\"\",\"id\":\"code\"},domProps:{\"value\":_vm.content}})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CodeModal.vue?vue&type=template&id=787d9541&\"\nimport script from \"./CodeModal.vue?vue&type=script&lang=js&\"\nexport * from \"./CodeModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CodeModal.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./NavigationBar.vue?vue&type=template&id=013b31d7&\"\nimport script from \"./NavigationBar.vue?vue&type=script&lang=js&\"\nexport * from \"./NavigationBar.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{ref:\"blocklyDiv\",staticClass:\"blocklyDiv\",attrs:{\"id\":\"blocklyDiv\"}}),_c('xml',{ref:\"blocklyToolbox\",staticStyle:{\"display\":\"none\"}},[_vm._t(\"default\")],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Blockly from \"blockly\";\r\n\r\nexport const restrictions = {};\r\n\r\nexport function registerRestrictions (blockName, blockRestrictions) {\r\n restrictions[blockName] = blockRestrictions;\r\n return;\r\n}\r\n\r\nconst decode = (html) => {\r\n const txt = document.createElement(\"textarea\");\r\n txt.innerHTML = html;\r\n return txt.value;\r\n}\r\n\r\nexport const disableUnapplicable = (workspace) => {\r\n\r\n // Gets all blocks in the workspace\r\n const blocks = workspace.getAllBlocks(false);\r\n \r\n // For each block of the workspace\r\n for (let block of blocks) {\r\n\r\n // Checks\r\n if (!block) continue;\r\n if (!restrictions[block.type]) restrictions[block.type] = [];\r\n\r\n const messages = [];\r\n let issues = 0;\r\n \r\n for (let restriction of restrictions[block.type]) {\r\n if (!validateConfiguration(block, restriction)) continue;\r\n \r\n if (!validateRestriction(block, blocks, restriction)) {\r\n if (restriction.message){\r\n if(Blockly.Msg[restriction.message]){\r\n messages.push(Blockly.Msg[restriction.message]);\r\n } else {\r\n window.alert(\"KEY NOT FOUND: \"+restriction.message);\r\n messages.push(decode(restriction.message));\r\n }\r\n }\r\n issues++;\r\n }\r\n }\r\n\r\n if (issues < 1) {\r\n block.setWarningText(null);\r\n } else {\r\n if (messages.length > 0){\r\n block.setWarningText(messages.join(\"\\n\"));\r\n }\r\n }\r\n }\r\n}\r\n \r\nfunction validateRestriction(block, blocks, restriction) {\r\n let reverse = false;\r\n let type = restriction.type;\r\n if (type !== \"custom\" && type.startsWith(\"!\")) {\r\n type = type.substring(1);\r\n reverse = true;\r\n }\r\n switch (type) {\r\n case \"toplevelparent\":\r\n return (restriction.types.includes(getTopLevelParent(block).type)) !== reverse;\r\n case \"blockexists\":\r\n return (blocks.filter(b => restriction.types.includes(b.type) && !b.disabled).length > 0) !== reverse;\r\n case \"parent\":\r\n return (restriction.types.includes(block.getParent().type)) !== reverse;\r\n case \"hasparent\":\r\n return (hasParentOfType(block, restriction.types)) !== reverse;\r\n case \"notempty\":\r\n for (let type of restriction.types){\r\n try {\r\n if (!block.getInput(type).connection.targetBlock()) return false;\r\n } catch(e){\r\n console.log(block.type);\r\n }\r\n }\r\n return true;\r\n default:\r\n return true;\r\n }\r\n}\r\n \r\nfunction validateConfiguration(block, restriction) {\r\n switch (restriction.type) {\r\n case \"toplevelparent\":\r\n case \"!toplevelparent\":\r\n return getTopLevelParent(block) && !getTopLevelParent(block).disabled;\r\n case \"blockexists\":\r\n case \"!blockexists\":\r\n return true;\r\n case \"parent\":\r\n case \"!parent\":\r\n return block.getParent() && !block.getParent().disabled;\r\n case \"hasparent\":\r\n case \"custom\":\r\n case \"notempty\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasParentOfType(block, types){\r\n let hasParent = false;\r\n while(block.getParent()){\r\n if(types.includes(block.getParent().type)){\r\n hasParent = true;\r\n }\r\n block = block.getParent();\r\n }\r\n return hasParent;\r\n}\r\n\r\nfunction getTopLevelParent(block) {\r\n if (!block) return null;\r\n if (!block.getParent()) return block;\r\n return getTopLevelParent(block.getParent());\r\n}\r\n","export default (Blockly) => {\r\n return (`\r\n \r\n \r\n \r\n \r\n EQ\r\n \r\n \r\n AND\r\n \r\n \r\n \r\n TRUE\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n WHILE\r\n \r\n \r\n i\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n j\r\n \r\n \r\n BREAK\r\n \r\n \r\n \r\n \r\n 0\r\n \r\n \r\n ADD\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n ROOT\r\n \r\n \r\n 9\r\n \r\n \r\n \r\n \r\n SIN\r\n \r\n \r\n 45\r\n \r\n \r\n \r\n \r\n PI\r\n \r\n \r\n \r\n EVEN\r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n ROUND\r\n \r\n \r\n 3.1\r\n \r\n \r\n \r\n \r\n \r\n SUM\r\n \r\n \r\n \r\n \r\n 64\r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n \r\n \r\n 50\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n \r\n b\r\n \r\n \r\n \r\n\r\n \r\n \r\n item\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n a\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n FIRST\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n FROM_START\r\n \r\n \r\n text\r\n \r\n \r\n \r\n \r\n UPPERCASE\r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n BOTH\r\n \r\n \r\n abc\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 5\r\n \r\n \r\n \r\n \r\n \r\n \r\n FIRST\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n GET\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n SET\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n FROM_START\r\n FROM_START\r\n \r\n \r\n list\r\n \r\n \r\n \r\n \r\n \r\n SPLIT\r\n \r\n \r\n ,\r\n \r\n \r\n \r\n \r\n NUMERIC\r\n 1\r\n \r\n \r\n \r\n \r\n #ff0000\r\n \r\n \r\n \r\n \r\n \r\n 100\r\n \r\n \r\n \r\n \r\n 50\r\n \r\n \r\n \r\n \r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n #ff0000\r\n \r\n \r\n \r\n \r\n #3333ff\r\n \r\n \r\n \r\n \r\n 0.5\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 2\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Your bot token\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ REPLY_EXAMPLE }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 👍\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ SEND_WAIT_REPLY_EXAMPLE }}\r\n \r\n \r\n \r\n \r\n 5\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n 2\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n world\r\n \r\n \r\n \r\n \r\n \r\n \r\n hello\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n points\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n points\r\n \r\n \r\n \r\n \r\n \r\n`.replace(/{{\\s([A-z]{3,})\\s}}/g, (x) => {\r\n return Blockly.Msg[x.replace(\"{{ \", \"\").replace(\" }}\", \"\")];\r\n}))};","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BlocklyComponent.vue?vue&type=template&id=180ad633&scoped=true&\"\nimport script from \"./BlocklyComponent.vue?vue&type=script&lang=js&\"\nexport * from \"./BlocklyComponent.vue?vue&type=script&lang=js&\"\nimport style0 from \"./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"180ad633\",\n null\n \n)\n\nexport default component.exports","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_bot_ping\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BOT_PING}\",\r\n \"colour\": \"#5b67a5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Number\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.client.ws.ping\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_bot_server_count\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BOT_SERVER_COUNT}\",\r\n \"colour\": \"#5b67a5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Number\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.client.guilds.cache.size\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_login\";\r\n\r\nconst blockData = {\r\n \"type\": \"block_type\",\r\n \"message0\": \"%{BKY_LOGIN}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TOKEN\",\r\n \"check\": \"String\"\r\n }\r\n ],\r\n \"colour\": \"#F46580\",\r\n \"tooltip\": \"%{BKY_LOGIN_TOOLTIP}\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const value = Blockly.JavaScript.valueToCode(block, \"TOKEN\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `await s4d.client.login(${value}).catch((e) => { s4d.tokenInvalid = true; s4d.tokenError = e; });\\n`;\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_connected\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_CONNECTED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ],\r\n \"tooltip\": \"%{BKY_ON_CONNECTED_TOOLTIP}\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('ready', async () => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_bot_game\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_BOT_GAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"GAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const game = Blockly.JavaScript.valueToCode(block, \"GAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `s4d.client.user.setActivity(String(${game}));\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_GAME\",\r\n types: [\r\n \"GAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_add_reaction\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_REACTION}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"REACTION\",\r\n \"check\": \"String\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const reaction = Blockly.JavaScript.valueToCode(block, \"REACTION\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `s4dmessage.react(${reaction});`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_REACTION_MISSING_REACTION\",\r\n types: [\r\n \"REACTION\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_delete\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_DELETE_MESSAGE}\",\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(){\r\n const code = `s4dmessage.delete();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_mentioned_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MENTIONED_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Member\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [`s4dmessage.mentions.members.first()`, Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_ID}\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"output\": \"String\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_author\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_AUTHOR}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.member\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_author_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_AUTHOR_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4dmessage.author.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4dmessage.author.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"(s4dmessage.member || await s4dmessage.guild.members.fetch(s4dmessage.author.id)).nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CHANNEL}\",\r\n \"colour\": \"#a55b80\",\r\n \"output\": \"Channel\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.channel\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_channel_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CHANNEL_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"(s4dmessage.channel || {}).id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"(s4dmessage.channel || {}).name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_content\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_CONTENT}\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"output\": \"String\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.content\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import BaseBlockly from \"blockly\";\r\nimport Blockly from \"blockly/core\";\r\n\r\n\r\nconst BORDER_FIELDS = [ \"MESSAGE\", \"COLOR\", \"TITLE\", \"IMAGE\",\"FOOTER\", \"THUMBNAIL\"];\r\n\r\nconst BORDER_TYPES = [ \"String\", \"Colour\", \"String\", \"String\",\"String\", \"String\" ];\r\n\r\n\r\nconst s4d_message_embed = {\r\n \"message0\": \"%{BKY_MESSAGE_EMBED}\",\r\n \"mutator\": \"s4d_message_embed_mutator\",\r\n \"output\": \"MessageEmbed\",\r\n \"helpUrl\": \"\",\r\n \"tooltip\": \"\",\r\n \"colour\": \"#40BF4A\"\r\n};\r\n\r\nBlockly.Blocks[\"s4d_message_embed\"] = {\r\n init: function() {\r\n this.jsonInit(s4d_message_embed);\r\n }\r\n};\r\n\r\nBlockly.Blocks[\"s4d_message_embed_mutator\"] = {\r\n init: function() {\r\n this.setColour(\"#CECDCE\");\r\n this.setTooltip(\"\");\r\n this.setHelpUrl(\"\");\r\n }\r\n};\r\n\r\nconst BORDER_MUTATOR_MIXIN = {\r\n inputs_: [ true, false, false, false ,false,false],\r\n\r\n\r\n mutationToDom: function() {\r\n if (!this.inputs_) {\r\n return null;\r\n }\r\n const container = document.createElement(\"mutation\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) container.setAttribute(BORDER_FIELDS[i], this.inputs_[i])\r\n }\r\n return container;\r\n },\r\n \r\n domToMutation: function(xmlElement) {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = xmlElement.getAttribute(BORDER_FIELDS[i].toLowerCase()) == \"true\";\r\n }\r\n this.updateShape_();\r\n },\r\n\r\n decompose: function(workspace) {\r\n const containerBlock = workspace.newBlock(\"s4d_message_embed_mutator\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n containerBlock.appendDummyInput()\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]])\r\n .appendField(new Blockly.FieldCheckbox(this.inputs_[i] ? \"TRUE\" : \"FALSE\"), BORDER_FIELDS[i].toUpperCase());\r\n }\r\n containerBlock.initSvg();\r\n return containerBlock;\r\n },\r\n\r\n compose: function(containerBlock) {\r\n // Set states\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = (containerBlock.getFieldValue(BORDER_FIELDS[i].toUpperCase()) == \"TRUE\"); \r\n }\r\n this.updateShape_();\r\n },\r\n\r\n updateShape_: function() {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.getInput(BORDER_FIELDS[i].toUpperCase())) this.removeInput(BORDER_FIELDS[i].toUpperCase());\r\n }\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) {\r\n this.appendValueInput(BORDER_FIELDS[i].toUpperCase())\r\n .setCheck(BORDER_TYPES[i])\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]]);\r\n }\r\n }\r\n }\r\n};\r\n\r\nBlockly.Extensions.registerMutator(\"s4d_message_embed_mutator\", BORDER_MUTATOR_MIXIN, null, [\"\"]);\r\n\r\nBlockly.JavaScript[\"s4d_message_embed\"] = function(block){\r\n return [ `\r\n {\r\n embed: {\r\n title: ${Blockly.JavaScript.valueToCode(block, \"TITLE\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n color: ${Blockly.JavaScript.valueToCode(block, \"COLOR\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n image: { url: ${Blockly.JavaScript.valueToCode(block, \"IMAGE\", Blockly.JavaScript.ORDER_ATOMIC) || null} }, \r\n\r\n description: ${Blockly.JavaScript.valueToCode(block, \"MESSAGE\", Blockly.JavaScript.ORDER_ATOMIC) || null},\r\n footer: { text: ${Blockly.JavaScript.valueToCode(block, \"FOOTER\", Blockly.JavaScript.ORDER_ATOMIC) || null} },\r\n thumbnail: { url: ${Blockly.JavaScript.valueToCode(block, \"THUMBNAIL\", Blockly.JavaScript.ORDER_ATOMIC) || null} }\r\n\r\n }\r\n }\r\n `, Blockly.JavaScript.ORDER_ATOMIC ];\r\n};","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4dmessage.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_message_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MESSAGE_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"(s4dmessage.guild || {}).id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"(s4dmessage.guild || {}).name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_message\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MESSAGE} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('messageCreate', async (s4dmessage) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_reply\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REPLY}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"Number\", \"String\", \"MessageEmbed\" ]\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `s4dmessage.channel.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `s4dmessage.channel.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `s4dmessage.channel.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MESSAGE\",\r\n types: [\r\n \"s4d_on_message\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_purge\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_PURGE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"AMOUNT\",\r\n \"check\": \"Number\" \r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"inputsInline\": true,\r\n \"colour\": \"#1a75ff\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const amount = Blockly.JavaScript.valueToCode(block, \"AMOUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${channel}.bulkDelete((${amount}|1))`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_PURGE_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_PURGE_AMOUNT\",\r\n types: [\r\n \"AMOUNT\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.joiningMember.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.joiningMember.guild.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"s4d.joiningMember.guild.name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.joiningMember\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_joining_member_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_JOINING_MEMBER_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.joiningMember.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4d.joiningMember.user.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"s4d.joiningMember.nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_JOIN\",\r\n types: [\r\n \"s4d_on_member_join\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_member_join\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MEMBER_JOIN} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('guildMemberAdd', async (param1) => {\\ns4d.joiningMember = param1;\\n${statements}s4d.joiningMember = null\\n});\\n`;\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_guild\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_GUILD}\",\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"s4d.leavingMember.guild\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_guild_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_GUILD_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.leavingMember.guild.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NAME\"){\r\n const code = [\"s4d.leavingMember.guild.name\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_leaving_member_raw\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_LEAVING_MEMBER_RAW}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"%{BKY_NICKNAME}\",\r\n \"NICKNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5BA58C\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"ID\"){\r\n const code = [\"s4d.leavingMember.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"USERNAME\"){\r\n const code = [\"s4d.leavingMember.user.username\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n } else if(searchType === \"NICKNAME\"){\r\n const code = [\"s4d.leavingMember.nickname\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_MEMBER_LEAVE\",\r\n types: [\r\n \"s4d_on_member_leave\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_on_member_leave\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_MEMBER_LEAVE} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('guildMemberRemove', async (param1) => {\\ns4d.leavingMember = param1;\\n${statements}s4d.leavingMember = null\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_react_added\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_REACT_ADDED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('MESSAGE_REACTION_ADD', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\n\r\nconst blockName = \"s4d_on_react_removed\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ON_REACT_REMOVED} %1 %2\",\r\n \"colour\": \"#F5AB1A\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENTS\"\r\n }\r\n ]\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const statements = Blockly.JavaScript.statementToCode(block, \"STATEMENTS\");\r\n const code = `s4d.client.on('MESSAGE_REACTION_REMOVED', async (rGuild, rChannel, rMessage, rMember, rEmoji) => {\\n${statements}\\n});\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_emoji\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_EMOJI}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rEmoji\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_MEMBER}\",\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rMember\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);","import * as Blockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_react_message_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REACT_MESSAGE_ID}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n const code = [\"rMessage.id\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"toplevelparent\",\r\n message: \"RES_MUST_BE_IN_ON_REACT\",\r\n types: [\r\n \"s4d_on_react_added\",\r\n \"s4d_on_react_removed\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_create_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_CREATE_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NAME\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": [ \"Server\" ]\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_TEXT}\",\r\n \"TEXT\"\r\n ],\r\n [\r\n \"%{BKY_VOICE}\",\r\n \"VOICE\"\r\n ],\r\n [\r\n \"%{BKY_CATEGORY}\",\r\n \"CATEGORY\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"inputsInline\": false,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const type = block.getFieldValue(\"TYPE\");\r\n const name = Blockly.JavaScript.valueToCode(block, \"NAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${server}.channels.create(${name}, {\r\n type: '${type.toLowerCase()}'\r\n });\\n`;\r\n return code;\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#a55b80\",\r\n \"output\": \"Channel\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"NAME\"){\r\n return [ `s4d.client.channels.cache.find((channel) => channel.name === ${value})`, Blockly.JavaScript.ORDER_ATOMIC ];\r\n } else {\r\n return [ `s4d.client.channels.cache.get(${value})`, Blockly.JavaScript.ORDER_ATOMIC ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_CHANNEL_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_channel\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_CHANNEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `${channel}.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `${channel}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${channel}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_wait_reply\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_WAIT_REPLY}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CHANNEL\",\r\n \"check\": \"Channel\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TIME\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"THEN\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"CATCH\"\r\n }\r\n ],\r\n \"colour\": \"#4C97FF\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const channel = Blockly.JavaScript.valueToCode(block, \"CHANNEL\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const time = Blockly.JavaScript.valueToCode(block, \"TIME\", Blockly.JavaScript.ORDER_ATOMIC) || 5;\r\n const statementThen = Blockly.JavaScript.statementToCode(block, \"THEN\");\r\n const statementCatch = Blockly.JavaScript.statementToCode(block, \"CATCH\");\r\n let code = \"\";\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n code = `${channel}.send(${content});\\n`;\r\n } else {\r\n code = `${channel}.send(String(${content}));\\n`;\r\n }\r\n } else {\r\n code = `${channel}.send(String(${content}));\\n`;\r\n }\r\n code += `${channel}.awaitMessages((m) => m.author.id === ${member}.id, { time: (${time}*60*1000), max: 1 }).then(async (collected) => { s4d.reply = collected.first().content; \\n ${statementThen} \\n s4d.reply = null; }).catch(async (e) => { console.error(e); ${statementCatch} });`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CHANNEL\",\r\n types: [\r\n \"CHANNEL\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_wait_reply_value\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_WAIT_REPLY_VALUE}\",\r\n \"colour\": \"#5BA58C\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(){\r\n const code = [\"s4d.reply\", Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"hasparent\",\r\n message: \"RES_SEND_WAIT_REPLY_VALUE_PARENT\",\r\n types: [\r\n \"s4d_send_wait_reply\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_boost_level\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_BOOST_LEVEL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Number\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.premiumTier`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_server\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_SERVER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#D85E47\",\r\n \"output\": \"Server\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n if(searchType === \"NAME\"){\r\n return [ `s4d.client.guilds.cache.find((guild) => guild.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `s4d.client.guilds.cache.get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_SERVER_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_icon_url\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ICON_URL}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.iconURL({ dynamic: true })`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_count\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_COUNT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Number\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.memberCount`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_server_name\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_NAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.name`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_server_owner\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SERVER_OWNER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#e07e6c\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${server}.owner || await ${server}.members.fetch(${server}.ownerID)`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_server_name\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_SERVER_NAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NEW_NICKNAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const newName = Blockly.JavaScript.valueToCode(block, \"NEW_NICKNAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${server}.setName(${newName});\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_SERVER_NAME_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_SERVER_NAME_NEW_NICKNAME\",\r\n types: [\r\n \"NEW_NICKNAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_add_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"ROLE\",\r\n \"check\": [ \"String\", \"Role\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const role = Blockly.JavaScript.valueToCode(block, \"ROLE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"ROLE\").connection.targetConnection){\r\n const roleType = block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if(roleType === \"String\"){\r\n const code = `${member}.roles.add(${member}.guild.roles.cache.find((role) => role.id === ${role} || role.name === ${role} || '@'+role.name === ${role}));\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.roles.add(${role});\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.roles.add(${role});\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_ROLE_MISSING_ROLE\",\r\n types: [\r\n \"ROLE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_ADD_ROLE_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport BaseBlockly from \"blockly\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst BORDER_FIELDS = [ \"GET_ROLE_SERVER\" ];\r\n\r\nconst BORDER_TYPES = [ \"Server\" ];\r\n\r\nconst blockName = \"s4d_get_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_NAME}\",\r\n \"NAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#2EB66B\",\r\n \"output\": \"Role\",\r\n \"mutator\": \"s4d_get_role_mutator\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.Blocks[\"s4d_get_role_mutator\"] = {\r\n init: function() {\r\n this.setColour(\"#CECDCE\");\r\n this.setTooltip(\"\");\r\n this.setHelpUrl(\"\");\r\n }\r\n};\r\n\r\nconst BORDER_MUTATOR_MIXIN = {\r\n inputs_: [ false ],\r\n\r\n mutationToDom: function() {\r\n if (!this.inputs_) {\r\n return null;\r\n }\r\n const container = document.createElement(\"mutation\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) container.setAttribute(BORDER_FIELDS[i], this.inputs_[i])\r\n }\r\n return container;\r\n },\r\n \r\n domToMutation: function(xmlElement) {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = xmlElement.getAttribute(BORDER_FIELDS[i]) == \"true\";\r\n }\r\n this.updateShape_();\r\n },\r\n\r\n decompose: function(workspace) {\r\n const containerBlock = workspace.newBlock(\"s4d_get_role_mutator\");\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n containerBlock.appendDummyInput()\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]])\r\n .appendField(new Blockly.FieldCheckbox(this.inputs_[i] ? \"TRUE\" : \"FALSE\"), BORDER_FIELDS[i].toUpperCase());\r\n }\r\n containerBlock.initSvg();\r\n return containerBlock;\r\n },\r\n\r\n compose: function(containerBlock) {\r\n // Set states\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n this.inputs_[i] = (containerBlock.getFieldValue(BORDER_FIELDS[i].toUpperCase()) == \"TRUE\"); \r\n }\r\n this.updateShape_();\r\n },\r\n\r\n updateShape_: function() {\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.getInput(BORDER_FIELDS[i].toUpperCase())) this.removeInput(BORDER_FIELDS[i].toUpperCase());\r\n }\r\n for (let i = 0; i < this.inputs_.length; i++) {\r\n if (this.inputs_[i]) {\r\n this.appendValueInput(BORDER_FIELDS[i].toUpperCase())\r\n .setCheck(BORDER_TYPES[i])\r\n .setAlign(Blockly.ALIGN_RIGHT)\r\n .appendField(BaseBlockly.Msg[BORDER_FIELDS[i]]);\r\n }\r\n }\r\n }\r\n};\r\n\r\nBlockly.Extensions.registerMutator(\"s4d_get_role_mutator\", BORDER_MUTATOR_MIXIN, null, [\"\"]);\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n const server = block.getFieldValue(\"GET_ROLE_SERVER\");\r\n if(searchType === \"NAME\"){\r\n if(server){\r\n return [ `${server}.roles.cache.find((role) => role.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).find((role) => role.name === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n } else {\r\n if(server){\r\n return [ `${server}.roles.get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `Array.prototype.concat.apply([], s4d.client.guilds.cache.array().map((g) => g.roles.cache.array())).get(${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_ROLE_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_remove_role\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REMOVE_ROLE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"ROLE\",\r\n \"check\": [ \"String\", \"Role\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const role = Blockly.JavaScript.valueToCode(block, \"ROLE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"ROLE\").connection.targetConnection){\r\n const roleType = block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"ROLE\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if(roleType === \"String\"){\r\n const code = `${member}.roles.remove(${member}.guild.roles.cache.find((role) => role.id === ${role} || role.name === ${role} || '@'+role.name === ${role}));\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.roles.remove(${role});\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.roles.remove(${role});\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REMOVE_ROLE_MISSING_ROLE\",\r\n types: [\r\n \"ROLE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REMOVE_ROLE_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_ban_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_BAN_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.ban();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_BAN_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_get_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"SEARCH_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_USERNAME}\",\r\n \"USERNAME\"\r\n ],\r\n [\r\n \"id\",\r\n \"ID\"\r\n ]\r\n ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SERVER\",\r\n \"check\": \"Server\"\r\n }\r\n ],\r\n \"colour\": \"#187795\",\r\n \"output\": \"Member\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const searchType = block.getFieldValue(\"SEARCH_TYPE\");\r\n const server = Blockly.JavaScript.valueToCode(block, \"SERVER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(searchType === \"USERNAME\"){\r\n return [ `${server}.members.cache.find((m) => m.user.username === ${value})`, Blockly.JavaScript.ORDER_NONE ];\r\n } else {\r\n return [ `(${server}.members.cache.get(${value}) || await ${server}.members.fetch(${value}))`, Blockly.JavaScript.ORDER_NONE ];\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_MEMBER_VALUE\",\r\n types: [\r\n \"VALUE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_GET_MEMBER_SERVER\",\r\n types: [\r\n \"SERVER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_kick_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_KICK_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.kick();\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_KICK_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_discriminator\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_DISCRIMINATOR}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.discriminator`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_has_permission\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_HAS_PERMISSION}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"PERMISSION\",\r\n \"options\": [\r\n [\r\n \"%{BKY_PERM_CREATE_INSTANT_INVITE}\",\r\n \"CREATE_INSTANT_INVITE\"\r\n ],\r\n [\r\n \"%{BKY_PERM_KICK_MEMBERS}\",\r\n \"KICK_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_BAN_MEMBERS}\",\r\n \"BAN_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ADMINISTRATOR}\",\r\n \"ADMINISTRATOR\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_CHANNELS}\",\r\n \"MANAGE_CHANNELS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_GUILD}\",\r\n \"MANAGE_GUILD\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ADD_REACTIONS}\",\r\n \"ADD_REACTIONS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_VIEW_AUDIT_LOG}\",\r\n \"VIEW_AUDIT_LOG\"\r\n ],\r\n [\r\n \"%{BKY_PERM_PRIORITY_SPEAKER}\",\r\n \"PRIORITY_SPEAKER\"\r\n ],\r\n [\r\n \"%{BKY_PERM_VIEW_CHANNEL}\",\r\n \"VIEW_CHANNEL\"\r\n ],\r\n [\r\n \"%{BKY_PERM_READ_MESSAGES}\",\r\n \"READ_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SEND_MESSAGES}\",\r\n \"SEND_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SEND_TTS_MESSAGES}\",\r\n \"SEND_TTS_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_MESSAGES}\",\r\n \"MANAGE_MESSAGES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_EMBED_LINKS}\",\r\n \"EMBED_LINKS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_ATTACH_FILES}\",\r\n \"ATTACH_FILES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_READ_MESSAGE_HISTORY}\",\r\n \"READ_MESSAGE_HISTORY\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MENTION_EVERYONE}\",\r\n \"MENTION_EVERYONE\"\r\n ],\r\n [\r\n \"%{BKY_PERM_EXTERNAL_EMOJIS}\",\r\n \"EXTERNAL_EMOJIS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_USE_EXTERNAL_EMOJIS}\",\r\n \"USE_EXTERNAL_EMOJIS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_CONNECT}\",\r\n \"CONNECT\"\r\n ],\r\n [\r\n \"%{BKY_PERM_SPEAK}\",\r\n \"SPEAK\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MUTE_MEMBERS}\",\r\n \"MUTE_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_DEAFEN_MEMBERS}\",\r\n \"DEAFEN_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MOVE_MEMBERS}\",\r\n \"MOVE_MEMBERS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_USE_VAD}\",\r\n \"USE_VAD\"\r\n ],\r\n [\r\n \"%{BKY_PERM_CHANGE_NICKNAME}\",\r\n \"CHANGE_NICKNAME\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_NICKNAMES}\",\r\n \"MANAGE_NICKNAMES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_ROLES}\",\r\n \"MANAGE_ROLES\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_WEBHOOKS}\",\r\n \"MANAGE_WEBHOOKS\"\r\n ],\r\n [\r\n \"%{BKY_PERM_MANAGE_EMOJIS}\",\r\n \"MANAGE_EMOJIS\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"colour\": \"#5B80A5\",\r\n \"tooltip\": \"\",\r\n \"output\": \"Boolean\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const permission = block.getFieldValue(\"PERMISSION\");\r\n const code = [ `${member}.hasPermission('${permission}')`, Blockly.JavaScript.ORDER_FUNCTION_CALL ];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_MISSING_MEMBER_HAS_PERMISSION\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_id\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_ID}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.id`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_is_bot\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_IS_BOT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#5B80A5\",\r\n \"output\": \"Boolean\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.bot`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_tag\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_TAG}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.tag`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_member_username\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_MEMBER_USERNAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"colour\": \"#50a6c9\",\r\n \"output\": \"String\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ `${member}.user.username`, Blockly.JavaScript.ORDER_NONE ];\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_VALID_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_send_member\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SEND_MEMBER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"CONTENT\",\r\n \"check\": [ \"MessageEmbed\", \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const content = Blockly.JavaScript.valueToCode(block, \"CONTENT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n if(block.getInput(\"CONTENT\").connection.targetConnection){\r\n const contentType = block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_ ?\r\n block.getInput(\"CONTENT\").connection.targetConnection.getSourceBlock().outputConnection.check_[0] :\r\n null;\r\n if((contentType === \"MessageEmbed\") || (!contentType && typeof contentType === \"object\")){\r\n const code = `${member}.send(${content});\\n`;\r\n return code;\r\n } else {\r\n const code = `${member}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n } else {\r\n const code = `${member}.send(String(${content}));\\n`;\r\n return code;\r\n }\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_CHANNEL_CONTENT\",\r\n types: [\r\n \"CONTENT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SEND_MEMBER_MISSING_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../../restrictions\";\r\n\r\nconst blockName = \"s4d_set_member_nickname\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_MEMBER_NICKNAME}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"MEMBER\",\r\n \"check\": \"Member\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"NEW_NICKNAME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#4C97FF\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const member = Blockly.JavaScript.valueToCode(block, \"MEMBER\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const newName = Blockly.JavaScript.valueToCode(block, \"NEW_NICKNAME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = `${member}.setNickname(${newName});\\n`;\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_MEMBER_NICKNAME_MEMBER\",\r\n types: [\r\n \"MEMBER\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_SET_MEMBER_NICKNAME_NEW_NICKNAME\",\r\n types: [\r\n \"NEW_NICKNAME\"\r\n ]\r\n }\r\n]);\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_add_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_ADD_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"COUNT\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"nextStatement\": null,\r\n \"previousStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const count = Blockly.JavaScript.valueToCode(block, \"COUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.add(String(${key}), parseInt(${count}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_delete_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_DELETE_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.delete(String(${key}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_get_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_GET_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"output\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ 's4d.database.get(String('+key+'))', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_has_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_HAS_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return [ 's4d.database.has(String('+key+'))', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_set_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SET_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"VALUE\"\r\n }\r\n ],\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const value = Blockly.JavaScript.valueToCode(block, \"VALUE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.set(String(${key}), ${value});\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_subtract_data\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_SUBTRACT_DATA}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"COUNT\",\r\n \"check\": \"Number\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"KEY\",\r\n \"check\": [ \"String\", \"Number\" ]\r\n }\r\n ],\r\n \"nextStatement\": null,\r\n \"previousStatement\": null,\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const key = Blockly.JavaScript.valueToCode(block, \"KEY\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const count = Blockly.JavaScript.valueToCode(block, \"COUNT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `s4d.database.subtract(String(${key}), parseInt(${count}));\\n`;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_newline\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_NEWLINE}\",\r\n \"output\": \"String\",\r\n \"colour\": \"#5ba58b\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function() {\r\n return [ '\\'\\\\n\\'', Blockly.JavaScript.ORDER_ATOMIC ];\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_starts_with\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_STARTS_WITH}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"STRING\",\r\n \"check\": [ \"String\" ]\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"SUBSTRING\",\r\n \"check\": [ \"String\" ]\r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const string = Blockly.JavaScript.valueToCode(block, \"STRING\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const substring = Blockly.JavaScript.valueToCode(block, \"SUBSTRING\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [ `(${string} || '').startsWith(${substring} || '')`, Blockly.JavaScript.ORDER_NONE ];\r\n return code;\r\n};\r\n","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_includes\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_INCLUDES}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TEXT\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"INCLUDES\",\r\n \"check\": \"String\" \r\n }\r\n ],\r\n \"output\": \"Boolean\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const text = Blockly.JavaScript.valueToCode(block, \"TEXT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const includes = Blockly.JavaScript.valueToCode(block, \"INCLUDES\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [`String(${text}).includes(String(${includes}))`, Blockly.JavaScript.ORDER_NONE];\r\n \r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_INCLUDES_TEXT\",\r\n types: [\r\n \"TEXT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_INCLUDES_INCLUDES\",\r\n types: [\r\n \"INCLUDES\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_replace\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_REPLACE}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TEXT\",\r\n \"check\": \"String\"\r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"REPLACE\",\r\n \"check\": \"String\" \r\n },\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"WITH\",\r\n \"check\": \"String\" \r\n }\r\n ],\r\n \"output\": \"String\",\r\n \"colour\": \"#5ba58b\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const text = Blockly.JavaScript.valueToCode(block, \"TEXT\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const replace = Blockly.JavaScript.valueToCode(block, \"REPLACE\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const replaceWith = Blockly.JavaScript.valueToCode(block, \"WITH\", Blockly.JavaScript.ORDER_ATOMIC);\r\n const code = [`String(${text}).replace(new RegExp(String(${replace}), 'g'), String(${replaceWith}))`, Blockly.JavaScript.ORDER_NONE];\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_STRING\",\r\n types: [\r\n \"TEXT\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_REPLACE\",\r\n types: [\r\n \"REPLACE\"\r\n ]\r\n },\r\n {\r\n type: \"notempty\",\r\n message: \"RES_REPLACE_WITH\",\r\n types: [\r\n \"WITH\"\r\n ]\r\n }\r\n]);","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_forever\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_FOREVER}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_dummy\"\r\n },\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENT\"\r\n }\r\n ],\r\n \"colour\": \"#5BA55B\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n return `\r\n while(s4d.client && s4d.client.token) {\r\n await delay(50);\r\n ${Blockly.JavaScript.statementToCode(block, 'STATEMENT')}\r\n console.log('ran')\r\n }\r\n `;\r\n};\r\n","import Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_current\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_CURRENT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"field_dropdown\",\r\n \"name\": \"DATA_TYPE\",\r\n \"options\": [\r\n [\r\n \"%{BKY_SECOND}\",\r\n \"SECOND\"\r\n ],\r\n [\r\n \"%{BKY_MINUTE}\",\r\n \"MINUTE\"\r\n ],\r\n [\r\n \"%{BKY_HOUR}\",\r\n \"HOUR\"\r\n ],\r\n [\r\n \"%{BKY_DATE}\",\r\n \"DATE\"\r\n ],\r\n [\r\n \"%{BKY_DAY_OF_WEEK}\",\r\n \"DAY_OF_WEEK\"\r\n ]\r\n ]\r\n }\r\n ],\r\n \"output\": \"Number\",\r\n \"colour\": \"#D14081\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block) {\r\n const dataType = block.getFieldValue(\"DATA_TYPE\");\r\n if(dataType === \"SECOND\"){\r\n return [\"(new Date().getSeconds())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"MINUTE\"){\r\n return [\"(new Date().getMinutes())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"HOUR\"){\r\n return [\"(new Date().getHours())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"DATE\"){\r\n return [\"(new Date().getDate())\", Blockly.JavaScript.ORDER_NONE];\r\n } else if(dataType === \"DAY_OF_WEEK\"){\r\n return [\"(new Date().getDay())\", Blockly.JavaScript.ORDER_NONE];\r\n }\r\n};\r\n","import * as Blockly from \"blockly/core\";\r\nimport { registerRestrictions } from \"../../restrictions\";\r\n\r\nconst blockName = \"s4d_run_save_output\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_RUN_SAVE_OUTPUT}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_statement\",\r\n \"name\": \"STATEMENT\",\r\n \"check\": \"RunnableActionWithResult\"\r\n },\r\n {\r\n \"type\": \"field_variable\",\r\n \"name\": \"VAR\",\r\n \"variable\": null\r\n }\r\n ],\r\n \"colour\": \"#D14081\",\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\",\r\n \"inputsInline\": false,\r\n \"previousStatement\": null,\r\n \"nextStatement\": null\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const code = `${Blockly.JavaScript.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE)} = await ${Blockly.JavaScript.statementToCode(block, 'STATEMENT')}`\r\n return code;\r\n};\r\n\r\nregisterRestrictions(blockName, [\r\n {\r\n type: \"custom\",\r\n message: \"The 'run' block must encapsulate exactly one statement\",\r\n code: \"if (block.getFirstStatementConnection().isConnected()) _return = !block.getFirstStatementConnection().targetBlock().getNextBlock(); else _return = false;\"\r\n }\r\n]);\r\n","import * as Blockly from \"blockly/core\";\r\n\r\nconst blockName = \"s4d_wait_seconds\";\r\n\r\nconst blockData = {\r\n \"message0\": \"%{BKY_WAIT_SECONDS}\",\r\n \"args0\": [\r\n {\r\n \"type\": \"input_value\",\r\n \"name\": \"TIME\",\r\n \"check\": [ \"Number\", \"String\" ]\r\n }\r\n ],\r\n \"colour\": \"#D14081\",\r\n \"previousStatement\": null,\r\n \"nextStatement\": null,\r\n \"tooltip\": \"\",\r\n \"helpUrl\": \"\"\r\n};\r\n\r\nBlockly.Blocks[blockName] = {\r\n init: function() {\r\n this.jsonInit(blockData);\r\n }\r\n};\r\n\r\nBlockly.JavaScript[blockName] = function(block){\r\n const time = Blockly.JavaScript.valueToCode(block, \"TIME\", Blockly.JavaScript.ORDER_ATOMIC);\r\n return `await delay(Number(${time})*1000);\\n`;\r\n};","/* eslint-disable no-import-assign */\r\n/**\r\n * @license\r\n * \r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * @fileoverview Define custom blocks.\r\n * @author abbychau@gmail.com (Abby Chau)\r\n */\r\n\r\n\r\nimport * as Blockly from 'blockly/core';\r\nimport Swal from \"sweetalert2\";\r\n\r\nvar renameVar = function(name) {\r\n return name;\r\n};\r\n\r\nBlockly.prompt = function(msg, defaultValue, callback) {\r\n\tSwal.fire({\r\n\t\ttitle: \"Variable:\",\r\n\t\tinput: \"text\",\r\n\t\tinputAttributes: {\r\n\t\t\tautocapitalize: \"off\"\r\n\t\t},\r\n\t\tshowCancelButton: true,\r\n\t\tconfirmButtonText: \"Look up\",\r\n\t\tshowLoaderOnConfirm: true,\r\n\t\tallowOutsideClick: () => !Swal.isLoading()\r\n\t}).then(result => {\r\n\t\tif (result.value) {\r\n\t\t\tcallback(renameVar(result.value));\r\n\t\t}\r\n\t});\r\n};\r\n","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=f22da3c4&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue';\r\nimport Vuex from 'vuex';\r\n\r\nVue.use(Vuex);\r\n\r\nexport default new Vuex.Store({\r\n state: {\r\n workspace: 0,\r\n blocklyLocale: ([\"en\", \"fr\"].includes(navigator.language.split(\"-\")[0]) ? navigator.language.split(\"-\")[0] : \"en\"),\r\n tourDone: false\r\n },\r\n mutations: {\r\n setWorkspace (state, { workspace }) {\r\n state.workspace = workspace;\r\n },\r\n setLocale (state, { newLocale }) {\r\n state.blocklyLocale = newLocale;\r\n localStorage.setItem('blocklyLocale', newLocale);\r\n },\r\n setTour (state, { status }){\r\n state.tourDone = status;\r\n localStorage.setItem('tourDone', status);\r\n }\r\n }\r\n});\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./en-US.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Untitled document\",\r\n help: \"Help\",\r\n load: {\r\n error: \"The uploaded file is corrupted and cannot be loaded by Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"File\",\r\n javascript: \"Export to Javascript\",\r\n open: \"Open a file...\",\r\n save: \"Save\"\r\n },\r\n edit: {\r\n title: \"Edit\",\r\n undo: \"Undo\",\r\n redo: \"Redo\",\r\n clear: \"Clear {blockCount} blocks\",\r\n cleanup: \"Clean up blocks\",\r\n cleardb: \"Clear the database\"\r\n },\r\n lang: {\r\n title: \"Language\"\r\n },\r\n examples: {\r\n title: \"Examples\",\r\n confirm: {\r\n title: \"Delete current blocks?\",\r\n text: \"Would you like to remove the blocks from the current project before importing the example?\",\r\n cancel: \"Cancel\",\r\n yes: \"Yes\",\r\n no: \"No\"\r\n },\r\n loaded: \"Example {example} successfully imported!\",\r\n ping_pong: \"ping-pong command\",\r\n command_parsing: \"commands handler\",\r\n leveling: \"XP and levels system\"\r\n },\r\n download: {\r\n title: \"Download your bot\",\r\n content: {\r\n title: \"How to start your bot once downloaded?\",\r\n unzipFile: \"Unzip the downloaded file.\",\r\n node: \"Install NPM and Node.js (search for tutorials on Google)\",\r\n start: \"Run 'npm install' and 'npm start' in a terminal\",\r\n done: \"Your bot is started!\"\r\n },\r\n cancel: \"Cancel\",\r\n confirm: \"Download\"\r\n },\r\n tour: {\r\n skip: \"Skip tour\",\r\n previous: \"Previous\",\r\n next: \"Next\",\r\n finish: \"Finish\",\r\n steps: {\r\n load_examples: \"Import examples to discover Scratch4Discord!\",\r\n run_test: \"Test the functionalities of your bot here!\",\r\n export_code: \"Export your code here!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"The \\\"Connect to Discord\\\" block in the \\\"Base\\\" category is mandatory.\"\r\n },\r\n run_modal: {\r\n title: \"Click Start to test your bot!\",\r\n start: \"Start the bot\",\r\n stop: \"Stop the bot\",\r\n invalid_token: \"Unable to connect to Discord... Maybe the bot's token isn't valid!\",\r\n error: \"Unable to connect to Discord... Try again later!\",\r\n disabled: \"⚠️ This feature is only available using the Scratch For Discord App (get it {here})\",\r\n here: \"here\"\r\n },\r\n code_modal: {\r\n title: \"JavaScript code of your bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./fr-FR.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Document sans titre\",\r\n help: \"Aide\",\r\n load: {\r\n error: \"Le fichier téléversé est corrompu et ne peut pas être chargé par Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"Fichier\",\r\n javascript: \"Exporter vers Javascript\",\r\n open: \"Ouvrir un fichier...\",\r\n save: \"Sauvegarder\"\r\n },\r\n edit: {\r\n title: \"Modifier\",\r\n undo: \"Annuler\",\r\n redo: \"Rétablir\",\r\n clear: \"Nettoyer {blockCount} blocks\",\r\n cleanup: \"Réorganiser les blocks\",\r\n cleardb: \"Effacer la base de données\"\r\n },\r\n lang: {\r\n title: \"Langue\"\r\n },\r\n examples: {\r\n title: \"Exemples\",\r\n confirm: {\r\n title: \"Supprimer les blocks\",\r\n text: \"Souhaitez-vous supprimer les blocks du projet actuel avant d'importer l'exemple ?\",\r\n cancel: \"Annuler\",\r\n yes: \"Oui\",\r\n no: \"Non\"\r\n },\r\n loaded: \"Exemple {example} importé avec succès !\",\r\n ping_pong: \"Commande ping-pong\",\r\n command_parsing: \"Traitement des commandes\",\r\n leveling: \"Système d'XP et niveaux\"\r\n },\r\n download: {\r\n title: \"Télécharger votre bot\",\r\n content: {\r\n title: \"Comment lancer votre bot une fois le bot téléchargé ?\",\r\n unzipFile: \"Dézippez le fichier obtenu.\",\r\n node: \"Installez NPM et Node.js (cherchez des tutos sur google)\",\r\n start: \"Tapez 'npm install' et 'npm start' dans votre terminal\",\r\n done: \"Votre bot est lancé!\"\r\n },\r\n cancel: \"Annuler\",\r\n confirm: \"Télécharger\"\r\n },\r\n tour: {\r\n skip: \"Sauter la visite\",\r\n previous: \"Précédent\",\r\n next: \"Suivant\",\r\n finish: \"Finir\",\r\n steps: {\r\n load_examples: \"Importer des exemples pour découvrir Scratch4Discord!\",\r\n run_test: \"Testez le fonctionnement de votre bot ici!\",\r\n export_code: \"Exportez votre code ici!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"Le block \\\"Connexion à Discord\\\" de la catégorie \\\"Base\\\" est obligatoire !\"\r\n },\r\n run_modal: {\r\n title: \"Appuyez sur démarrer pour tester votre bot!\",\r\n start: \"Démarrer le bot\",\r\n stop: \"Arrêter le bot\",\r\n invalid_token: \"Impossible de se connecter à Discord... Peut-être que le token du bot n'est pas valide !\",\r\n error: \"Impossible de se connecter à Discord... Réessayez plus tard!\",\r\n disabled: \"⚠️ Cette fonction n'est disponible qu'avec l'application Scratch For Discord (obtenez la {here})\",\r\n here: \"ici\"\r\n },\r\n code_modal: {\r\n title: \"Code JavaScript de votre bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Blockly from \"blockly\";\r\n\r\nimport blocklyMessages from \"./pt-BR.json\";\r\n\r\nexport const applyBlocklyLocale = () => {\r\n for(let key in blocklyMessages){\r\n Blockly.Msg[key] = blocklyMessages[key];\r\n }\r\n};\r\n\r\nexport const websiteMessages = {\r\n untitled: \"Documento sem nome\",\r\n help: \"Ajuda\",\r\n load: {\r\n error: \"O arquivo enviado está corrompido e não pode ser carregado pelo Scratch For Discord...\"\r\n },\r\n file: {\r\n title: \"Arquivo\",\r\n javascript: \"Exporta para javascirpt\",\r\n open: \"abrir arquivo...\",\r\n save: \"Salva\"\r\n },\r\n edit: {\r\n title: \"Edita\",\r\n undo: \"desfazer\",\r\n redo: \"refazer\",\r\n clear: \"deleta {blockCount} blocos\",\r\n cleanup: \"limpa blocos\",\r\n cleardb: \"limpa database\"\r\n },\r\n lang: {\r\n title: \"linguagem\"\r\n },\r\n examples: {\r\n title: \"Exemplos\",\r\n confirm: {\r\n title: \"Deleta os blocos atual?\",\r\n text: \"Você gostaria de remover os blocos do projeto atual antes de importar o exemplo?\",\r\n cancel: \"Cancela\",\r\n yes: \"Sim\",\r\n no: \"Não\"\r\n },\r\n loaded: \"Exemplo {example} importando com sucesso!\",\r\n ping_pong: \"comando ping-pong\",\r\n command_parsing: \"handler de comandos\",\r\n leveling: \"XP e sistema de níveis\"\r\n },\r\n download: {\r\n title: \"Instale o seu bot\",\r\n content: {\r\n title: \"Como iniciar o seu bot depois de baixado?\",\r\n unzipFile: \"Descompacte o arquivo baixado.\",\r\n node: \"Instale o NPM e o Node.js (pesquise tutoriais no Google)\",\r\n start: \"Execute 'npm install' e 'npm start' em um terminal\",\r\n done: \"Seu bot foi iniciado!\"\r\n },\r\n cancel: \"Cancela\",\r\n confirm: \"Instala\"\r\n },\r\n tour: {\r\n skip: \"Pular tour\",\r\n previous: \"Anterior\",\r\n next: \"Próximo\",\r\n finish: \"Termina\",\r\n steps: {\r\n load_examples: \"Importe exemplos para descobrir Scratch4Discord!\",\r\n run_test: \"Teste as funcionalidades do seu bot aqui!\",\r\n export_code: \"Exporte seu código aqui!\"\r\n }\r\n },\r\n warnings: {\r\n login_block: \"O bloco \\\"Conectar ao Discord\\\" na categoria \\\"Base\\\" é obrigatório.\"\r\n },\r\n run_modal: {\r\n title: \"Clique em Iniciar para testar seu bot!\",\r\n start: \"Inicie o bot\",\r\n stop: \"Pare o bot\",\r\n invalid_token: \"Unable to connect to Discord... Maybe the bot's token isn't valid!\",\r\n error: \"Incapaz de conectar ao Discord ... Talvez o token do bot não seja válido!\",\r\n disabled: \"⚠️ Este recurso está disponível apenas usando o aplicativo Scratch For Discord (pegue ele {here})\",\r\n here: \"aqui\"\r\n },\r\n code_modal: {\r\n title: \"Código JavaScript do seu bot\"\r\n }\r\n};\r\n\r\nexport default {\r\n\tapplyBlocklyLocale,\r\n\twebsiteMessages\r\n};\r\n","import Vue from 'vue';\r\nimport { BootstrapVue, IconsPlugin } from 'bootstrap-vue';\r\nimport App from './App.vue';\r\nimport store from './store';\r\nimport VueSwal from 'vue-swal';\r\nimport Vuei18n from 'vue-i18n';\r\nimport Blockly from \"blockly\";\r\nimport VueToast from 'vue-toast-notification';\r\nimport VueTour from 'vue-tour';\r\nimport { library } from '@fortawesome/fontawesome-svg-core'\r\nimport { faPowerOff } from '@fortawesome/free-solid-svg-icons'\r\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'\r\n\r\nlibrary.add(faPowerOff)\r\n\r\nVue.component('font-awesome-icon', FontAwesomeIcon)\r\n\r\nVue.use(VueTour);\r\nVue.use(VueToast);\r\nVue.use(Vuei18n);\r\nVue.use(VueSwal);\r\nVue.use(BootstrapVue);\r\nVue.use(IconsPlugin);\r\n\r\nVue.config.productionTip = false;\r\nVue.config.ignoredElements = [\"field\",\"block\",\"category\",\"xml\",\"mutation\",\"value\",\"sep\"];\r\n\r\nimport blocklyLocaleEN from \"blockly/msg/en\";\r\nimport blocklyLocaleFR from \"blockly/msg/fr\";\r\nimport blocklyLocalePT from \"blockly/msg/pt\";\r\n\r\nimport customLocaleEN from './locales/en';\r\nimport customLocaleFR from './locales/fr';\r\nimport customLocalePT from './locales/pt';\r\n\r\nconst messages = {\r\n en: customLocaleEN.websiteMessages,\r\n fr: customLocaleFR.websiteMessages,\r\n pt: customLocalePT.websiteMessages\r\n};\r\n\r\nconst i18n = new Vuei18n({\r\n locale: (messages[navigator.language.split(\"-\")[0]] ? navigator.language.split(\"-\")[0] : \"en\"),\r\n messages: messages\r\n});\r\n\r\nimport toolbox from \"./toolbox\";\r\nimport Theme from '@blockly/theme-modern';\r\n\r\nVue.mixin({\r\n methods: {\r\n reloadWorkspace(){\r\n // Get current workspace\r\n const workspace = this.$store.state.workspace;\r\n // Convert it to a dom string\r\n const dom = Blockly.Xml.workspaceToDom(workspace);\r\n // Delete the current workspace\r\n workspace.dispose();\r\n // Create a new workspace (with the good language)\r\n const newWorkspace = Blockly.inject(document.getElementById(\"blocklyDiv\"), {\r\n renderer: \"zelos\",\r\n theme: Theme,\r\n grid: {\r\n spacing: 25,\r\n length: 3,\r\n colour: \"#ccc\",\r\n snap: true\r\n },\r\n zoom: {\r\n controls: true,\r\n startScale: 0.9,\r\n maxScale: 3,\r\n minScale: 0.3,\r\n scaleSpeed: 1.2\r\n },\r\n toolbox: toolbox(Blockly)\r\n });\r\n // And restore the blocks\r\n Blockly.Xml.domToWorkspace(dom, newWorkspace);\r\n // Update the workspace in the vuex store\r\n this.$store.commit(\"setWorkspace\", {\r\n workspace: newWorkspace\r\n });\r\n workspace.addChangeListener(Blockly.Events.disableOrphans);\r\n // Return the workspace\r\n return workspace;\r\n },\r\n setLanguage(locale){\r\n switch (locale) {\r\n case \"en\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocaleEN);\r\n // Change Blockly language for custom blocks\r\n customLocaleEN.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"en\";\r\n break;\r\n case \"fr\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocaleFR);\r\n // Change Blockly language for custom blocks\r\n customLocaleFR.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"fr\";\r\n break;\r\n case \"pt\":\r\n // Change Blockly language for default blocks\r\n Blockly.setLocale(blocklyLocalePT);\r\n // Change Blockly language for custom blocks\r\n customLocalePT.applyBlocklyLocale();\r\n // Change website languages (navbar, etc...)\r\n this.$root.$i18n.locale = \"pt\";\r\n break;\r\n default:\r\n break;\r\n }\r\n },\r\n getWorkspaceCode(){\r\n if(!this.$store.state.workspace) return \"\";\r\n return `\r\n (async()=>{\r\n const Discord = require(\"discord.js\");\r\n const Database = require(\"easy-json-database\");\r\n const devMode = typeof __E_IS_DEV !== \"undefined\" && __E_IS_DEV;\r\n const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\r\n const s4d = {\r\n Discord,\r\n database: new Database(\\`\\${devMode ? S4D_NATIVE_GET_PATH : \".\"}/db.json\\`),\r\n joiningMember:null,\r\n reply:null,\r\n tokenInvalid:false,\r\n tokenError: null,\r\n checkMessageExists() {\r\n if (!s4d.client) throw new Error('You cannot perform message operations without a Discord.js client')\r\n if (!s4d.client.readyTimestamp) throw new Error('You cannot perform message operations while the bot is not connected to the Discord API')\r\n }\r\n };\r\n s4d.client = new s4d.Discord.Client({\r\n intents: [Object.values(s4d.Discord.Intents.FLAGS).reduce((acc, p) => acc | p, 0)],\r\n partials: [\"REACTION\"]\r\n });\r\n\r\n ${Blockly.JavaScript.workspaceToCode(this.$store.state.workspace)}\r\n\r\n return s4d;\r\n })();\r\n `;\r\n }\r\n }\r\n});\r\n \r\nnew Vue({\r\n store,\r\n render: h => h(App),\r\n i18n\r\n}).$mount(\"#app\");\r\n\r\nimport 'bootstrap/dist/css/bootstrap.css';\r\nimport 'bootstrap-vue/dist/bootstrap-vue.css';\r\nimport 'vue-toast-notification/dist/theme-default.css';\r\nimport 'vue-tour/dist/vue-tour.css';\r\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodeModal.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlocklyComponent.vue?vue&type=style&index=0&id=180ad633&scoped=true&lang=css&\""],"sourceRoot":""} \ No newline at end of file diff --git a/environments/scripts/preload.js b/environments/scripts/preload.js index e49842d..399e2cd 100644 --- a/environments/scripts/preload.js +++ b/environments/scripts/preload.js @@ -31,6 +31,12 @@ const ScratchNative = { onceMessage: (channel, ...data) => { ipcRenderer.once(channel, ...data); }, + unregisterEvents: (events) => { + if (!Array.isArray(events)) return; + for (const event of events) { + ipcRenderer.removeAllListeners(event); + } + }, DISCORD_INVITE: "https://androz2091.fr/discord", DISCORD_COMMUNITY: "https://discord.gg/QemqGz63ju", openURL: (url) => void shell.openExternal(url), @@ -56,7 +62,7 @@ const ScratchNative = { contextBridge.exposeInMainWorld("ScratchNative", ScratchNative); -document.addEventListener("keyup", (ev) => { +document.addEventListener("keydown", (ev) => { if (ev.ctrlKey && ev.key.toLowerCase() === "r") { ev.preventDefault(); window.location.reload();