diff --git a/404.html b/404.html index 7d236d0..208285b 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/3SJJCevU4THigZ_DApngE/_buildManifest.js b/_next/static/3SJJCevU4THigZ_DApngE/_buildManifest.js new file mode 100644 index 0000000..62c0220 --- /dev/null +++ b/_next/static/3SJJCevU4THigZ_DApngE/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e,t){return{__rewrites:{afterFiles:[{has:void 0,source:"/nsdocs/:path*/_meta",destination:"/nsdocs/404"}],beforeFiles:[],fallback:[]},"/":[e,t,"static/chunks/pages/index-8f084752539ce842.js"],"/_error":["static/chunks/pages/_error-77823ddac6993d35.js"],"/developer/advance":[e,t,"static/chunks/pages/developer/advance-0e2323b0a2f47de2.js"],"/developer/advance/introduction":[e,t,"static/chunks/pages/developer/advance/introduction-f1c64c6e68d909f5.js"],"/developer/advance/scripts":[e,t,"static/chunks/pages/developer/advance/scripts-55bea2f6274ea2eb.js"],"/developer/codeFormatters":[e,t,"static/chunks/pages/developer/codeFormatters-aa47ad71f3419e2c.js"],"/developer/commandSetup":[e,t,"static/chunks/pages/developer/commandSetup-8d5f72f7341bcc62.js"],"/developer/commandSetup/messageCommands":[e,t,"static/chunks/pages/developer/commandSetup/messageCommands-c99f7cdec5c967e9.js"],"/developer/commandSetup/slashCommands":[e,t,"static/chunks/pages/developer/commandSetup/slashCommands-0415c2bea7288889.js"],"/developer/config&const":[e,t,"static/chunks/pages/developer/config&const-b1726100fc3dfc81.js"],"/developer/config&const/configSetup":[e,t,"static/chunks/pages/developer/config&const/configSetup-9530531e8f7116b0.js"],"/developer/config&const/constSetup":[e,t,"static/chunks/pages/developer/config&const/constSetup-1320bcf40866438e.js"],"/developer/eventSetup":[e,t,"static/chunks/pages/developer/eventSetup-ffac683ee9646672.js"],"/developer/eventSetup/centralize":[e,t,"static/chunks/pages/developer/eventSetup/centralize-0bbb2c3c0bcb9f58.js"],"/developer/eventSetup/interactionCreate":[e,t,"static/chunks/pages/developer/eventSetup/interactionCreate-b92759c4157335e3.js"],"/developer/eventSetup/messageCreate":[e,t,"static/chunks/pages/developer/eventSetup/messageCreate-c1fd62772587de6a.js"],"/developer/eventSetup/ready":[e,t,"static/chunks/pages/developer/eventSetup/ready-98e8936d2d0e3234.js"],"/developer/gettingStarted":[e,t,"static/chunks/pages/developer/gettingStarted-8944885e008bdf25.js"],"/developer/handlerSetup":[e,t,"static/chunks/pages/developer/handlerSetup-0b4fc2cefd153827.js"],"/developer/handlerSetup/cmd":[e,t,"static/chunks/pages/developer/handlerSetup/cmd-a5d9f7345c4b4cbd.js"],"/developer/handlerSetup/error":[e,t,"static/chunks/pages/developer/handlerSetup/error-163e0473085f2399.js"],"/developer/ignoringFiles":[e,t,"static/chunks/pages/developer/ignoringFiles-3d45fad3c5691a1e.js"],"/developer/interfaceSetup":[e,t,"static/chunks/pages/developer/interfaceSetup-4e111fe8e0dcbc36.js"],"/developer/interfaceSetup/command":[e,t,"static/chunks/pages/developer/interfaceSetup/command-8f590718415483b6.js"],"/developer/interfaceSetup/extendedClient":[e,t,"static/chunks/pages/developer/interfaceSetup/extendedClient-20d7eb4cf24672a7.js"],"/developer/settings":[e,t,"static/chunks/pages/developer/settings-548355899fb79c68.js"],"/developer/utilSetup":[e,t,"static/chunks/pages/developer/utilSetup-0f12e5b1b33fddb9.js"],"/developer/utilSetup/deployCommand":[e,t,"static/chunks/pages/developer/utilSetup/deployCommand-2ce07cfed8cf640f.js"],"/developer/utilSetup/logger":[e,t,"static/chunks/pages/developer/utilSetup/logger-d806718d8b669ec2.js"],sortedPages:["/","/_app","/_error","/developer/advance","/developer/advance/introduction","/developer/advance/scripts","/developer/codeFormatters","/developer/commandSetup","/developer/commandSetup/messageCommands","/developer/commandSetup/slashCommands","/developer/config&const","/developer/config&const/configSetup","/developer/config&const/constSetup","/developer/eventSetup","/developer/eventSetup/centralize","/developer/eventSetup/interactionCreate","/developer/eventSetup/messageCreate","/developer/eventSetup/ready","/developer/gettingStarted","/developer/handlerSetup","/developer/handlerSetup/cmd","/developer/handlerSetup/error","/developer/ignoringFiles","/developer/interfaceSetup","/developer/interfaceSetup/command","/developer/interfaceSetup/extendedClient","/developer/settings","/developer/utilSetup","/developer/utilSetup/deployCommand","/developer/utilSetup/logger"]}}("static/css/471946d199e2edea.css","static/chunks/235-5ac1698e5dbf7355.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/yC8pbpgj0ZoUz2XATYPtC/_ssgManifest.js b/_next/static/3SJJCevU4THigZ_DApngE/_ssgManifest.js similarity index 100% rename from _next/static/yC8pbpgj0ZoUz2XATYPtC/_ssgManifest.js rename to _next/static/3SJJCevU4THigZ_DApngE/_ssgManifest.js diff --git a/_next/static/chunks/235-b9da8f73f88a7deb.js b/_next/static/chunks/235-5ac1698e5dbf7355.js similarity index 52% rename from _next/static/chunks/235-b9da8f73f88a7deb.js rename to _next/static/chunks/235-5ac1698e5dbf7355.js index 374a686..1cad700 100644 --- a/_next/static/chunks/235-b9da8f73f88a7deb.js +++ b/_next/static/chunks/235-5ac1698e5dbf7355.js @@ -1,4 +1,4 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[235],{5202:function(){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(e){return!!e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList}function o(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function l(){document.addEventListener("mousemove",u),document.addEventListener("mousedown",u),document.addEventListener("mouseup",u),document.addEventListener("pointermove",u),document.addEventListener("pointerdown",u),document.addEventListener("pointerup",u),document.addEventListener("touchmove",u),document.addEventListener("touchstart",u),document.addEventListener("touchend",u)}function u(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",u),document.removeEventListener("pointermove",u),document.removeEventListener("pointerdown",u),document.removeEventListener("pointerup",u),document.removeEventListener("touchmove",u),document.removeEventListener("touchstart",u),document.removeEventListener("touchend",u))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(a(e.activeElement)&&o(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),l())},!0),l(),e.addEventListener("focus",function(e){var n,r,s;a(e.target)&&(t||(r=(n=e.target).type,"INPUT"===(s=n.tagName)&&i[r]&&!n.readOnly||"TEXTAREA"===s&&!n.readOnly||n.isContentEditable))&&o(e.target)},!0),e.addEventListener("blur",function(e){if(a(e.target)){var t;(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout(function(){n=!1},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},9266:function(e,t,n){"use strict";var r=n(3905),i=n(9073);e.exports=function(e){var t=r(e);return t.token="","x-oauth-basic"===t.password?t.token=t.user:"x-token-auth"===t.user&&(t.token=t.password),i(t.protocols)||0===t.protocols.length&&i(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}},3458:function(e,t,n){"use strict";var r=n(9266);function i(e){if("string"!=typeof e)throw Error("The url must be a string.");/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(e)&&(e="https://github.com/"+e);var t=r(e),n=t.resource.split("."),a=null;switch(t.toString=function(e){return i.stringify(this,e)},t.source=n.length>2?n.slice(1-n.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent((t.pathname||t.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=n[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){4===(a=t.name.split("/")).length&&(t.organization=a[1],t.owner=a[2],t.name=a[3],t.full_name=a[2]+"/"+a[3]);break}2===(a=t.name.split("/")).length?(t.owner=a[1],t.name=a[1],t.full_name="_git/"+t.name):3===a.length?(t.name=a[2],"DefaultCollection"===a[0]?(t.owner=a[2],t.organization=a[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=a[0],t.full_name=t.owner+"/_git/"+t.name)):4===a.length&&(t.organization=a[0],t.owner=a[1],t.name=a[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){4===(a=t.name.split("/")).length&&(t.organization=a[1],t.owner=a[2],t.name=a[3]);break}5===(a=t.name.split("/")).length?(t.organization=a[0],t.owner=a[1],t.name=a[4],t.full_name="_git/"+t.name):3===a.length?(t.name=a[2],"DefaultCollection"===a[0]?(t.owner=a[2],t.organization=a[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=a[0],t.full_name=t.owner+"/_git/"+t.name)):4===a.length&&(t.organization=a[0],t.owner=a[1],t.name=a[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:var o=(a=t.name.split("/")).length-1;if(a.length>=2){var s=a.indexOf("-",2),l=a.indexOf("blob",2),u=a.indexOf("tree",2),c=a.indexOf("commit",2),d=a.indexOf("src",2),f=a.indexOf("raw",2),h=a.indexOf("edit",2);o=s>0?s-1:l>0?l-1:u>0?u-1:c>0?c-1:d>0?d-1:f>0?f-1:h>0?h-1:o,t.owner=a.slice(0,o).join("/"),t.name=a[o],c&&(t.commit=a[o+2])}t.ref="",t.filepathtype="",t.filepath="";var p=a.length>o&&"-"===a[o+1]?o+1:o;a.length>p+2&&["raw","src","blob","tree","edit"].indexOf(a[p+1])>=0&&(t.filepathtype=a[p+1],t.ref=a[p+2],a.length>p+3&&(t.filepath=a.slice(p+3).join("/"))),t.organization=t.owner}!t.full_name&&(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=t.owner+"/"+t.name);var m=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=m&&(t.source="bitbucket-server","users"===m[1]?t.owner="~"+m[2]:t.owner=m[2],t.organization=t.owner,t.name=m[3],(a=m[4].split("/")).length>1&&(["raw","browse"].indexOf(a[1])>=0?(t.filepathtype=a[1],a.length>2&&(t.filepath=a.slice(2).join("/"))):"commits"===a[1]&&a.length>2&&(t.commit=a[2])),t.full_name=t.owner+"/"+t.name,t.query.at?t.ref=t.query.at:t.ref=""),t}i.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);var n=e.port?":"+e.port:"",r=e.user||"git",i=e.git_suffix?".git":"";switch(t){case"ssh":if(n)return"ssh://"+r+"@"+e.resource+n+"/"+e.full_name+i;return r+"@"+e.resource+":"+e.full_name+i;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return t+"://"+r+"@"+e.resource+n+"/"+e.full_name+i;case"http":case"https":return t+"://"+(e.token?"bitbucket.org"===e.source?"x-token-auth:"+e.token+"@":e.token+"@":e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"")+e.resource+n+"/"+("bitbucket-server"===e.source?"scm/"+e.full_name:""+e.full_name)+i;default:return e.href}},e.exports=i},6337:function(){!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var e=function(e){for(var t=e,n=i(t);n;)n=i(t=n.ownerDocument);return t}(window.document),t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?f(e,n):c(),t.forEach(function(e){e._checkForIntersections()})}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!(e&&1==e.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,a=null,o=null;if(this.POLL_INTERVAL?a=n.setInterval(r,this.POLL_INTERVAL):(s(n,"resize",r,!0),s(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),l(e,"resize",r,!0)),l(t,"scroll",r,!0),o&&o.disconnect()}),t!=(this.root&&(this.root.ownerDocument||this.root)||e)){var u=i(t);u&&this._monitorIntersections(u.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some(function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1})){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=r){var o=i(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t=0&&s>=0&&{top:n,bottom:r,left:i,right:a,width:o,height:s}||null}(c,o)),!o)break;s=s&&p(s)}return o}},o.prototype._getRootRect=function(){var t;if(this.root&&!m(this.root))t=u(this.root);else{var n=m(this.root)?this.root:e,r=n.documentElement,i=n.body;t={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;it.indexOf(this)&&t.push(this)},o.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=a}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function a(e){this.time=e.time,this.target=e.target,this.rootBounds=d(e.rootBounds),this.boundingClientRect=d(e.boundingClientRect),this.intersectionRect=d(e.intersectionRect||c()),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;n?this.intersectionRatio=Number((i/n).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function o(e,t){var n,r,i,a=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(a.root&&1!=a.root.nodeType&&9!=a.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout(function(){n(),i=null},r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(a.rootMargin),this.thresholds=this._initThresholds(a.threshold),this.root=a.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function s(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function l(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):c()}function c(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function f(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function h(e,t){for(var n=t;n;){if(n==e)return!0;n=p(n)}return!1}function p(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host)?n.host:n}function m(e){return e&&9===e.nodeType}}()},9073:function(e,t,n){"use strict";var r=n(2337);e.exports=function e(t){if(Array.isArray(t))return -1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var n=r(t);if(t=t.substring(t.indexOf("://")+3),e(n))return!0;var i=RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(i)&&t.indexOf("@")-1},R.prototype.set=function(e,t){var n=this.__data__,r=A(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},I.prototype.clear=function(){this.__data__={hash:new N,map:new(O||R),string:new N}},I.prototype.delete=function(e){return L(this,e).delete(e)},I.prototype.get=function(e){return L(this,e).get(e)},I.prototype.has=function(e){return L(this,e).has(e)},I.prototype.set=function(e,t){return L(this,e).set(e,t),this};var M=Z(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(z(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var t,n=[];return l.test(e)&&n.push(""),e.replace(u,function(e,t,r,i){n.push(r?i.replace(c,"$1"):t||e)}),n});function Z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(Z.Cache||I),n}Z.Cache=I;var D=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function z(e){return"symbol"==typeof e||!!e&&"object"==typeof e&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=!function(e,t){if(D(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||z(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?D(n=t)?n:M(n):[t];for(var r=0,i=t.length;null!=e&&r{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function x(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}let g=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:s,width:l,decoding:u,className:c,style:d,fetchPriority:f,placeholder:h,loading:p,unoptimized:g,fill:v,onLoadRef:y,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:k,sizesInput:_,onLoad:j,onError:E,...O}=e;return(0,a.jsx)("img",{...O,...x(f),loading:p,width:l,height:s,decoding:u,"data-nimg":v?"fill":"1",className:c,style:d,sizes:i,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&m(e,h,y,b,w,g,_))},[n,h,y,b,w,E,g,_,t]),onLoad:e=>{m(e.currentTarget,h,y,b,w,g,_)},onError:e=>{k(!0),"empty"!==h&&w(!0),E&&E(e)}})});function v(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...x(n.fetchPriority)};return t&&s.default.preload?(s.default.preload(n.src,r),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let y=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(f.RouterContext),r=(0,o.useContext)(d.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=p||r||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:s,onLoadingComplete:l}=e,m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let x=(0,o.useRef)(l);(0,o.useEffect)(()=>{x.current=l},[l]);let[y,b]=(0,o.useState)(!1),[w,k]=(0,o.useState)(!1),{props:_,meta:j}=(0,u.getImgProps)(e,{defaultLoader:h.default,imgConf:i,blurComplete:y,showAltText:w});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g,{..._,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:m,onLoadingCompleteRef:x,setBlurComplete:b,setShowAltText:k,sizesInput:e.sizes,ref:t}),j.priority?(0,a.jsx)(v,{isAppRouter:!n,imgAttributes:_}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(8754),i=n(5893),a=r._(n(7294)),o=n(1401),s=n(2045),l=n(7420),u=n(7201),c=n(1443),d=n(9953),f=n(5320),h=n(2905),p=n(4318),m=n(953),x=n(6691),g=new Set;function v(e,t,n,r,i,a){if(a||(0,s.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let i=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(g.has(i))return;g.add(i)}(async()=>a?e.prefetch(t,i):e.prefetch(t,n,r))().catch(e=>{})}}function y(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=a.default.forwardRef(function(e,t){let n,r;let{href:l,as:g,children:b,prefetch:w=null,passHref:k,replace:_,shallow:j,scroll:E,locale:O,onClick:T,onMouseEnter:C,onTouchStart:S,legacyBehavior:N=!1,...R}=e;n=b,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let I=a.default.useContext(d.RouterContext),A=a.default.useContext(f.AppRouterContext),L=null!=I?I:A,P=!I,M=!1!==w,Z=null===w?x.PrefetchKind.AUTO:x.PrefetchKind.FULL,{href:D,as:F}=a.default.useMemo(()=>{if(!I){let e=y(l);return{href:e,as:g?y(g):e}}let[e,t]=(0,o.resolveHref)(I,l,!0);return{href:e,as:g?(0,o.resolveHref)(I,g):t||e}},[I,l,g]),z=a.default.useRef(D),$=a.default.useRef(F);N&&(r=a.default.Children.only(n));let U=N?r&&"object"==typeof r&&r.ref:t,[W,H,G]=(0,h.useIntersection)({rootMargin:"200px"}),V=a.default.useCallback(e=>{($.current!==F||z.current!==D)&&(G(),$.current=F,z.current=D),W(e),U&&("function"==typeof U?U(e):"object"==typeof U&&(U.current=e))},[F,U,D,G,W]);a.default.useEffect(()=>{L&&H&&M&&v(L,D,F,{locale:O},{kind:Z},P)},[F,D,H,O,M,null==I?void 0:I.locale,L,P,Z]);let B={ref:V,onClick(e){N||"function"!=typeof T||T(e),N&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),L&&!e.defaultPrevented&&function(e,t,n,r,i,o,l,u,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,s.isLocalURL)(n)))return;e.preventDefault();let f=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:o,locale:u,scroll:e}):t[i?"replace":"push"](r||n,{scroll:e})};c?a.default.startTransition(f):f()}(e,L,D,F,_,j,E,O,P)},onMouseEnter(e){N||"function"!=typeof C||C(e),N&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),L&&(M||!P)&&v(L,D,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},P)},onTouchStart:function(e){N||"function"!=typeof S||S(e),N&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),L&&(M||!P)&&v(L,D,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},P)}};if((0,u.isAbsoluteUrl)(F))B.href=F;else if(!N||k||"a"===r.type&&!("href"in r.props)){let e=void 0!==O?O:null==I?void 0:I.locale,t=(null==I?void 0:I.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==I?void 0:I.locales,null==I?void 0:I.domainLocales);B.href=t||(0,m.addBasePath)((0,c.addLocale)(F,e,null==I?void 0:I.defaultLocale))}return N?a.default.cloneElement(r,B):(0,i.jsx)("a",{...R,...B,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(7294),i=n(3815),a="function"==typeof IntersectionObserver,o=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!a,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(u||c)return;let e=f.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:i,elements:a}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=o.get(r)))return t;let i=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},s.push(n),o.set(n,t),t}(n);return a.set(e,t),i.observe(e),function(){if(a.delete(e),i.unobserve(e),0===a.size){i.disconnect(),o.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,f.current]),[h,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(1997);let r=n(9919),i=n(7903);function a(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:h=!1,loading:p,className:m,quality:x,width:g,height:v,fill:y=!1,style:b,overrideSrc:w,onLoad:k,onLoadingComplete:_,placeholder:j="empty",blurDataURL:E,fetchPriority:O,layout:T,objectFit:C,objectPosition:S,lazyBoundary:N,lazyRoot:R,...I}=e,{imgConf:A,showAltText:L,blurComplete:P,defaultLoader:M}=t,Z=A||i.imageConfigDefault;if("allSizes"in Z)s=Z;else{let e=[...Z.deviceSizes,...Z.imageSizes].sort((e,t)=>e-t),t=Z.deviceSizes.sort((e,t)=>e-t);s={...Z,allSizes:e,deviceSizes:t}}if(void 0===M)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let D=I.loader||M;delete I.loader,delete I.srcSet;let F="__next_img_default"in D;if(F){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=D;D=t=>{let{config:n,...r}=t;return e(r)}}if(T){"fill"===T&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[T];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[T];t&&!d&&(d=t)}let z="",$=o(g),U=o(v);if("object"==typeof(n=c)&&(a(n)||void 0!==n.src)){let e=a(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,E=E||e.blurDataURL,z=e.src,!y){if($||U){if($&&!U){let t=$/e.width;U=Math.round(e.height*t)}else if(!$&&U){let t=U/e.height;$=Math.round(e.width*t)}}else $=e.width,U=e.height}}let W=!h&&("lazy"===p||void 0===p);(!(c="string"==typeof c?c:z)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,W=!1),s.unoptimized&&(f=!0),F&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),h&&(O="high");let H=o(x),G=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:S}:{},L?{}:{color:"transparent"},b),V=P||"empty"===j?null:"blur"===j?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:$,heightInt:U,blurWidth:l,blurHeight:u,blurDataURL:E||"",objectFit:G.objectFit})+'")':'url("'+j+'")',B=V?{backgroundSize:G.objectFit||"cover",backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},q=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:a,sizes:o,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,o),c=l.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:a,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:a,width:l[c]})}}({config:s,src:c,unoptimized:f,width:$,quality:H,sizes:d,loader:D});return{props:{...I,loading:W?"lazy":p,fetchPriority:O,width:$,height:U,decoding:"async",className:m,style:{...G,...B},sizes:q.sizes,srcSet:q.srcSet,src:w||q.src},meta:{unoptimized:f,priority:h,placeholder:j,fill:y}}}},9919:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:a,objectFit:o}=e,s=r?40*r:t,l=i?40*i:n,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+a+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},5666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return l},getImageProps:function(){return s}});let r=n(8754),i=n(7367),a=n(6541),o=r._(n(6663));function s(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/nsdocs/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let l=a.Image},6663:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},9488:function(){},1864:function(e){!function(){"use strict";var t={114:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--)o>=0?r=arguments[o]:(void 0===e&&(e=""),r=e),t(r),0!==r.length&&(i=r+"/"+i,a=47===r.charCodeAt(0));return(i=n(i,!a),a)?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return(0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;iu){if(47===n.charCodeAt(s+d))return n.slice(s+d+1);if(0===d)return n.slice(s+d)}else o>u&&(47===e.charCodeAt(i+d)?c=d:0===d&&(c=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;47===f&&(c=d)}var h="";for(d=i+c+1;d<=a;++d)(d===a||47===e.charCodeAt(d))&&(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(s+c):(s+=c,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return -1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw TypeError('"ext" argument must be a string');t(e);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else -1===l&&(o=!1,l=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=l))}return i===a?a=l:-1===a&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else -1===a&&(o=!1,a=r+1);return -1===a?"":e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47===l){if(!a){r=s+1;break}continue}-1===i&&(a=!1,i=s+1),46===l?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1)}return -1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){var t,n;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+n:t+"/"+n:n},parse:function(e){t(e);var n,r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var i=e.charCodeAt(0),a=47===i;a?(r.root="/",n=1):n=0;for(var o=-1,s=0,l=-1,u=!0,c=e.length-1,d=0;c>=n;--c){if(47===(i=e.charCodeAt(c))){if(!u){s=c+1;break}continue}-1===l&&(u=!1,l=c+1),46===i?-1===o?o=c:1!==d&&(d=1):-1!==o&&(d=-1)}return -1===o||-1===l||0===d||1===d&&o===l-1&&o===s+1?-1!==l&&(0===s&&a?r.base=r.name=e.slice(1,l):r.base=r.name=e.slice(s,l)):(0===s&&a?(r.name=e.slice(1,o),r.base=e.slice(1,l)):(r.name=e.slice(s,o),r.base=e.slice(s,l)),r.ext=e.slice(o,l)),s>0?r.dir=e.slice(0,s-1):a&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var a=n[e]={exports:{}},o=!0;try{t[e](a,a.exports,r),o=!1}finally{o&&delete n[e]}return a.exports}r.ab="//";var i=r(114);e.exports=i}()},7663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c1)for(var n=1;n{t(!0)},[]),e}var L=n(7222),P=()=>{let{locale:e=L.ZW,asPath:t,route:n}=(0,N.useRouter)();return(0,R.useMemo)(()=>{let{pathname:r}=new URL(L.hV.has(n)?n:t,"https://nextra.vercel.app");return(e?r.replace(RegExp(`\\.${e}(\\/|$)`),"$1"):r).replace(/\.html$/,"").replace(/\/index(\/|$)/,"$1").replace(/\/$/,"")||"/"},[t,e,n])},M=n(2643),Z=n(4861);(p=k||(k={})).assertEqual=e=>e,p.assertIs=function(e){},p.assertNever=function(e){throw Error()},p.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},p.getValidEnumValues=e=>{let t=p.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return p.objectValues(n)},p.objectValues=e=>p.objectKeys(e).map(function(t){return e[t]}),p.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},p.find=(e,t)=>{for(let n of e)if(t(n))return n},p.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,p.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},p.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(_||(_={})).mergeShapes=(e,t)=>({...e,...t});let D=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),F=e=>{switch(typeof e){case"undefined":return D.undefined;case"string":return D.string;case"number":return isNaN(e)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":if(Array.isArray(e))return D.array;if(null===e)return D.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return D.promise;if("undefined"!=typeof Map&&e instanceof Map)return D.map;if("undefined"!=typeof Set&&e instanceof Set)return D.set;if("undefined"!=typeof Date&&e instanceof Date)return D.date;return D.object;default:return D.unknown}},z=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class $ extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}$.create=e=>new $(e);let U=(e,t)=>{let n;switch(e.code){case z.invalid_type:n=e.received===D.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,k.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${k.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${k.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${k.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:k.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case z.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case z.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,k.assertNever(e)}return{message:n}},W=U;function H(){return W}let G=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let s="";for(let e of r.filter(e=>!!e).slice().reverse())s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function V(e,t){let n=H(),r=G({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===U?void 0:U].filter(e=>!!e)});e.common.issues.push(r)}class B{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return q;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return B.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return q;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let q=Object.freeze({status:"aborted"}),K=e=>({status:"dirty",value:e}),Y=e=>({status:"valid",value:e}),Q=e=>"aborted"===e.status,J=e=>"dirty"===e.status,X=e=>"valid"===e.status,ee=e=>"undefined"!=typeof Promise&&e instanceof Promise;function et(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function en(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError,(m=j||(j={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},m.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class er{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let ei=(e,t)=>{if(X(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new $(e.common.issues);return this._error=t,this._error}}};function ea(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var a,o;let{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:i.defaultError}:void 0===i.data?{message:null!==(a=null!=s?s:r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(o=null!=s?s:n)&&void 0!==o?o:i.defaultError}},description:i}}class eo{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return F(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new B,ctx:{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ee(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},i=this._parseSync({data:e,path:r.path,parent:r});return ei(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},r=this._parse({data:e,path:n.path,parent:n});return ei(n,await (ee(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:z.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new eY({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eQ.create(this,this._def)}nullable(){return eJ.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eA.create(this,this._def)}promise(){return eK.create(this,this._def)}or(e){return eP.create([this,e],this._def)}and(e){return eD.create(this,e,this._def)}transform(e){return new eY({...ea(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eX({...ea(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:T.ZodDefault})}brand(){return new e4({typeName:T.ZodBranded,type:this,...ea(this._def)})}catch(e){return new e0({...ea(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:T.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return e5.create(this,e)}readonly(){return e3.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let es=/^c[^\s-]{8,}$/i,el=/^[0-9a-z]+$/,eu=/^[0-9A-HJKMNP-TV-Z]{26}$/,ec=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ed=/^[a-z0-9_-]{21}$/i,ef=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ep=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,em=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ev=RegExp(`^${eg}$`);function ey(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function eb(e){let t=`${eg}T${ey(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)}class ew extends eo{_parse(e){var t,n;let i;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==D.string){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.string,received:t.parsedType}),q}let a=new B;for(let o of this._def.checks)if("min"===o.kind)e.data.lengtho.value&&(V(i=this._getOrReturnCtx(e,i),{code:z.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("length"===o.kind){let t=e.data.length>o.value,n=e.data.lengthe.test(t),{validation:t,code:z.invalid_string,...j.errToObj(n)})}_addCheck(e){return new ew({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...j.errToObj(e)})}url(e){return this._addCheck({kind:"url",...j.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...j.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...j.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...j.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...j.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...j.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...j.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...j.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...j.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...j.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...j.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...j.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...j.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...j.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...j.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...j.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...j.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...j.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...j.errToObj(t)})}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new ew({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ew({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ew({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new ew({checks:[],typeName:T.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...ea(e)})};class ek extends eo{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==D.number){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.number,received:t.parsedType}),q}let n=new B;for(let r of this._def.checks)"int"===r.kind?k.isInteger(e.data)||(V(t=this._getOrReturnCtx(e,t),{code:z.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.datar.value:e.data>=r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(V(t=this._getOrReturnCtx(e,t),{code:z.not_finite,message:r.message}),n.dirty()):k.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,n,r){return new ek({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:j.toString(r)}]})}_addCheck(e){return new ek({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&k.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.valuenew ek({checks:[],typeName:T.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...ea(e)});class e_ extends eo{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==D.bigint){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.bigint,received:t.parsedType}),q}let n=new B;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.datar.value:e.data>=r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(V(t=this._getOrReturnCtx(e,t),{code:z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):k.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,n,r){return new e_({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:j.toString(r)}]})}_addCheck(e){return new e_({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new e_({checks:[],typeName:T.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...ea(e)})};class ej extends eo{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==D.boolean){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.boolean,received:t.parsedType}),q}return Y(e.data)}}ej.create=e=>new ej({typeName:T.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...ea(e)});class eE extends eo{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==D.date){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.date,received:t.parsedType}),q}if(isNaN(e.data.getTime()))return V(this._getOrReturnCtx(e),{code:z.invalid_date}),q;let n=new B;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()r.value&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):k.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eE({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:j.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew eE({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:T.ZodDate,...ea(e)});class eO extends eo{_parse(e){if(this._getType(e)!==D.symbol){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.symbol,received:t.parsedType}),q}return Y(e.data)}}eO.create=e=>new eO({typeName:T.ZodSymbol,...ea(e)});class eT extends eo{_parse(e){if(this._getType(e)!==D.undefined){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.undefined,received:t.parsedType}),q}return Y(e.data)}}eT.create=e=>new eT({typeName:T.ZodUndefined,...ea(e)});class eC extends eo{_parse(e){if(this._getType(e)!==D.null){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.null,received:t.parsedType}),q}return Y(e.data)}}eC.create=e=>new eC({typeName:T.ZodNull,...ea(e)});class eS extends eo{constructor(){super(...arguments),this._any=!0}_parse(e){return Y(e.data)}}eS.create=e=>new eS({typeName:T.ZodAny,...ea(e)});class eN extends eo{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Y(e.data)}}eN.create=e=>new eN({typeName:T.ZodUnknown,...ea(e)});class eR extends eo{_parse(e){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.never,received:t.parsedType}),q}}eR.create=e=>new eR({typeName:T.ZodNever,...ea(e)});class eI extends eo{_parse(e){if(this._getType(e)!==D.undefined){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.void,received:t.parsedType}),q}return Y(e.data)}}eI.create=e=>new eI({typeName:T.ZodVoid,...ea(e)});class eA extends eo{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==D.array)return V(t,{code:z.invalid_type,expected:D.array,received:t.parsedType}),q;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(V(t,{code:z.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new er(t,e,t.path,n)))).then(e=>B.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new er(t,e,t.path,n)));return B.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new eA({...this._def,minLength:{value:e,message:j.toString(t)}})}max(e,t){return new eA({...this._def,maxLength:{value:e,message:j.toString(t)}})}length(e,t){return new eA({...this._def,exactLength:{value:e,message:j.toString(t)}})}nonempty(e){return this.min(1,e)}}eA.create=(e,t)=>new eA({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...ea(t)});class eL extends eo{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=k.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==D.object){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.object,received:t.parsedType}),q}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof eR&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new er(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof eR){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(V(n,{code:z.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new er(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>B.mergeObjectSync(t,e)):B.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new eL({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,o;let s=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=j.errToObj(e).message)&&void 0!==o?o:s}:{message:s}}}:{}})}strip(){return new eL({...this._def,unknownKeys:"strip"})}passthrough(){return new eL({...this._def,unknownKeys:"passthrough"})}extend(e){return new eL({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eL({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eL({...this._def,catchall:e})}pick(e){let t={};return k.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new eL({...this._def,shape:()=>t})}omit(e){let t={};return k.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new eL({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eL){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=eQ.create(e(i))}return new eL({...t._def,shape:()=>n})}return t instanceof eA?new eA({...t._def,type:e(t.element)}):t instanceof eQ?eQ.create(e(t.unwrap())):t instanceof eJ?eJ.create(e(t.unwrap())):t instanceof eF?eF.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return k.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new eL({...this._def,shape:()=>t})}required(e){let t={};return k.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof eQ;)e=e._def.innerType;t[n]=e}}),new eL({...this._def,shape:()=>t})}keyof(){return eV(k.objectKeys(this.shape))}}eL.create=(e,t)=>new eL({shape:()=>e,unknownKeys:"strip",catchall:eR.create(),typeName:T.ZodObject,...ea(t)}),eL.strictCreate=(e,t)=>new eL({shape:()=>e,unknownKeys:"strict",catchall:eR.create(),typeName:T.ZodObject,...ea(t)}),eL.lazycreate=(e,t)=>new eL({shape:e,unknownKeys:"strip",catchall:eR.create(),typeName:T.ZodObject,...ea(t)});class eP extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new $(e.ctx.common.issues));return V(t,{code:z.invalid_union,unionErrors:n}),q});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new $(e));return V(t,{code:z.invalid_union,unionErrors:i}),q}}get options(){return this._def.options}}eP.create=(e,t)=>new eP({options:e,typeName:T.ZodUnion,...ea(t)});let eM=e=>{if(e instanceof eH)return eM(e.schema);if(e instanceof eY)return eM(e.innerType());if(e instanceof eG)return[e.value];if(e instanceof eB)return e.options;if(e instanceof eq)return k.objectValues(e.enum);if(e instanceof eX)return eM(e._def.innerType);if(e instanceof eT)return[void 0];else if(e instanceof eC)return[null];else if(e instanceof eQ)return[void 0,...eM(e.unwrap())];else if(e instanceof eJ)return[null,...eM(e.unwrap())];else if(e instanceof e4)return eM(e.unwrap());else if(e instanceof e3)return eM(e.unwrap());else if(e instanceof e0)return eM(e._def.innerType);else return[]};class eZ extends eo{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==D.object)return V(t,{code:z.invalid_type,expected:D.object,received:t.parsedType}),q;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(V(t,{code:z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=eM(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new eZ({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...ea(n)})}}class eD extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Q(e)||Q(r))return q;let i=function e(t,n){let r=F(t),i=F(n);if(t===n)return{valid:!0,data:t};if(r===D.object&&i===D.object){let r=k.objectKeys(n),i=k.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===D.array&&i===D.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;ir(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}eD.create=(e,t,n)=>new eD({left:e,right:t,typeName:T.ZodIntersection,...ea(n)});class eF extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.array)return V(n,{code:z.invalid_type,expected:D.array,received:n.parsedType}),q;if(n.data.lengththis._def.items.length&&(V(n,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new er(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>B.mergeArray(t,e)):B.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new eF({...this._def,rest:e})}}eF.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eF({items:e,typeName:T.ZodTuple,rest:null,...ea(t)})};class ez extends eo{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.object)return V(n,{code:z.invalid_type,expected:D.object,received:n.parsedType}),q;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new er(n,e,n.path,e)),value:a._parse(new er(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?B.mergeObjectAsync(t,r):B.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new ez(t instanceof eo?{keyType:e,valueType:t,typeName:T.ZodRecord,...ea(n)}:{keyType:ew.create(),valueType:e,typeName:T.ZodRecord,...ea(t)})}}class e$ extends eo{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.map)return V(n,{code:z.invalid_type,expected:D.map,received:n.parsedType}),q;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new er(n,e,n.path,[a,"key"])),value:i._parse(new er(n,t,n.path,[a,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}e$.create=(e,t,n)=>new e$({valueType:t,keyType:e,typeName:T.ZodMap,...ea(n)});class eU extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.set)return V(n,{code:z.invalid_type,expected:D.set,received:n.parsedType}),q;let r=this._def;null!==r.minSize&&n.data.sizer.maxSize.value&&(V(n,{code:z.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return q;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new er(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(e,t){return new eU({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new eU({...this._def,maxSize:{value:e,message:j.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eU.create=(e,t)=>new eU({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...ea(t)});class eW extends eo{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==D.function)return V(t,{code:z.invalid_type,expected:D.function,received:t.parsedType}),q;function n(e,n){return G({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,H(),U].filter(e=>!!e),issueData:{code:z.invalid_arguments,argumentsError:n}})}function r(e,n){return G({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,H(),U].filter(e=>!!e),issueData:{code:z.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eK){let e=this;return Y(async function(...t){let o=new $([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),l=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw o.addIssue(r(l,e)),o})})}{let e=this;return Y(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new $([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),l=e._def.returns.safeParse(s,i);if(!l.success)throw new $([r(s,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eW({...this._def,args:eF.create(e).rest(eN.create())})}returns(e){return new eW({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new eW({args:e||eF.create([]).rest(eN.create()),returns:t||eN.create(),typeName:T.ZodFunction,...ea(n)})}}class eH extends eo{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eH.create=(e,t)=>new eH({getter:e,typeName:T.ZodLazy,...ea(t)});class eG extends eo{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return V(t,{received:t.data,code:z.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eV(e,t){return new eB({values:e,typeName:T.ZodEnum,...ea(t)})}eG.create=(e,t)=>new eG({value:e,typeName:T.ZodLiteral,...ea(t)});class eB extends eo{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return V(t,{expected:k.joinValues(n),received:t.parsedType,code:z.invalid_type}),q}if(et(this,E,"f")||en(this,E,new Set(this._def.values),"f"),!et(this,E,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return V(t,{received:t.data,code:z.invalid_enum_value,options:n}),q}return Y(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eB.create(e,{...this._def,...t})}exclude(e,t=this._def){return eB.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}E=new WeakMap,eB.create=eV;class eq extends eo{constructor(){super(...arguments),O.set(this,void 0)}_parse(e){let t=k.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==D.string&&n.parsedType!==D.number){let e=k.objectValues(t);return V(n,{expected:k.joinValues(e),received:n.parsedType,code:z.invalid_type}),q}if(et(this,O,"f")||en(this,O,new Set(k.getValidEnumValues(this._def.values)),"f"),!et(this,O,"f").has(e.data)){let e=k.objectValues(t);return V(n,{received:n.data,code:z.invalid_enum_value,options:e}),q}return Y(e.data)}get enum(){return this._def.values}}O=new WeakMap,eq.create=(e,t)=>new eq({values:e,typeName:T.ZodNativeEnum,...ea(t)});class eK extends eo{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==D.promise&&!1===t.common.async?(V(t,{code:z.invalid_type,expected:D.promise,received:t.parsedType}),q):Y((t.parsedType===D.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eK.create=(e,t)=>new eK({type:e,typeName:T.ZodPromise,...ea(t)});class eY extends eo{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{V(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return q;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?K(r.value):r});{if("aborted"===t.value)return q;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?K(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?q:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?q:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>X(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!X(e))return e;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}k.assertNever(r)}}eY.create=(e,t,n)=>new eY({schema:e,typeName:T.ZodEffects,effect:t,...ea(n)}),eY.createWithPreprocess=(e,t,n)=>new eY({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...ea(n)});class eQ extends eo{_parse(e){return this._getType(e)===D.undefined?Y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eQ.create=(e,t)=>new eQ({innerType:e,typeName:T.ZodOptional,...ea(t)});class eJ extends eo{_parse(e){return this._getType(e)===D.null?Y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eJ.create=(e,t)=>new eJ({innerType:e,typeName:T.ZodNullable,...ea(t)});class eX extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===D.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eX.create=(e,t)=>new eX({innerType:e,typeName:T.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...ea(t)});class e0 extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ee(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}e0.create=(e,t)=>new e0({innerType:e,typeName:T.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...ea(t)});class e1 extends eo{_parse(e){if(this._getType(e)!==D.nan){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.nan,received:t.parsedType}),q}return{status:"valid",value:e.data}}}e1.create=e=>new e1({typeName:T.ZodNaN,...ea(e)});let e2=Symbol("zod_brand");class e4 extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class e5 extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),K(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new e5({in:e,out:t,typeName:T.ZodPipeline})}}class e3 extends eo{_parse(e){let t=this._def.innerType._parse(e),n=e=>(X(e)&&(e.value=Object.freeze(e.value)),e);return ee(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function e6(e,t={},n){return e?eS.create().superRefine((r,i)=>{var a,o;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(o=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===o||o;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:s})}}):eS.create()}e3.create=(e,t)=>new e3({innerType:e,typeName:T.ZodReadonly,...ea(t)});let e7={object:eL.lazycreate};(x=T||(T={})).ZodString="ZodString",x.ZodNumber="ZodNumber",x.ZodNaN="ZodNaN",x.ZodBigInt="ZodBigInt",x.ZodBoolean="ZodBoolean",x.ZodDate="ZodDate",x.ZodSymbol="ZodSymbol",x.ZodUndefined="ZodUndefined",x.ZodNull="ZodNull",x.ZodAny="ZodAny",x.ZodUnknown="ZodUnknown",x.ZodNever="ZodNever",x.ZodVoid="ZodVoid",x.ZodArray="ZodArray",x.ZodObject="ZodObject",x.ZodUnion="ZodUnion",x.ZodDiscriminatedUnion="ZodDiscriminatedUnion",x.ZodIntersection="ZodIntersection",x.ZodTuple="ZodTuple",x.ZodRecord="ZodRecord",x.ZodMap="ZodMap",x.ZodSet="ZodSet",x.ZodFunction="ZodFunction",x.ZodLazy="ZodLazy",x.ZodLiteral="ZodLiteral",x.ZodEnum="ZodEnum",x.ZodEffects="ZodEffects",x.ZodNativeEnum="ZodNativeEnum",x.ZodOptional="ZodOptional",x.ZodNullable="ZodNullable",x.ZodDefault="ZodDefault",x.ZodCatch="ZodCatch",x.ZodPromise="ZodPromise",x.ZodBranded="ZodBranded",x.ZodPipeline="ZodPipeline",x.ZodReadonly="ZodReadonly";let e9=ew.create,e8=ek.create,te=e1.create,tt=e_.create,tn=ej.create,tr=eE.create,ti=eO.create,ta=eT.create,to=eC.create,ts=eS.create,tl=eN.create,tu=eR.create,tc=eI.create,td=eA.create,tf=eL.create,th=eL.strictCreate,tp=eP.create,tm=eZ.create,tx=eD.create,tg=eF.create,tv=ez.create,ty=e$.create,tb=eU.create,tw=eW.create,tk=eH.create,t_=eG.create,tj=eB.create,tE=eq.create,tO=eK.create,tT=eY.create,tC=eQ.create,tS=eJ.create,tN=eY.createWithPreprocess,tR=e5.create;var tI=Object.freeze({__proto__:null,defaultErrorMap:U,setErrorMap:function(e){W=e},getErrorMap:H,makeIssue:G,EMPTY_PATH:[],addIssueToContext:V,ParseStatus:B,INVALID:q,DIRTY:K,OK:Y,isAborted:Q,isDirty:J,isValid:X,isAsync:ee,get util(){return k},get objectUtil(){return _},ZodParsedType:D,getParsedType:F,ZodType:eo,datetimeRegex:eb,ZodString:ew,ZodNumber:ek,ZodBigInt:e_,ZodBoolean:ej,ZodDate:eE,ZodSymbol:eO,ZodUndefined:eT,ZodNull:eC,ZodAny:eS,ZodUnknown:eN,ZodNever:eR,ZodVoid:eI,ZodArray:eA,ZodObject:eL,ZodUnion:eP,ZodDiscriminatedUnion:eZ,ZodIntersection:eD,ZodTuple:eF,ZodRecord:ez,ZodMap:e$,ZodSet:eU,ZodFunction:eW,ZodLazy:eH,ZodLiteral:eG,ZodEnum:eB,ZodNativeEnum:eq,ZodPromise:eK,ZodEffects:eY,ZodTransformer:eY,ZodOptional:eQ,ZodNullable:eJ,ZodDefault:eX,ZodCatch:e0,ZodNaN:e1,BRAND:e2,ZodBranded:e4,ZodPipeline:e5,ZodReadonly:e3,custom:e6,Schema:eo,ZodSchema:eo,late:e7,get ZodFirstPartyTypeKind(){return T},coerce:{string:e=>ew.create({...e,coerce:!0}),number:e=>ek.create({...e,coerce:!0}),boolean:e=>ej.create({...e,coerce:!0}),bigint:e=>e_.create({...e,coerce:!0}),date:e=>eE.create({...e,coerce:!0})},any:ts,array:td,bigint:tt,boolean:tn,date:tr,discriminatedUnion:tm,effect:tT,enum:tj,function:tw,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>e6(t=>t instanceof e,t),intersection:tx,lazy:tk,literal:t_,map:ty,nan:te,nativeEnum:tE,never:tu,null:to,nullable:tS,number:e8,object:tf,oboolean:()=>tn().optional(),onumber:()=>e8().optional(),optional:tC,ostring:()=>e9().optional(),pipeline:tR,preprocess:tN,promise:tO,record:tv,set:tb,strictObject:th,string:e9,symbol:ti,transformer:tT,tuple:tg,undefined:ta,union:tp,unknown:tl,void:tc,NEVER:q,ZodIssueCode:z,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:$}),tA=n(1664),tL=n.n(tA);n(6337);var tP=n(5893);let tM=["light","dark"],tZ="(prefers-color-scheme: dark)",tD="undefined"==typeof window,tF=(0,R.createContext)(void 0),tz={setTheme:e=>{},themes:[]},t$=()=>{var e;return null!==(e=(0,R.useContext)(tF))&&void 0!==e?e:tz},tU=e=>(0,R.useContext)(tF)?R.createElement(R.Fragment,null,e.children):R.createElement(tH,e),tW=["light","dark"],tH=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:a=tW,defaultTheme:o=n?"system":"light",attribute:s="data-theme",value:l,children:u,nonce:c})=>{let[d,f]=(0,R.useState)(()=>tV(i,o)),[h,p]=(0,R.useState)(()=>tV(i)),m=l?Object.values(l):a,x=(0,R.useCallback)(e=>{let i=e;if(!i)return;"system"===e&&n&&(i=tq());let a=l?l[i]:i,u=t?tB():null,c=document.documentElement;if("class"===s?(c.classList.remove(...m),a&&c.classList.add(a)):a?c.setAttribute(s,a):c.removeAttribute(s),r){let e=tM.includes(o)?o:null,t=tM.includes(i)?i:e;c.style.colorScheme=t}null==u||u()},[]),g=(0,R.useCallback)(e=>{f(e);try{localStorage.setItem(i,e)}catch(e){}},[e]),v=(0,R.useCallback)(t=>{p(tq(t)),"system"===d&&n&&!e&&x("system")},[d,e]);(0,R.useEffect)(()=>{let e=window.matchMedia(tZ);return e.addListener(v),v(e),()=>e.removeListener(v)},[v]),(0,R.useEffect)(()=>{let e=e=>{e.key===i&&g(e.newValue||o)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[g]),(0,R.useEffect)(()=>{x(null!=e?e:d)},[e,d]);let y=(0,R.useMemo)(()=>({theme:d,setTheme:g,forcedTheme:e,resolvedTheme:"system"===d?h:d,themes:n?[...a,"system"]:a,systemTheme:n?h:void 0}),[d,g,e,h,n,a]);return R.createElement(tF.Provider,{value:y},R.createElement(tG,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:i,themes:a,defaultTheme:o,attribute:s,value:l,children:u,attrs:m,nonce:c}),u)},tG=(0,R.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:l})=>{let u="system"===a,c="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${s.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?tM.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(e,t=!1,r=!0)=>{let a=o?o[e]:e,s=t?e+"|| ''":`'${a}'`,l="";return i&&r&&!t&&tM.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||a?`c.add(${s})`:"null":a&&(l+=`d[s](n,${s})`),l},h=e?`!function(){${c}${f(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${tZ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${d}}catch(t){}}();`;return R.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})},()=>!0),tV=(e,t)=>{let n;if(!tD){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},tB=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},tq=e=>(e||(e=window.matchMedia(tZ)),e.matches?"dark":"light");var tK={breadcrumb:!0,collapsed:!1,footer:!0,layout:"default",navbar:!0,pagination:!0,sidebar:!0,timestamp:!0,toc:!0,typesetting:"default"},tY=tI.strictObject({breadcrumb:tI.boolean(),collapsed:tI.boolean(),footer:tI.boolean(),layout:tI.enum(["default","full","raw"]),navbar:tI.boolean(),pagination:tI.boolean(),sidebar:tI.boolean(),timestamp:tI.boolean(),toc:tI.boolean(),typesetting:tI.enum(["default","article"])}),tQ=tI.enum(["normal","hidden","children"]),tJ=tI.string(),tX=tI.strictObject({href:tI.string(),newWindow:tI.boolean(),title:tJ}),t0=tI.strictObject({display:tQ.optional(),items:tI.record(tX.partial({href:!0,newWindow:!0})),title:tJ,type:tI.literal("menu")}),t1=tI.strictObject({title:tJ.optional(),type:tI.literal("separator")}),t2=tX.extend({display:tQ,theme:tY,title:tJ,type:tI.enum(["page","doc"])}).deepPartial();tI.string().or(t0).or(t1).or(t2);var t4=n(3458),t5=n.n(t4);function t3(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function t6(e){var t=t3(e).Element;return e instanceof t||e instanceof Element}function t7(e){var t=t3(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function t9(e){if("undefined"==typeof ShadowRoot)return!1;var t=t3(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var t8=Math.max,ne=Math.min,nt=Math.round;function nn(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nr(){return!/^((?!chrome|android).)*safari/i.test(nn())}function ni(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&t7(e)&&(i=e.offsetWidth>0&&nt(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&nt(r.height)/e.offsetHeight||1);var o=(t6(e)?t3(e):window).visualViewport,s=!nr()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/i,u=(r.top+(s&&o?o.offsetTop:0))/a,c=r.width/i,d=r.height/a;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function na(e){var t=t3(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function no(e){return e?(e.nodeName||"").toLowerCase():null}function ns(e){return((t6(e)?e.ownerDocument:e.document)||window.document).documentElement}function nl(e){return ni(ns(e)).left+na(e).scrollLeft}function nu(e){return t3(e).getComputedStyle(e)}function nc(e){var t=nu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function nd(e){var t=ni(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nf(e){return"html"===no(e)?e:e.assignedSlot||e.parentNode||(t9(e)?e.host:null)||ns(e)}function nh(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(no(t))>=0?t.ownerDocument.body:t7(t)&&nc(t)?t:e(nf(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=t3(r),o=i?[a].concat(a.visualViewport||[],nc(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(nh(nf(o)))}function np(e){return t7(e)&&"fixed"!==nu(e).position?e.offsetParent:null}function nm(e){for(var t=t3(e),n=np(e);n&&["table","td","th"].indexOf(no(n))>=0&&"static"===nu(n).position;)n=np(n);return n&&("html"===no(n)||"body"===no(n)&&"static"===nu(n).position)?t:n||function(e){var t=/firefox/i.test(nn());if(/Trident/i.test(nn())&&t7(e)&&"fixed"===nu(e).position)return null;var n=nf(e);for(t9(n)&&(n=n.host);t7(n)&&0>["html","body"].indexOf(no(n));){var r=nu(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var nx="bottom",ng="right",nv="left",ny="auto",nb=["top",nx,ng,nv],nw="start",nk="viewport",n_="popper",nj=nb.reduce(function(e,t){return e.concat([t+"-"+nw,t+"-end"])},[]),nE=[].concat(nb,[ny]).reduce(function(e,t){return e.concat([t,t+"-"+nw,t+"-end"])},[]),nO=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],nT={placement:"bottom",modifiers:[],strategy:"absolute"};function nC(){for(var e=arguments.length,t=Array(e),n=0;n=0?"x":"y"}function nA(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?nN(i):null,o=i?nR(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:s,y:n.y-r.height};break;case nx:t={x:s,y:n.y+n.height};break;case ng:t={x:n.x+n.width,y:l};break;case nv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=a?nI(a):null;if(null!=u){var c="y"===u?"height":"width";switch(o){case nw:t[u]=t[u]-(n[c]/2-r[c]/2);break;case"end":t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var nL={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nP(e){var t,n,r,i,a,o,s,l=e.popper,u=e.popperRect,c=e.placement,d=e.variation,f=e.offsets,h=e.position,p=e.gpuAcceleration,m=e.adaptive,x=e.roundOffsets,g=e.isFixed,v=f.x,y=void 0===v?0:v,b=f.y,w=void 0===b?0:b,k="function"==typeof x?x({x:y,y:w}):{x:y,y:w};y=k.x,w=k.y;var _=f.hasOwnProperty("x"),j=f.hasOwnProperty("y"),E=nv,O="top",T=window;if(m){var C=nm(l),S="clientHeight",N="clientWidth";C===t3(l)&&"static"!==nu(C=ns(l)).position&&"absolute"===h&&(S="scrollHeight",N="scrollWidth"),("top"===c||(c===nv||c===ng)&&"end"===d)&&(O=nx,w-=(g&&C===T&&T.visualViewport?T.visualViewport.height:C[S])-u.height,w*=p?1:-1),(c===nv||("top"===c||c===nx)&&"end"===d)&&(E=ng,y-=(g&&C===T&&T.visualViewport?T.visualViewport.width:C[N])-u.width,y*=p?1:-1)}var R=Object.assign({position:h},m&&nL),I=!0===x?(t={x:y,y:w},n=t3(l),r=t.x,i=t.y,{x:nt(r*(a=n.devicePixelRatio||1))/a||0,y:nt(i*a)/a||0}):{x:y,y:w};return(y=I.x,w=I.y,p)?Object.assign({},R,((s={})[O]=j?"0":"",s[E]=_?"0":"",s.transform=1>=(T.devicePixelRatio||1)?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",s)):Object.assign({},R,((o={})[O]=j?w+"px":"",o[E]=_?y+"px":"",o.transform="",o))}var nM={left:"right",right:"left",bottom:"top",top:"bottom"};function nZ(e){return e.replace(/left|right|bottom|top/g,function(e){return nM[e]})}var nD={start:"end",end:"start"};function nF(e){return e.replace(/start|end/g,function(e){return nD[e]})}function nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&t9(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function n$(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nU(e,t,n){var r,i,a,o,s,l,u,c,d,f;return t===nk?n$(function(e,t){var n=t3(e),r=ns(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var u=nr();(u||!u&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+nl(e),y:l}}(e,n)):t6(t)?((r=ni(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):n$((i=ns(e),o=ns(i),s=na(i),l=null==(a=i.ownerDocument)?void 0:a.body,u=t8(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=t8(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-s.scrollLeft+nl(i),f=-s.scrollTop,"rtl"===nu(l||o).direction&&(d+=t8(o.clientWidth,l?l.clientWidth:0)-u),{width:u,height:c,x:d,y:f}))}function nW(){return{top:0,right:0,bottom:0,left:0}}function nH(e){return Object.assign({},nW(),e)}function nG(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function nV(e,t){void 0===t&&(t={});var n,r,i,a,o,s,l,u,c=t,d=c.placement,f=void 0===d?e.placement:d,h=c.strategy,p=void 0===h?e.strategy:h,m=c.boundary,x=c.rootBoundary,g=c.elementContext,v=void 0===g?n_:g,y=c.altBoundary,b=c.padding,w=void 0===b?0:b,k=nH("number"!=typeof w?w:nG(w,nb)),_=e.rects.popper,j=e.elements[void 0!==y&&y?v===n_?"reference":n_:v],E=(n=t6(j)?j:j.contextElement||ns(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===x?nk:x,l=(s=[].concat("clippingParents"===r?(a=nh(nf(n)),t6(o=["absolute","fixed"].indexOf(nu(n).position)>=0&&t7(n)?nm(n):n)?a.filter(function(e){return t6(e)&&nz(e,o)&&"body"!==no(e)}):[]):[].concat(r),[i]))[0],(u=s.reduce(function(e,t){var r=nU(n,t,p);return e.top=t8(r.top,e.top),e.right=ne(r.right,e.right),e.bottom=ne(r.bottom,e.bottom),e.left=t8(r.left,e.left),e},nU(n,l,p))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),O=ni(e.elements.reference),T=nA({reference:O,element:_,strategy:"absolute",placement:f}),C=n$(Object.assign({},_,T)),S=v===n_?C:O,N={top:E.top-S.top+k.top,bottom:S.bottom-E.bottom+k.bottom,left:E.left-S.left+k.left,right:S.right-E.right+k.right},R=e.modifiersData.offset;if(v===n_&&R){var I=R[f];Object.keys(N).forEach(function(e){var t=[ng,nx].indexOf(e)>=0?1:-1,n=["top",nx].indexOf(e)>=0?"y":"x";N[e]+=I[n]*t})}return N}function nB(e,t,n){return t8(e,ne(t,n))}function nq(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function nK(e){return["top",ng,nx,nv].some(function(t){return e[t]>=0})}var nY=(y=void 0===(v=(g={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=t3(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(e){e.addEventListener("scroll",n.update,nS)}),s&&l.addEventListener("resize",n.update,nS),function(){a&&u.forEach(function(e){e.removeEventListener("scroll",n.update,nS)}),s&&l.removeEventListener("resize",n.update,nS)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=nA({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,a=n.roundOffsets,o=void 0===a||a,s={placement:nN(t.placement),variation:nR(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,nP(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,nP(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];t7(i)&&no(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});t7(r)&&no(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=nE.reduce(function(e,n){var r,i,o,s,l,u;return e[n]=(r=t.rects,o=[nv,"top"].indexOf(i=nN(n))>=0?-1:1,l=(s="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],u=s[1],l=l||0,u=(u||0)*o,[nv,ng].indexOf(i)>=0?{x:u,y:l}:{x:l,y:u}),e},{}),s=o[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,x=t.options.placement,g=nN(x)===x,v=l||(g||!p?[nZ(x)]:function(e){if(nN(e)===ny)return[];var t=nZ(e);return[nF(e),t,nF(t)]}(x)),y=[x].concat(v).reduce(function(e,n){var r,i,a,o,s,l,f,h,x,g,v,y;return e.concat(nN(n)===ny?(i=(r={placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:m}).placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,h=void 0===(f=r.allowedAutoPlacements)?nE:f,0===(v=(g=(x=nR(i))?l?nj:nj.filter(function(e){return nR(e)===x}):nb).filter(function(e){return h.indexOf(e)>=0})).length&&(v=g),Object.keys(y=v.reduce(function(e,n){return e[n]=nV(t,{placement:n,boundary:a,rootBoundary:o,padding:s})[nN(n)],e},{})).sort(function(e,t){return y[e]-y[t]})):n)},[]),b=t.rects.reference,w=t.rects.popper,k=new Map,_=!0,j=y[0],E=0;E=0,N=S?"width":"height",R=nV(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),I=S?C?ng:nv:C?nx:"top";b[N]>w[N]&&(I=nZ(I));var A=nZ(I),L=[];if(a&&L.push(R[T]<=0),s&&L.push(R[I]<=0,R[A]<=0),L.every(function(e){return e})){j=O,_=!1;break}k.set(O,L)}if(_)for(var P=p?3:1,M=function(e){var t=y.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return j=t,"break"},Z=P;Z>0&&"break"!==M(Z);Z--);t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=n.altAxis,o=n.boundary,s=n.rootBoundary,l=n.altBoundary,u=n.padding,c=n.tether,d=void 0===c||c,f=n.tetherOffset,h=void 0===f?0:f,p=nV(t,{boundary:o,rootBoundary:s,padding:u,altBoundary:l}),m=nN(t.placement),x=nR(t.placement),g=!x,v=nI(m),y="x"===v?"y":"x",b=t.modifiersData.popperOffsets,w=t.rects.reference,k=t.rects.popper,_="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,j="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(void 0===i||i){var T,C="y"===v?"top":nv,S="y"===v?nx:ng,N="y"===v?"height":"width",R=b[v],I=R+p[C],A=R-p[S],L=d?-k[N]/2:0,P=x===nw?w[N]:k[N],M=x===nw?-k[N]:-w[N],Z=t.elements.arrow,D=d&&Z?nd(Z):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nW(),z=F[C],$=F[S],U=nB(0,w[N],D[N]),W=g?w[N]/2-L-U-z-j.mainAxis:P-U-z-j.mainAxis,H=g?-w[N]/2+L+U+$+j.mainAxis:M+U+$+j.mainAxis,G=t.elements.arrow&&nm(t.elements.arrow),V=G?"y"===v?G.clientTop||0:G.clientLeft||0:0,B=null!=(T=null==E?void 0:E[v])?T:0,q=nB(d?ne(I,R+W-B-V):I,R,d?t8(A,R+H-B):A);b[v]=q,O[v]=q-R}if(void 0!==a&&a){var K,Y,Q="x"===v?"top":nv,J="x"===v?nx:ng,X=b[y],ee="y"===y?"height":"width",et=X+p[Q],en=X-p[J],er=-1!==["top",nv].indexOf(m),ei=null!=(Y=null==E?void 0:E[y])?Y:0,ea=er?et:X-w[ee]-k[ee]-ei+j.altAxis,eo=er?X+w[ee]+k[ee]-ei-j.altAxis:en,es=d&&er?(K=nB(ea,X,eo))>eo?eo:K:nB(d?ea:et,X,d?eo:en);b[y]=es,O[y]=es-X}t.modifiersData[r]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n,r=e.state,i=e.name,a=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=nN(r.placement),u=nI(l),c=[nv,ng].indexOf(l)>=0?"height":"width";if(o&&s){var d=nH("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},r.rects,{placement:r.placement})):t)?t:nG(t,nb)),f=nd(o),h="y"===u?"top":nv,p="y"===u?nx:ng,m=r.rects.reference[c]+r.rects.reference[u]-s[u]-r.rects.popper[c],x=s[u]-r.rects.reference[u],g=nm(o),v=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,y=d[h],b=v-f[c]-d[p],w=v/2-f[c]/2+(m/2-x/2),k=nB(y,w,b);r.modifiersData[i]=((n={})[u]=k,n.centerOffset=k-w,n)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&nz(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=nV(t,{elementContext:"reference"}),s=nV(t,{altBoundary:!0}),l=nq(o,r),u=nq(s,i,a),c=nK(l),d=nK(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:v,w=void 0===(b=g.defaultOptions)?nT:b,function(e,t,n){void 0===n&&(n=w);var r,i,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},nT,w),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,l={state:a,setOptions:function(n){var r,i,s,c,d,f="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},w,a.options,f),a.scrollParents={reference:t6(e)?nh(e):e.contextElement?nh(e.contextElement):[],popper:nh(t)};var h=(i=Object.keys(r=[].concat(y,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),s=new Map,c=new Set,d=[],i.forEach(function(e){s.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var n=s.get(t);n&&e(n)}}),d.push(t)}(e)}),nO.reduce(function(e,t){return e.concat(d.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=h.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:a,name:t,instance:l,options:void 0===n?{}:n});o.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e,t,n,r,i,o,u,c,d,f,h,p,m=a.elements,x=m.reference,g=m.popper;if(nC(x,g)){a.rects={reference:(t=nm(g),n="fixed"===a.options.strategy,r=t7(t),c=t7(t)&&(o=nt((i=t.getBoundingClientRect()).width)/t.offsetWidth||1,u=nt(i.height)/t.offsetHeight||1,1!==o||1!==u),d=ns(t),f=ni(x,c,n),h={scrollLeft:0,scrollTop:0},p={x:0,y:0},(r||!r&&!n)&&(("body"!==no(t)||nc(d))&&(h=(e=t)!==t3(e)&&t7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:na(e)),t7(t)?(p=ni(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):d&&(p.x=nl(d))),{x:f.left+h.scrollLeft-p.x,y:f.top+h.scrollTop-p.y,width:f.width,height:f.height}),popper:nd(g)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var v=0;v=r))));t++);if(n)return a?rm(l,r,0):void(t[t.length]=l)}return!n&&l}function rm(e,t,n){return e=1===e.length?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function rx(e,t,n,r){return e=n?(e=e[(r=r&&t>n)?t:n])&&e[r?n:t]:e[t]}function rg(e,t,n,r,i){let a=0;if(e.constructor===Array){if(i)-1!==(t=e.indexOf(t))?1=this.B&&(d||!c[p])){var a=rf(f,r,h),o="";switch(this.G){case"full":if(2a;s--)if(s-a>=this.B){var l=rf(f,r,h,i,a);rh(this,c,o=p.substring(a,s),l,e,n)}break}case"reverse":if(1=this.B&&rh(this,c,o,rf(f,r,h,i,s),e,n);o=""}case"forward":if(1=this.B&&rh(this,c,o,a,e,n);break}default:if(this.C&&(a=Math.min(a/this.C(t,p,h)|0,f-1)),rh(this,c,p,a,e,n),d&&1=this.B&&!i[p]){i[p]=1;let t=this.l&&p>a;rh(this,u,t?a:p,rf(o+(r/2>o?0:1),r,h,s-1,l-1),e,n,t?p:a)}}}}}this.m||(this.register[e]=1)}}return this},C.search=function(e,t,n){let r,i,a;n||(!t&&n2(e)?e=(n=e).query:n2(t)&&(n=t));let o=[],s,l,u=0;if(n){e=n.query||e,t=n.limit,u=n.offset||0;var c=n.context;l=n.suggest}if(e&&1<(s=(e=this.encode(""+e)).length)){n=nX();var d=[];for(let t=0,r=0,i;t=this.B&&!n[i]){if(!this.s&&!l&&!this.map[i])return o;d[r++]=i,n[i]=1}s=(e=d).length}if(!s)return o;for(t||(t=100),c=this.depth&&1{a=e})),i||(i=0)){case 0:if(o="reg",this.m)for(let e in s=nX(),this.register)s[e]=1;else s=this.register;break;case 1:o="cfg",s={doc:0,opt:this.s?1:0};break;case 2:o="map",s=this.map;break;case 3:o="ctx",s=this.h;break;default:void 0===n&&a&&a();return}return rc(e,t||this,n,o,r,i,s,a),l},C.import=function(e,t){if(t)switch(n1(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},ri(rd.prototype);let ry=0;function rb(e){var t;if(!(this instanceof rb))return new rb(e);e?n4(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());let r="undefined"==typeof window&&self.exports,i=this;this.o=function(e,t,r){let i;try{i=t?new(n(5789)).Worker("//node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+rv.toString()],{type:"text/javascript"}))):new Worker(n1(r)?r:"worker/worker.js",{type:"module"})}catch(e){}return i}(t,r,e.worker),this.h=nX(),this.o&&(r?this.o.on("message",function(e){i.h[e.id](e.msg),delete i.h[e.id]}):this.o.onmessage=function(e){e=e.data,i.h[e.id](e.msg),delete i.h[e.id]},this.o.postMessage({task:"init",factory:t,options:e}))}function rw(e){rb.prototype[e]=rb.prototype[e+"Async"]=function(){let t;let n=this,r=[].slice.call(arguments);var i=r[r.length-1];return n4(i)&&(t=i,r.splice(r.length-1,1)),i=new Promise(function(t){setTimeout(function(){n.h[++ry]=t,n.o.postMessage({task:e,id:ry,args:r})})}),t?(i.then(t),this):i}}function rk(e){if(!(this instanceof rk))return new rk(e);var t,n=e.document||e.doc||e;this.K=[],this.h=[],this.A=[],this.register=nX(),this.key=(t=n.key||n.id)&&r_(t,this.A)||"id",this.m=nQ(e.fastupdate),this.C=(t=n.store)&&!0!==t&&[],this.store=t&&nX(),this.I=(t=n.tag)&&r_(t,this.A),this.l=t&&nX(),this.cache=(t=e.cache)&&new rs(t),e.cache=!1,this.o=e.worker,this.async=!1,t=nX();let r=n.index||n.field||n;n1(r)&&(r=[r]);for(let n=0,i,a;nt||n)&&(i=i.slice(n,n+t)),r&&(i=rO.call(this,i)),{tag:e,result:i}}function rO(e){let t=Array(e.length);for(let n=0,r;n{a=e})),i||(i=0),r||(r=0),r()=>e.dispose(),[e]),e}var rZ=n(3),rD=n(2308),rF=n(1378),rz=n(5508),r$=n(2047),rU=n(1813),rW=n(8844);function rH(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.add(...n)}function rG(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.remove(...n)}let rV=(0,R.createContext)(null);rV.displayName="OpenClosedContext";var rB=((i=rB||{})[i.Open=1]="Open",i[i.Closed=2]="Closed",i[i.Closing=4]="Closing",i[i.Opening=8]="Opening",i);function rq(){return(0,R.useContext)(rV)}function rK(e){let{value:t,children:n}=e;return R.createElement(rV.Provider,{value:t},n)}var rY=n(5602),rQ=n(8287);function rJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/\s+/).filter(e=>e.length>1)}let rX=(0,R.createContext)(null);rX.displayName="TransitionContext";var r0=((a=r0||{}).Visible="visible",a.Hidden="hidden",a);let r1=(0,R.createContext)(null);function r2(e){return"children"in e?r2(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function r4(e,t){let n=(0,rz.E)(e),r=(0,R.useRef)([]),i=(0,rD.t)(),a=rM(),o=(0,rZ.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rQ.l4.Hidden,o=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==o&&((0,rW.E)(t,{[rQ.l4.Unmount](){r.current.splice(o,1)},[rQ.l4.Hidden](){r.current[o].state="hidden"}}),a.microTask(()=>{var e;!r2(r)&&i.current&&(null==(e=n.current)||e.call(n))}))}),s=(0,rZ.z)(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>o(e,rQ.l4.Unmount)}),l=(0,R.useRef)([]),u=(0,R.useRef)(Promise.resolve()),c=(0,R.useRef)({enter:[],leave:[],idle:[]}),d=(0,rZ.z)((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(c.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?u.current=u.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),f=(0,rZ.z)((e,t,n)=>{Promise.all(c.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>n(t))});return(0,R.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:u,chains:c}),[s,o,r,d,f,c,u])}function r5(){}r1.displayName="NestingContext";let r3=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function r6(e){var t;let n={};for(let r of r3)n[r]=null!=(t=e[r])?t:r5;return n}let r7=rQ.AN.RenderStrategy,r9=(0,rQ.yV)(function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,R.useRef)(null),s=(0,rU.T)(o,t);(0,r$.H)();let l=rq();if(void 0===n&&null!==l&&(n=(l&rB.Open)===rB.Open),![!0,!1].includes(n))throw Error("A is used but it is missing a `show={true | false}` prop.");let[u,c]=(0,R.useState)(n?"visible":"hidden"),d=r4(()=>{c("hidden")}),[f,h]=(0,R.useState)(!0),p=(0,R.useRef)([n]);(0,rF.e)(()=>{!1!==f&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let m=(0,R.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);(0,R.useEffect)(()=>{if(n)c("visible");else if(r2(d)){let e=o.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&c("hidden")}else c("hidden")},[n,d]);let x={unmount:i},g=(0,rZ.z)(()=>{var t;f&&h(!1),null==(t=e.beforeEnter)||t.call(e)}),v=(0,rZ.z)(()=>{var t;f&&h(!1),null==(t=e.beforeLeave)||t.call(e)});return R.createElement(r1.Provider,{value:d},R.createElement(rX.Provider,{value:m},(0,rQ.sY)({ourProps:{...x,as:R.Fragment,children:R.createElement(r8,{ref:s,...x,...a,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:R.Fragment,features:r7,visible:"visible"===u,name:"Transition"})))}),r8=(0,rQ.yV)(function(e,t){var n,r,i;let a;let{beforeEnter:o,afterEnter:s,beforeLeave:l,afterLeave:u,enter:c,enterFrom:d,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:x,...g}=e,v=(0,R.useRef)(null),y=(0,rU.T)(v,t),b=null==(n=g.unmount)||n?rQ.l4.Unmount:rQ.l4.Hidden,{show:w,appear:k,initial:_}=function(){let e=(0,R.useContext)(rX);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[j,E]=(0,R.useState)(w?"visible":"hidden"),O=function(){let e=(0,R.useContext)(r1);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:T,unregister:C}=O;(0,R.useEffect)(()=>T(v),[T,v]),(0,R.useEffect)(()=>{if(b===rQ.l4.Hidden&&v.current){if(w&&"visible"!==j){E("visible");return}return(0,rW.E)(j,{hidden:()=>C(v),visible:()=>T(v)})}},[j,v,T,C,w,b]);let S=(0,rz.E)({base:rJ(g.className),enter:rJ(c),enterFrom:rJ(d),enterTo:rJ(f),entered:rJ(h),leave:rJ(p),leaveFrom:rJ(m),leaveTo:rJ(x)}),N=(i={beforeEnter:o,afterEnter:s,beforeLeave:l,afterLeave:u},a=(0,R.useRef)(r6(i)),(0,R.useEffect)(()=>{a.current=r6(i)},[i]),a),I=(0,r$.H)();(0,R.useEffect)(()=>{if(I&&"visible"===j&&null===v.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,j,I]);let A=k&&w&&_,L=I&&(!_||k)?w?"enter":"leave":"idle",P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,R.useState)(e),r=(0,rD.t)(),i=(0,R.useCallback)(e=>{r.current&&n(t=>t|e)},[t,r]),a=(0,R.useCallback)(e=>!!(t&e),[t]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:(0,R.useCallback)(e=>{r.current&&n(t=>t&~e)},[n,r]),toggleFlag:(0,R.useCallback)(e=>{r.current&&n(t=>t^e)},[n])}}(0),M=(0,rZ.z)(e=>(0,rW.E)(e,{enter:()=>{P.addFlag(rB.Opening),N.current.beforeEnter()},leave:()=>{P.addFlag(rB.Closing),N.current.beforeLeave()},idle:()=>{}})),Z=(0,rZ.z)(e=>(0,rW.E)(e,{enter:()=>{P.removeFlag(rB.Opening),N.current.afterEnter()},leave:()=>{P.removeFlag(rB.Closing),N.current.afterLeave()},idle:()=>{}})),D=r4(()=>{E("hidden"),C(v)},O),F=(0,R.useRef)(!1);!function(e){let{immediate:t,container:n,direction:r,classes:i,onStart:a,onStop:o}=e,s=(0,rD.t)(),l=rM(),u=(0,rz.E)(r);(0,rF.e)(()=>{t&&(u.current="enter")},[t]),(0,rF.e)(()=>{let e=(0,rP.k)();l.add(e.dispose);let t=n.current;if(t&&"idle"!==u.current&&s.current){var r,c,d;let n,s,l,f,h,p,m;return e.dispose(),a.current(u.current),e.add((r=i.current,c="enter"===u.current,d=()=>{e.dispose(),o.current(u.current)},s=c?"enter":"leave",l=(0,rP.k)(),f=void 0!==d?(n={called:!1},function(){for(var e=arguments.length,t=Array(e),r=0;r{},"enter"===s&&(t.removeAttribute("hidden"),t.style.display=""),h=(0,rW.E)(s,{enter:()=>r.enter,leave:()=>r.leave}),p=(0,rW.E)(s,{enter:()=>r.enterTo,leave:()=>r.leaveTo}),m=(0,rW.E)(s,{enter:()=>r.enterFrom,leave:()=>r.leaveFrom}),rG(t,...r.base,...r.enter,...r.enterTo,...r.enterFrom,...r.leave,...r.leaveFrom,...r.leaveTo,...r.entered),rH(t,...r.base,...h,...m),l.nextFrame(()=>{rG(t,...r.base,...h,...m),rH(t,...r.base,...h,...p),function(e,t){let n=(0,rP.k)();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t}),s=a+o;if(0!==s){n.group(n=>{n.setTimeout(()=>{t(),n.dispose()},s),n.addEventListener(e,"transitionrun",e=>{e.target===e.currentTarget&&n.dispose()})});let r=n.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();n.add(()=>t()),n.dispose}(t,()=>(rG(t,...r.base,...h),rH(t,...r.base,...r.entered),f()))}),l.dispose)),e.dispose}},[r])}({immediate:A,container:v,classes:S,direction:L,onStart:(0,rz.E)(e=>{F.current=!0,D.onStart(v,e,M)}),onStop:(0,rz.E)(e=>{F.current=!1,D.onStop(v,e,Z),"leave"!==e||r2(D)||(E("hidden"),C(v))})});let z=g;return A?z={...z,className:(0,rY.A)(g.className,...S.current.enter,...S.current.enterFrom)}:F.current&&(z.className=(0,rY.A)(g.className,null==(r=v.current)?void 0:r.className),""===z.className&&delete z.className),R.createElement(r1.Provider,{value:D},R.createElement(rK,{value:(0,rW.E)(j,{visible:rB.Open,hidden:rB.Closed})|P.flags},(0,rQ.sY)({ourProps:{ref:y},theirProps:z,defaultTag:"div",features:r7,visible:"visible"===j,name:"Transition.Child"})))}),ie=(0,rQ.yV)(function(e,t){let n=null!==(0,R.useContext)(rX),r=null!==rq();return R.createElement(R.Fragment,null,!n&&r?R.createElement(r9,{ref:t,...e}):R.createElement(r8,{ref:t,...e}))}),it=Object.assign(r9,{Child:ie,Root:r9});var ir=n(953);function ii(e,t){let[n,r]=(0,R.useState)(e),i=(0,rz.E)(e);return(0,rF.e)(()=>r(i.current),[i,r,...t]),n}var ia=n(4924),io=n(8657);function is(e,t,n){let r=(0,rz.E)(t);(0,R.useEffect)(()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}function il(e,t){var n,r;let i,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=(0,R.useRef)(!1);function s(n,r){if(!o.current||n.defaultPrevented)return;let i=r(n);if(null!==i&&i.getRootNode().contains(i)&&i.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(i)||n.composed&&n.composedPath().includes(e))return}return(0,io.sP)(i,io.tJ.Loose)||-1===i.tabIndex||n.preventDefault(),t(n,i)}}(0,R.useEffect)(()=>{requestAnimationFrame(()=>{o.current=a})},[a]);let l=(0,R.useRef)(null);is("pointerdown",e=>{var t,n;o.current&&(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),is("mousedown",e=>{var t,n;o.current&&(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),is("click",e=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||l.current&&(s(e,()=>l.current),l.current=null)},!0),is("touchend",e=>s(e,()=>e.target instanceof HTMLElement?e.target:null),!0),n="blur",r=e=>s(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),i=(0,rz.E)(r),(0,R.useEffect)(()=>{function e(e){i.current(e)}return window.addEventListener(n,e,!0),()=>window.removeEventListener(n,e,!0)},[n,!0])}var iu=n(961);let ic=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function id(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let a=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),a=!0;let o=a?null!=(n=i.innerText)?n:"":r;return ic.test(o)&&(o=o.replace(ic,"")),o}function ih(e){let t=(0,R.useRef)(""),n=(0,R.useRef)("");return(0,rZ.z)(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let a=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():id(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return id(e).trim()})(r).trim().toLowerCase();return t.current=i,n.current=a,a})}function ip(e){return[e.screenX,e.screenY]}function im(){let e=(0,R.useRef)([-1,-1]);return{wasMoved(t){let n=ip(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=ip(t)}}}var ix=n(7524);function ig(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var iv=((o=iv||{})[o.First=0]="First",o[o.Previous=1]="Previous",o[o.Next=2]="Next",o[o.Last=3]="Last",o[o.Specific=4]="Specific",o[o.Nothing=5]="Nothing",o);function iy(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,io.z2)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{options:r,activeOptionIndex:i}}let iC={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(e=>n(e.dataRef.current.value));return -1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||1===e.listboxState)return e;let r=iT(e),i=iy(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),a=i?e.options.indexOf(i):-1;return -1===a||a===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:a,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=iT(e,e=>[...e,n]);return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=iT(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},iS=(0,R.createContext)(null);function iN(e){let t=(0,R.useContext)(iS);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,iN),t}return t}iS.displayName="ListboxActionsContext";let iR=(0,R.createContext)(null);function iI(e){let t=(0,R.useContext)(iR);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,iI),t}return t}function iA(e,t){return(0,rW.E)(t.type,iC,e,t)}iR.displayName="ListboxDataContext";let iL=R.Fragment,iP=rQ.AN.RenderStrategy|rQ.AN.Static,iM=Object.assign((0,rQ.yV)(function(e,t){let{value:n,defaultValue:r,form:i,name:a,onChange:o,by:s=(e,t)=>e===t,disabled:l=!1,horizontal:u=!1,multiple:c=!1,...d}=e,f=u?"horizontal":"vertical",h=(0,rU.T)(t),[p=c?[]:void 0,m]=function(e,t,n){let[r,i]=(0,R.useState)(n),a=void 0!==e,o=(0,R.useRef)(a),s=(0,R.useRef)(!1),l=(0,R.useRef)(!1);return!a||o.current||s.current?a||!o.current||l.current||(l.current=!0,o.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,o.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:r,(0,rZ.z)(e=>(a||i(e),null==t?void 0:t(e)))]}(n,o,r),[x,g]=(0,R.useReducer)(iA,{dataRef:(0,R.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),v=(0,R.useRef)({static:!1,hold:!1}),y=(0,R.useRef)(null),b=(0,R.useRef)(null),w=(0,R.useRef)(null),k=(0,rZ.z)("string"==typeof s?(e,t)=>(null==e?void 0:e[s])===(null==t?void 0:t[s]):s),_=(0,R.useCallback)(e=>(0,rW.E)(j.mode,{1:()=>p.some(t=>k(t,e)),0:()=>k(p,e)}),[p]),j=(0,R.useMemo)(()=>({...x,value:p,disabled:l,mode:c?1:0,orientation:f,compare:k,isSelected:_,optionsPropsRef:v,labelRef:y,buttonRef:b,optionsRef:w}),[p,l,c,x]);(0,rF.e)(()=>{x.dataRef.current=j},[j]),il([j.buttonRef,j.optionsRef],(e,t)=>{var n;g({type:1}),(0,io.sP)(t,io.tJ.Loose)||(e.preventDefault(),null==(n=j.buttonRef.current)||n.focus())},0===j.listboxState);let E=(0,R.useMemo)(()=>({open:0===j.listboxState,disabled:l,value:p}),[j,l,p]),O=(0,rZ.z)(e=>{let t=j.options.find(t=>t.id===e);t&&L(t.dataRef.current.value)}),T=(0,rZ.z)(()=>{if(null!==j.activeOptionIndex){let{dataRef:e,id:t}=j.options[j.activeOptionIndex];L(e.current.value),g({type:2,focus:iv.Specific,id:t})}}),C=(0,rZ.z)(()=>g({type:0})),S=(0,rZ.z)(()=>g({type:1})),N=(0,rZ.z)((e,t,n)=>e===iv.Specific?g({type:2,focus:iv.Specific,id:t,trigger:n}):g({type:2,focus:e,trigger:n})),I=(0,rZ.z)((e,t)=>(g({type:5,id:e,dataRef:t}),()=>g({type:6,id:e}))),A=(0,rZ.z)(e=>(g({type:7,id:e}),()=>g({type:7,id:null}))),L=(0,rZ.z)(e=>(0,rW.E)(j.mode,{0:()=>null==m?void 0:m(e),1(){let t=j.value.slice(),n=t.findIndex(t=>k(t,e));return -1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}})),P=(0,rZ.z)(e=>g({type:3,value:e})),M=(0,rZ.z)(()=>g({type:4})),Z=(0,R.useMemo)(()=>({onChange:L,registerOption:I,registerLabel:A,goToOption:N,closeListbox:S,openListbox:C,selectActiveOption:T,selectOption:O,search:P,clearSearch:M}),[]),D=(0,R.useRef)(null),F=rM();return(0,R.useEffect)(()=>{D.current&&void 0!==r&&F.addEventListener(D.current,"reset",()=>{null==m||m(r)})},[D,m]),R.createElement(iS.Provider,{value:Z},R.createElement(iR.Provider,{value:j},R.createElement(rK,{value:(0,rW.E)(j.listboxState,{0:rB.Open,1:rB.Closed})},null!=a&&null!=p&&(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[i,a]of Object.entries(t))!function t(n,r,i){if(Array.isArray(i))for(let[e,a]of i.entries())t(n,ib(r,e.toString()),a);else i instanceof Date?n.push([r,i.toISOString()]):"boolean"==typeof i?n.push([r,i?"1":"0"]):"string"==typeof i?n.push([r,i]):"number"==typeof i?n.push([r,"".concat(i)]):null==i?n.push([r,""]):e(i,r,n)}(r,ib(n,i),a);return r})({[a]:p}).map((e,t)=>{let[n,r]=e;return R.createElement(ix._,{features:ix.A.Hidden,ref:0===t?e=>{var t;D.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...(0,rQ.oA)({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:n,value:r})})}),(0,rQ.sY)({ourProps:{ref:h},theirProps:d,slot:E,defaultTag:iL,name:"Listbox"}))))}),{Button:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-listbox-button-".concat(r),...a}=e,o=iI("Listbox.Button"),s=iN("Listbox.Button"),l=(0,rU.T)(o.buttonRef,t),u=rM(),c=(0,rZ.z)(e=>{switch(e.key){case ik.R.Space:case ik.R.Enter:case ik.R.ArrowDown:e.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(iv.First)});break;case ik.R.ArrowUp:e.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(iv.Last)})}}),d=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),f=(0,rZ.z)(e=>{if(ig(e.currentTarget))return e.preventDefault();0===o.listboxState?(s.closeListbox(),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),s.openListbox())}),h=ii(()=>{if(o.labelId)return[o.labelId,i].join(" ")},[o.labelId,i]),p=(0,R.useMemo)(()=>({open:0===o.listboxState,disabled:o.disabled,value:o.value}),[o]),m={ref:l,id:i,type:(0,iu.f)(e,o.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsRef.current)?void 0:n.id,"aria-expanded":0===o.listboxState,"aria-labelledby":h,disabled:o.disabled,onKeyDown:c,onKeyUp:d,onClick:f};return(0,rQ.sY)({ourProps:m,theirProps:a,slot:p,defaultTag:"button",name:"Listbox.Button"})}),Label:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-listbox-label-".concat(n),...i}=e,a=iI("Listbox.Label"),o=iN("Listbox.Label"),s=(0,rU.T)(a.labelRef,t);(0,rF.e)(()=>o.registerLabel(r),[r]);let l=(0,rZ.z)(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),u=(0,R.useMemo)(()=>({open:0===a.listboxState,disabled:a.disabled}),[a]);return(0,rQ.sY)({ourProps:{ref:s,id:r,onClick:l},theirProps:i,slot:u,defaultTag:"label",name:"Listbox.Label"})}),Options:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-listbox-options-".concat(r),...a}=e,o=iI("Listbox.Options"),s=iN("Listbox.Options"),l=(0,rU.T)(o.optionsRef,t),u=rM(),c=rM(),d=rq(),f=null!==d?(d&rB.Open)===rB.Open:0===o.listboxState;(0,R.useEffect)(()=>{var e;let t=o.optionsRef.current;t&&0===o.listboxState&&t!==(null==(e=(0,iw.r)(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[o.listboxState,o.optionsRef]);let h=(0,rZ.z)(e=>{switch(c.dispose(),e.key){case ik.R.Space:if(""!==o.searchQuery)return e.preventDefault(),e.stopPropagation(),s.search(e.key);case ik.R.Enter:if(e.preventDefault(),e.stopPropagation(),null!==o.activeOptionIndex){let{dataRef:e}=o.options[o.activeOptionIndex];s.onChange(e.current.value)}0===o.mode&&(s.closeListbox(),(0,rP.k)().nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case(0,rW.E)(o.orientation,{vertical:ik.R.ArrowDown,horizontal:ik.R.ArrowRight}):return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Next);case(0,rW.E)(o.orientation,{vertical:ik.R.ArrowUp,horizontal:ik.R.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Previous);case ik.R.Home:case ik.R.PageUp:return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.First);case ik.R.End:case ik.R.PageDown:return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Last);case ik.R.Escape:return e.preventDefault(),e.stopPropagation(),s.closeListbox(),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case ik.R.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(s.search(e.key),c.setTimeout(()=>s.clearSearch(),350))}}),p=ii(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.id},[o.buttonRef.current]),m=(0,R.useMemo)(()=>({open:0===o.listboxState}),[o]),x={"aria-activedescendant":null===o.activeOptionIndex||null==(n=o.options[o.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===o.mode||void 0,"aria-labelledby":p,"aria-orientation":o.orientation,id:i,onKeyDown:h,role:"listbox",tabIndex:0,ref:l};return(0,rQ.sY)({ourProps:x,theirProps:a,slot:m,defaultTag:"ul",features:iP,visible:f,name:"Listbox.Options"})}),Option:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-listbox-option-".concat(n),disabled:i=!1,value:a,...o}=e,s=iI("Listbox.Option"),l=iN("Listbox.Option"),u=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===r,c=s.isSelected(a),d=(0,R.useRef)(null),f=ih(d),h=(0,rz.E)({disabled:i,value:a,domRef:d,get textValue(){return f()}}),p=(0,rU.T)(t,d);(0,rF.e)(()=>{if(0!==s.listboxState||!u||0===s.activationTrigger)return;let e=(0,rP.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=d.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[d,u,s.listboxState,s.activationTrigger,s.activeOptionIndex]),(0,rF.e)(()=>l.registerOption(r,h),[h,r]);let m=(0,rZ.z)(e=>{if(i)return e.preventDefault();l.onChange(a),0===s.mode&&(l.closeListbox(),(0,rP.k)().nextFrame(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),x=(0,rZ.z)(()=>{if(i)return l.goToOption(iv.Nothing);l.goToOption(iv.Specific,r)}),g=im(),v=(0,rZ.z)(e=>g.update(e)),y=(0,rZ.z)(e=>{g.wasMoved(e)&&(i||u||l.goToOption(iv.Specific,r,0))}),b=(0,rZ.z)(e=>{g.wasMoved(e)&&(i||u&&l.goToOption(iv.Nothing))}),w=(0,R.useMemo)(()=>({active:u,selected:c,disabled:i}),[u,c,i]);return(0,rQ.sY)({ourProps:{id:r,ref:p,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":c,disabled:void 0,onClick:m,onFocus:x,onPointerEnter:v,onMouseEnter:v,onPointerMove:y,onMouseMove:y,onPointerLeave:b,onMouseLeave:b},theirProps:o,slot:w,defaultTag:"li",name:"Listbox.Option"})})});var iZ=n(3935),iD=n(9008),iF=n.n(iD);function iz(){return(iz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var iU=["keyOverride"],iW=["crossOrigin"],iH={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},iG=function(e,t,n){void 0===t&&(t=[]);var r=void 0===n?{}:n,i=r.defaultWidth,a=r.defaultHeight;return t.reduce(function(t,n,r){return t.push(R.createElement("meta",{key:"og:"+e+":0"+r,property:"og:"+e,content:n.url})),n.alt&&t.push(R.createElement("meta",{key:"og:"+e+":alt0"+r,property:"og:"+e+":alt",content:n.alt})),n.secureUrl&&t.push(R.createElement("meta",{key:"og:"+e+":secure_url0"+r,property:"og:"+e+":secure_url",content:n.secureUrl.toString()})),n.type&&t.push(R.createElement("meta",{key:"og:"+e+":type0"+r,property:"og:"+e+":type",content:n.type.toString()})),n.width?t.push(R.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:n.width.toString()})):i&&t.push(R.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:i.toString()})),n.height?t.push(R.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:n.height.toString()})):a&&t.push(R.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:a.toString()})),t},[])},iV=function(e){var t,n,r,i,a,o=[];e.titleTemplate&&(iH.templateTitle=e.titleTemplate);var s="";e.title?(s=e.title,iH.templateTitle&&(s=iH.templateTitle.replace(/%s/g,function(){return s}))):e.defaultTitle&&(s=e.defaultTitle),s&&o.push(R.createElement("title",{key:"title"},s));var l=void 0===e.noindex?iH.noindex||e.dangerouslySetAllPagesToNoIndex:e.noindex,u=void 0===e.nofollow?iH.nofollow||e.dangerouslySetAllPagesToNoFollow:e.nofollow,c=e.norobots||iH.norobots,d="";if(e.robotsProps){var f=e.robotsProps,h=f.nosnippet,p=f.maxSnippet,m=f.maxImagePreview,x=f.maxVideoPreview,g=f.noarchive,v=f.noimageindex,y=f.notranslate,b=f.unavailableAfter;d=(h?",nosnippet":"")+(p?",max-snippet:"+p:"")+(m?",max-image-preview:"+m:"")+(g?",noarchive":"")+(b?",unavailable_after:"+b:"")+(v?",noimageindex":"")+(x?",max-video-preview:"+x:"")+(y?",notranslate":"")}if(e.norobots&&(iH.norobots=!0),l||u?(e.dangerouslySetAllPagesToNoIndex&&(iH.noindex=!0),e.dangerouslySetAllPagesToNoFollow&&(iH.nofollow=!0),o.push(R.createElement("meta",{key:"robots",name:"robots",content:(l?"noindex":"index")+","+(u?"nofollow":"follow")+d}))):(!c||d)&&o.push(R.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+d})),e.description&&o.push(R.createElement("meta",{key:"description",name:"description",content:e.description})),e.themeColor&&o.push(R.createElement("meta",{key:"theme-color",name:"theme-color",content:e.themeColor})),e.mobileAlternate&&o.push(R.createElement("link",{rel:"alternate",key:"mobileAlternate",media:e.mobileAlternate.media,href:e.mobileAlternate.href})),e.languageAlternates&&e.languageAlternates.length>0&&e.languageAlternates.forEach(function(e){o.push(R.createElement("link",{rel:"alternate",key:"languageAlternate-"+e.hrefLang,hrefLang:e.hrefLang,href:e.href}))}),e.twitter&&(e.twitter.cardType&&o.push(R.createElement("meta",{key:"twitter:card",name:"twitter:card",content:e.twitter.cardType})),e.twitter.site&&o.push(R.createElement("meta",{key:"twitter:site",name:"twitter:site",content:e.twitter.site})),e.twitter.handle&&o.push(R.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:e.twitter.handle}))),e.facebook&&e.facebook.appId&&o.push(R.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:e.facebook.appId})),(null!=(t=e.openGraph)&&t.title||s)&&o.push(R.createElement("meta",{key:"og:title",property:"og:title",content:(null==(i=e.openGraph)?void 0:i.title)||s})),(null!=(n=e.openGraph)&&n.description||e.description)&&o.push(R.createElement("meta",{key:"og:description",property:"og:description",content:(null==(a=e.openGraph)?void 0:a.description)||e.description})),e.openGraph){if((e.openGraph.url||e.canonical)&&o.push(R.createElement("meta",{key:"og:url",property:"og:url",content:e.openGraph.url||e.canonical})),e.openGraph.type){var w=e.openGraph.type.toLowerCase();o.push(R.createElement("meta",{key:"og:type",property:"og:type",content:w})),"profile"===w&&e.openGraph.profile?(e.openGraph.profile.firstName&&o.push(R.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:e.openGraph.profile.firstName})),e.openGraph.profile.lastName&&o.push(R.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:e.openGraph.profile.lastName})),e.openGraph.profile.username&&o.push(R.createElement("meta",{key:"profile:username",property:"profile:username",content:e.openGraph.profile.username})),e.openGraph.profile.gender&&o.push(R.createElement("meta",{key:"profile:gender",property:"profile:gender",content:e.openGraph.profile.gender}))):"book"===w&&e.openGraph.book?(e.openGraph.book.authors&&e.openGraph.book.authors.length&&e.openGraph.book.authors.forEach(function(e,t){o.push(R.createElement("meta",{key:"book:author:0"+t,property:"book:author",content:e}))}),e.openGraph.book.isbn&&o.push(R.createElement("meta",{key:"book:isbn",property:"book:isbn",content:e.openGraph.book.isbn})),e.openGraph.book.releaseDate&&o.push(R.createElement("meta",{key:"book:release_date",property:"book:release_date",content:e.openGraph.book.releaseDate})),e.openGraph.book.tags&&e.openGraph.book.tags.length&&e.openGraph.book.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"book:tag:0"+t,property:"book:tag",content:e}))})):"article"===w&&e.openGraph.article?(e.openGraph.article.publishedTime&&o.push(R.createElement("meta",{key:"article:published_time",property:"article:published_time",content:e.openGraph.article.publishedTime})),e.openGraph.article.modifiedTime&&o.push(R.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:e.openGraph.article.modifiedTime})),e.openGraph.article.expirationTime&&o.push(R.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:e.openGraph.article.expirationTime})),e.openGraph.article.authors&&e.openGraph.article.authors.length&&e.openGraph.article.authors.forEach(function(e,t){o.push(R.createElement("meta",{key:"article:author:0"+t,property:"article:author",content:e}))}),e.openGraph.article.section&&o.push(R.createElement("meta",{key:"article:section",property:"article:section",content:e.openGraph.article.section})),e.openGraph.article.tags&&e.openGraph.article.tags.length&&e.openGraph.article.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"article:tag:0"+t,property:"article:tag",content:e}))})):("video.movie"===w||"video.episode"===w||"video.tv_show"===w||"video.other"===w)&&e.openGraph.video&&(e.openGraph.video.actors&&e.openGraph.video.actors.length&&e.openGraph.video.actors.forEach(function(e,t){e.profile&&o.push(R.createElement("meta",{key:"video:actor:0"+t,property:"video:actor",content:e.profile})),e.role&&o.push(R.createElement("meta",{key:"video:actor:role:0"+t,property:"video:actor:role",content:e.role}))}),e.openGraph.video.directors&&e.openGraph.video.directors.length&&e.openGraph.video.directors.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:director:0"+t,property:"video:director",content:e}))}),e.openGraph.video.writers&&e.openGraph.video.writers.length&&e.openGraph.video.writers.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:writer:0"+t,property:"video:writer",content:e}))}),e.openGraph.video.duration&&o.push(R.createElement("meta",{key:"video:duration",property:"video:duration",content:e.openGraph.video.duration.toString()})),e.openGraph.video.releaseDate&&o.push(R.createElement("meta",{key:"video:release_date",property:"video:release_date",content:e.openGraph.video.releaseDate})),e.openGraph.video.tags&&e.openGraph.video.tags.length&&e.openGraph.video.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:tag:0"+t,property:"video:tag",content:e}))}),e.openGraph.video.series&&o.push(R.createElement("meta",{key:"video:series",property:"video:series",content:e.openGraph.video.series})))}e.defaultOpenGraphImageWidth&&(iH.defaultOpenGraphImageWidth=e.defaultOpenGraphImageWidth),e.defaultOpenGraphImageHeight&&(iH.defaultOpenGraphImageHeight=e.defaultOpenGraphImageHeight),e.openGraph.images&&e.openGraph.images.length&&o.push.apply(o,iG("image",e.openGraph.images,{defaultWidth:iH.defaultOpenGraphImageWidth,defaultHeight:iH.defaultOpenGraphImageHeight})),e.defaultOpenGraphVideoWidth&&(iH.defaultOpenGraphVideoWidth=e.defaultOpenGraphVideoWidth),e.defaultOpenGraphVideoHeight&&(iH.defaultOpenGraphVideoHeight=e.defaultOpenGraphVideoHeight),e.openGraph.videos&&e.openGraph.videos.length&&o.push.apply(o,iG("video",e.openGraph.videos,{defaultWidth:iH.defaultOpenGraphVideoWidth,defaultHeight:iH.defaultOpenGraphVideoHeight})),e.openGraph.audio&&o.push.apply(o,iG("audio",e.openGraph.audio)),e.openGraph.locale&&o.push(R.createElement("meta",{key:"og:locale",property:"og:locale",content:e.openGraph.locale})),(e.openGraph.siteName||e.openGraph.site_name)&&o.push(R.createElement("meta",{key:"og:site_name",property:"og:site_name",content:e.openGraph.siteName||e.openGraph.site_name}))}return e.canonical&&o.push(R.createElement("link",{rel:"canonical",href:e.canonical,key:"canonical"})),e.additionalMetaTags&&e.additionalMetaTags.length>0&&e.additionalMetaTags.forEach(function(e){var t,n,r=e.keyOverride,i=i$(e,iU);o.push(R.createElement("meta",iz({key:"meta:"+(null!=(t=null!=(n=null!=r?r:i.name)?n:i.property)?t:i.httpEquiv)},i)))}),null!=(r=e.additionalLinkTags)&&r.length&&e.additionalLinkTags.forEach(function(e){var t,n=e.crossOrigin,r=i$(e,iW);o.push(R.createElement("link",iz({key:"link"+(null!=(t=r.keyOverride)?t:r.href)+r.rel},r,{crossOrigin:"anonymous"===n||"use-credentials"===n||""===n?n:void 0})))}),o},iB=function(e){return R.createElement(iF(),null,iV(e))},iq=function(e){var t=e.title,n=e.themeColor,r=e.noindex,i=e.nofollow,a=e.robotsProps,o=e.description,s=e.canonical,l=e.openGraph,u=e.facebook,c=e.twitter,d=e.additionalMetaTags,f=e.titleTemplate,h=e.defaultTitle,p=e.mobileAlternate,m=e.languageAlternates,x=e.additionalLinkTags;return R.createElement(R.Fragment,null,R.createElement(iB,{title:t,themeColor:n,noindex:r,nofollow:i,robotsProps:a,description:o,canonical:s,facebook:u,openGraph:l,additionalMetaTags:d,twitter:c,titleTemplate:f,defaultTitle:h,mobileAlternate:p,languageAlternates:m,additionalLinkTags:x}))};RegExp("["+Object.keys(Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"})).join("")+"]","g");var iK=((d=iK||{})[d.Open=0]="Open",d[d.Closed=1]="Closed",d),iY=((f=iY||{})[f.Pointer=0]="Pointer",f[f.Other=1]="Other",f),iQ=((h=iQ||{})[h.OpenMenu=0]="OpenMenu",h[h.CloseMenu=1]="CloseMenu",h[h.GoToItem=2]="GoToItem",h[h.Search=3]="Search",h[h.ClearSearch=4]="ClearSearch",h[h.RegisterItem=5]="RegisterItem",h[h.UnregisterItem=6]="UnregisterItem",h);function iJ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=(0,io.z2)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{items:r,activeItemIndex:i}}let iX={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var n;let r=iJ(e),i=iy(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled}),a=i?e.items.indexOf(i):-1;return -1===a||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=iJ(e,e=>[...e,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=iJ(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}}},i0=(0,R.createContext)(null);function i1(e){let t=(0,R.useContext)(i0);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,i1),t}return t}function i2(e,t){return(0,rW.E)(t.type,iX,e,t)}i0.displayName="MenuContext";let i4=R.Fragment,i5=rQ.AN.RenderStrategy|rQ.AN.Static,i3=R.Fragment,i6=Object.assign((0,rQ.yV)(function(e,t){let{__demoMode:n=!1,...r}=e,i=(0,R.useReducer)(i2,{__demoMode:n,menuState:n?0:1,buttonRef:(0,R.createRef)(),itemsRef:(0,R.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:a,itemsRef:o,buttonRef:s},l]=i,u=(0,rU.T)(t);il([s,o],(e,t)=>{var n;l({type:1}),(0,io.sP)(t,io.tJ.Loose)||(e.preventDefault(),null==(n=s.current)||n.focus())},0===a);let c=(0,rZ.z)(()=>{l({type:1})}),d=(0,R.useMemo)(()=>({open:0===a,close:c}),[a,c]);return R.createElement(i0.Provider,{value:i},R.createElement(rK,{value:(0,rW.E)(a,{0:rB.Open,1:rB.Closed})},(0,rQ.sY)({ourProps:{ref:u},theirProps:r,slot:d,defaultTag:i4,name:"Menu"})))}),{Button:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-menu-button-".concat(r),...a}=e,[o,s]=i1("Menu.Button"),l=(0,rU.T)(o.buttonRef,t),u=rM(),c=(0,rZ.z)(e=>{switch(e.key){case ik.R.Space:case ik.R.Enter:case ik.R.ArrowDown:e.preventDefault(),e.stopPropagation(),s({type:0}),u.nextFrame(()=>s({type:2,focus:iv.First}));break;case ik.R.ArrowUp:e.preventDefault(),e.stopPropagation(),s({type:0}),u.nextFrame(()=>s({type:2,focus:iv.Last}))}}),d=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),f=(0,rZ.z)(t=>{if(ig(t.currentTarget))return t.preventDefault();e.disabled||(0===o.menuState?(s({type:1}),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(t.preventDefault(),s({type:0})))}),h=(0,R.useMemo)(()=>({open:0===o.menuState}),[o]),p={ref:l,id:i,type:(0,iu.f)(e,o.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=o.itemsRef.current)?void 0:n.id,"aria-expanded":0===o.menuState,onKeyDown:c,onKeyUp:d,onClick:f};return(0,rQ.sY)({ourProps:p,theirProps:a,slot:h,defaultTag:"button",name:"Menu.Button"})}),Items:(0,rQ.yV)(function(e,t){var n,r;let i=(0,ia.M)(),{id:a="headlessui-menu-items-".concat(i),...o}=e,[s,l]=i1("Menu.Items"),u=(0,rU.T)(s.itemsRef,t),c=function(){for(var e=arguments.length,t=Array(e),n=0;n(0,iw.r)(...t),[...t])}(s.itemsRef),d=rM(),f=rq(),h=null!==f?(f&rB.Open)===rB.Open:0===s.menuState;(0,R.useEffect)(()=>{let e=s.itemsRef.current;e&&0===s.menuState&&e!==(null==c?void 0:c.activeElement)&&e.focus({preventScroll:!0})},[s.menuState,s.itemsRef,c]),function(e){let{container:t,accept:n,walk:r,enabled:i=!0}=e,a=(0,R.useRef)(n),o=(0,R.useRef)(r);(0,R.useEffect)(()=>{a.current=n,o.current=r},[n,r]),(0,rF.e)(()=>{if(!t||!i)return;let e=(0,iw.r)(t);if(!e)return;let n=a.current,r=o.current,s=Object.assign(e=>n(e),{acceptNode:n}),l=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)r(l.currentNode)},[t,i,a,o])}({container:s.itemsRef.current,enabled:0===s.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let p=(0,rZ.z)(e=>{var t,n;switch(d.dispose(),e.key){case ik.R.Space:if(""!==s.searchQuery)return e.preventDefault(),e.stopPropagation(),l({type:3,value:e.key});case ik.R.Enter:if(e.preventDefault(),e.stopPropagation(),l({type:1}),null!==s.activeItemIndex){let{dataRef:e}=s.items[s.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}(0,io.wI)(s.buttonRef.current);break;case ik.R.ArrowDown:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Next});case ik.R.ArrowUp:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Previous});case ik.R.Home:case ik.R.PageUp:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.First});case ik.R.End:case ik.R.PageDown:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Last});case ik.R.Escape:e.preventDefault(),e.stopPropagation(),l({type:1}),(0,rP.k)().nextFrame(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})});break;case ik.R.Tab:e.preventDefault(),e.stopPropagation(),l({type:1}),(0,rP.k)().nextFrame(()=>{(0,io.EO)(s.buttonRef.current,e.shiftKey?io.TO.Previous:io.TO.Next)});break;default:1===e.key.length&&(l({type:3,value:e.key}),d.setTimeout(()=>l({type:4}),350))}}),m=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),x=(0,R.useMemo)(()=>({open:0===s.menuState}),[s]),g={"aria-activedescendant":null===s.activeItemIndex||null==(n=s.items[s.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=s.buttonRef.current)?void 0:r.id,id:a,onKeyDown:p,onKeyUp:m,role:"menu",tabIndex:0,ref:u};return(0,rQ.sY)({ourProps:g,theirProps:o,slot:x,defaultTag:"div",features:i5,visible:h,name:"Menu.Items"})}),Item:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-menu-item-".concat(n),disabled:i=!1,...a}=e,[o,s]=i1("Menu.Item"),l=null!==o.activeItemIndex&&o.items[o.activeItemIndex].id===r,u=(0,R.useRef)(null),c=(0,rU.T)(t,u);(0,rF.e)(()=>{if(o.__demoMode||0!==o.menuState||!l||0===o.activationTrigger)return;let e=(0,rP.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[o.__demoMode,u,l,o.menuState,o.activationTrigger,o.activeItemIndex]);let d=ih(u),f=(0,R.useRef)({disabled:i,domRef:u,get textValue(){return d()}});(0,rF.e)(()=>{f.current.disabled=i},[f,i]),(0,rF.e)(()=>(s({type:5,id:r,dataRef:f}),()=>s({type:6,id:r})),[f,r]);let h=(0,rZ.z)(()=>{s({type:1})}),p=(0,rZ.z)(e=>{if(i)return e.preventDefault();s({type:1}),(0,io.wI)(o.buttonRef.current)}),m=(0,rZ.z)(()=>{if(i)return s({type:2,focus:iv.Nothing});s({type:2,focus:iv.Specific,id:r})}),x=im(),g=(0,rZ.z)(e=>x.update(e)),v=(0,rZ.z)(e=>{x.wasMoved(e)&&(i||l||s({type:2,focus:iv.Specific,id:r,trigger:0}))}),y=(0,rZ.z)(e=>{x.wasMoved(e)&&(i||l&&s({type:2,focus:iv.Nothing}))}),b=(0,R.useMemo)(()=>({active:l,disabled:i,close:h}),[l,i,h]);return(0,rQ.sY)({ourProps:{id:r,ref:c,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,disabled:void 0,onClick:p,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:v,onMouseMove:v,onPointerLeave:y,onMouseLeave:y},theirProps:a,slot:b,defaultTag:i3,name:"Menu.Item"})})}),i7=e=>"object"==typeof e&&null!=e&&1===e.nodeType,i9=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,i8=(e,t)=>{if(e.clientHeight{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightat||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0,at=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},an=(e,t)=>{var n,r,i,a;if("undefined"==typeof document)return[];let{scrollMode:o,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!i7(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,h=[],p=e;for(;i7(p)&&d(p);){if((p=at(p))===f){h.push(p);break}null!=p&&p===document.body&&i8(p)&&!i8(document.documentElement)||null!=p&&i8(p,c)&&h.push(p)}let m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,x=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:g,scrollY:v}=window,{height:y,width:b,top:w,right:k,bottom:_,left:j}=e.getBoundingClientRect(),{top:E,right:O,bottom:T,left:C}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),S="start"===s||"nearest"===s?w-E:"end"===s?_+T:w+y/2-E+T,N="center"===l?j+b/2-C+O:"end"===l?k+O:j-C,R=[];for(let e=0;e=0&&j>=0&&_<=x&&k<=m&&w>=i&&_<=u&&j>=c&&k<=a)break;let d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),E=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10),C=0,I=0,A="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-O:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-E-T:0,P="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,M="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)C="start"===s?S:"end"===s?S-x:"nearest"===s?ae(v,v+x,x,E,T,v+S,v+S+y,y):S-x/2,I="start"===l?N:"center"===l?N-m/2:"end"===l?N-m:ae(g,g+m,m,p,O,g+N,g+N+b,b),C=Math.max(0,C+v),I=Math.max(0,I+g);else{C="start"===s?S-i-E:"end"===s?S-u+T+L:"nearest"===s?ae(i,u,n,E,T+L,S,S+y,y):S-(i+n/2)+L/2,I="start"===l?N-c-p:"center"===l?N-(c+r/2)+A/2:"end"===l?N-a+O+A:ae(c,a,r,p,O+A,N,N+b,b);let{scrollLeft:e,scrollTop:o}=t;C=0===M?0:Math.max(0,Math.min(o+C/M,t.scrollHeight-n/M+L)),I=0===P?0:Math.max(0,Math.min(e+I/P,t.scrollWidth-r/P+A)),S+=o-C,N+=e-I}R.push({el:t,top:C,left:I})}return R},ar=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};function ai(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(an(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:a,left:o}of an(e,ar(t))){let e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var aa=n(6826),ao=n.n(aa);/** +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[235],{5202:function(){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(e){return!!e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList}function o(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function l(){document.addEventListener("mousemove",u),document.addEventListener("mousedown",u),document.addEventListener("mouseup",u),document.addEventListener("pointermove",u),document.addEventListener("pointerdown",u),document.addEventListener("pointerup",u),document.addEventListener("touchmove",u),document.addEventListener("touchstart",u),document.addEventListener("touchend",u)}function u(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",u),document.removeEventListener("pointermove",u),document.removeEventListener("pointerdown",u),document.removeEventListener("pointerup",u),document.removeEventListener("touchmove",u),document.removeEventListener("touchstart",u),document.removeEventListener("touchend",u))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(a(e.activeElement)&&o(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),l())},!0),l(),e.addEventListener("focus",function(e){var n,r,s;a(e.target)&&(t||(r=(n=e.target).type,"INPUT"===(s=n.tagName)&&i[r]&&!n.readOnly||"TEXTAREA"===s&&!n.readOnly||n.isContentEditable))&&o(e.target)},!0),e.addEventListener("blur",function(e){if(a(e.target)){var t;(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout(function(){n=!1},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},9266:function(e,t,n){"use strict";var r=n(3905),i=n(9073);e.exports=function(e){var t=r(e);return t.token="","x-oauth-basic"===t.password?t.token=t.user:"x-token-auth"===t.user&&(t.token=t.password),i(t.protocols)||0===t.protocols.length&&i(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}},3458:function(e,t,n){"use strict";var r=n(9266);function i(e){if("string"!=typeof e)throw Error("The url must be a string.");/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(e)&&(e="https://github.com/"+e);var t=r(e),n=t.resource.split("."),a=null;switch(t.toString=function(e){return i.stringify(this,e)},t.source=n.length>2?n.slice(1-n.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent((t.pathname||t.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=n[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){4===(a=t.name.split("/")).length&&(t.organization=a[1],t.owner=a[2],t.name=a[3],t.full_name=a[2]+"/"+a[3]);break}2===(a=t.name.split("/")).length?(t.owner=a[1],t.name=a[1],t.full_name="_git/"+t.name):3===a.length?(t.name=a[2],"DefaultCollection"===a[0]?(t.owner=a[2],t.organization=a[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=a[0],t.full_name=t.owner+"/_git/"+t.name)):4===a.length&&(t.organization=a[0],t.owner=a[1],t.name=a[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){4===(a=t.name.split("/")).length&&(t.organization=a[1],t.owner=a[2],t.name=a[3]);break}5===(a=t.name.split("/")).length?(t.organization=a[0],t.owner=a[1],t.name=a[4],t.full_name="_git/"+t.name):3===a.length?(t.name=a[2],"DefaultCollection"===a[0]?(t.owner=a[2],t.organization=a[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=a[0],t.full_name=t.owner+"/_git/"+t.name)):4===a.length&&(t.organization=a[0],t.owner=a[1],t.name=a[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:var o=(a=t.name.split("/")).length-1;if(a.length>=2){var s=a.indexOf("-",2),l=a.indexOf("blob",2),u=a.indexOf("tree",2),c=a.indexOf("commit",2),d=a.indexOf("src",2),f=a.indexOf("raw",2),h=a.indexOf("edit",2);o=s>0?s-1:l>0?l-1:u>0?u-1:c>0?c-1:d>0?d-1:f>0?f-1:h>0?h-1:o,t.owner=a.slice(0,o).join("/"),t.name=a[o],c&&(t.commit=a[o+2])}t.ref="",t.filepathtype="",t.filepath="";var p=a.length>o&&"-"===a[o+1]?o+1:o;a.length>p+2&&["raw","src","blob","tree","edit"].indexOf(a[p+1])>=0&&(t.filepathtype=a[p+1],t.ref=a[p+2],a.length>p+3&&(t.filepath=a.slice(p+3).join("/"))),t.organization=t.owner}!t.full_name&&(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=t.owner+"/"+t.name);var m=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=m&&(t.source="bitbucket-server","users"===m[1]?t.owner="~"+m[2]:t.owner=m[2],t.organization=t.owner,t.name=m[3],(a=m[4].split("/")).length>1&&(["raw","browse"].indexOf(a[1])>=0?(t.filepathtype=a[1],a.length>2&&(t.filepath=a.slice(2).join("/"))):"commits"===a[1]&&a.length>2&&(t.commit=a[2])),t.full_name=t.owner+"/"+t.name,t.query.at?t.ref=t.query.at:t.ref=""),t}i.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);var n=e.port?":"+e.port:"",r=e.user||"git",i=e.git_suffix?".git":"";switch(t){case"ssh":if(n)return"ssh://"+r+"@"+e.resource+n+"/"+e.full_name+i;return r+"@"+e.resource+":"+e.full_name+i;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return t+"://"+r+"@"+e.resource+n+"/"+e.full_name+i;case"http":case"https":return t+"://"+(e.token?"bitbucket.org"===e.source?"x-token-auth:"+e.token+"@":e.token+"@":e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"")+e.resource+n+"/"+("bitbucket-server"===e.source?"scm/"+e.full_name:""+e.full_name)+i;default:return e.href}},e.exports=i},6337:function(){!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var e=function(e){for(var t=e,n=i(t);n;)n=i(t=n.ownerDocument);return t}(window.document),t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?f(e,n):c(),t.forEach(function(e){e._checkForIntersections()})}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!(e&&1==e.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,a=null,o=null;if(this.POLL_INTERVAL?a=n.setInterval(r,this.POLL_INTERVAL):(s(n,"resize",r,!0),s(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),l(e,"resize",r,!0)),l(t,"scroll",r,!0),o&&o.disconnect()}),t!=(this.root&&(this.root.ownerDocument||this.root)||e)){var u=i(t);u&&this._monitorIntersections(u.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some(function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1})){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=r){var o=i(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t=0&&s>=0&&{top:n,bottom:r,left:i,right:a,width:o,height:s}||null}(c,o)),!o)break;s=s&&p(s)}return o}},o.prototype._getRootRect=function(){var t;if(this.root&&!m(this.root))t=u(this.root);else{var n=m(this.root)?this.root:e,r=n.documentElement,i=n.body;t={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;it.indexOf(this)&&t.push(this)},o.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=a}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function a(e){this.time=e.time,this.target=e.target,this.rootBounds=d(e.rootBounds),this.boundingClientRect=d(e.boundingClientRect),this.intersectionRect=d(e.intersectionRect||c()),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;n?this.intersectionRatio=Number((i/n).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function o(e,t){var n,r,i,a=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(a.root&&1!=a.root.nodeType&&9!=a.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout(function(){n(),i=null},r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(a.rootMargin),this.thresholds=this._initThresholds(a.threshold),this.root=a.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function s(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function l(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):c()}function c(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function f(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function h(e,t){for(var n=t;n;){if(n==e)return!0;n=p(n)}return!1}function p(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host)?n.host:n}function m(e){return e&&9===e.nodeType}}()},9073:function(e,t,n){"use strict";var r=n(2337);e.exports=function e(t){if(Array.isArray(t))return -1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var n=r(t);if(t=t.substring(t.indexOf("://")+3),e(n))return!0;var i=RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(i)&&t.indexOf("@")-1},R.prototype.set=function(e,t){var n=this.__data__,r=A(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},I.prototype.clear=function(){this.__data__={hash:new N,map:new(O||R),string:new N}},I.prototype.delete=function(e){return L(this,e).delete(e)},I.prototype.get=function(e){return L(this,e).get(e)},I.prototype.has=function(e){return L(this,e).has(e)},I.prototype.set=function(e,t){return L(this,e).set(e,t),this};var M=Z(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(z(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var t,n=[];return l.test(e)&&n.push(""),e.replace(u,function(e,t,r,i){n.push(r?i.replace(c,"$1"):t||e)}),n});function Z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(Z.Cache||I),n}Z.Cache=I;var D=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function z(e){return"symbol"==typeof e||!!e&&"object"==typeof e&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){var n;t=!function(e,t){if(D(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||z(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?D(n=t)?n:M(n):[t];for(var r=0,i=t.length;null!=e&&r{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function x(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}let g=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:s,width:l,decoding:u,className:c,style:d,fetchPriority:f,placeholder:h,loading:p,unoptimized:g,fill:v,onLoadRef:y,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:k,sizesInput:_,onLoad:j,onError:E,...O}=e;return(0,a.jsx)("img",{...O,...x(f),loading:p,width:l,height:s,decoding:u,"data-nimg":v?"fill":"1",className:c,style:d,sizes:i,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&m(e,h,y,b,w,g,_))},[n,h,y,b,w,E,g,_,t]),onLoad:e=>{m(e.currentTarget,h,y,b,w,g,_)},onError:e=>{k(!0),"empty"!==h&&w(!0),E&&E(e)}})});function v(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...x(n.fetchPriority)};return t&&s.default.preload?(s.default.preload(n.src,r),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let y=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(f.RouterContext),r=(0,o.useContext)(d.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=p||r||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:s,onLoadingComplete:l}=e,m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let x=(0,o.useRef)(l);(0,o.useEffect)(()=>{x.current=l},[l]);let[y,b]=(0,o.useState)(!1),[w,k]=(0,o.useState)(!1),{props:_,meta:j}=(0,u.getImgProps)(e,{defaultLoader:h.default,imgConf:i,blurComplete:y,showAltText:w});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g,{..._,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:m,onLoadingCompleteRef:x,setBlurComplete:b,setShowAltText:k,sizesInput:e.sizes,ref:t}),j.priority?(0,a.jsx)(v,{isAppRouter:!n,imgAttributes:_}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(8754),i=n(5893),a=r._(n(7294)),o=n(1401),s=n(2045),l=n(7420),u=n(7201),c=n(1443),d=n(9953),f=n(5320),h=n(2905),p=n(4318),m=n(953),x=n(6691),g=new Set;function v(e,t,n,r,i,a){if(a||(0,s.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let i=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(g.has(i))return;g.add(i)}(async()=>a?e.prefetch(t,i):e.prefetch(t,n,r))().catch(e=>{})}}function y(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=a.default.forwardRef(function(e,t){let n,r;let{href:l,as:g,children:b,prefetch:w=null,passHref:k,replace:_,shallow:j,scroll:E,locale:O,onClick:T,onMouseEnter:C,onTouchStart:S,legacyBehavior:N=!1,...R}=e;n=b,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let I=a.default.useContext(d.RouterContext),A=a.default.useContext(f.AppRouterContext),L=null!=I?I:A,P=!I,M=!1!==w,Z=null===w?x.PrefetchKind.AUTO:x.PrefetchKind.FULL,{href:D,as:F}=a.default.useMemo(()=>{if(!I){let e=y(l);return{href:e,as:g?y(g):e}}let[e,t]=(0,o.resolveHref)(I,l,!0);return{href:e,as:g?(0,o.resolveHref)(I,g):t||e}},[I,l,g]),z=a.default.useRef(D),$=a.default.useRef(F);N&&(r=a.default.Children.only(n));let U=N?r&&"object"==typeof r&&r.ref:t,[W,H,G]=(0,h.useIntersection)({rootMargin:"200px"}),V=a.default.useCallback(e=>{($.current!==F||z.current!==D)&&(G(),$.current=F,z.current=D),W(e),U&&("function"==typeof U?U(e):"object"==typeof U&&(U.current=e))},[F,U,D,G,W]);a.default.useEffect(()=>{L&&H&&M&&v(L,D,F,{locale:O},{kind:Z},P)},[F,D,H,O,M,null==I?void 0:I.locale,L,P,Z]);let B={ref:V,onClick(e){N||"function"!=typeof T||T(e),N&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),L&&!e.defaultPrevented&&function(e,t,n,r,i,o,l,u,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,s.isLocalURL)(n)))return;e.preventDefault();let f=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:o,locale:u,scroll:e}):t[i?"replace":"push"](r||n,{scroll:e})};c?a.default.startTransition(f):f()}(e,L,D,F,_,j,E,O,P)},onMouseEnter(e){N||"function"!=typeof C||C(e),N&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),L&&(M||!P)&&v(L,D,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},P)},onTouchStart:function(e){N||"function"!=typeof S||S(e),N&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),L&&(M||!P)&&v(L,D,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},P)}};if((0,u.isAbsoluteUrl)(F))B.href=F;else if(!N||k||"a"===r.type&&!("href"in r.props)){let e=void 0!==O?O:null==I?void 0:I.locale,t=(null==I?void 0:I.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==I?void 0:I.locales,null==I?void 0:I.domainLocales);B.href=t||(0,m.addBasePath)((0,c.addLocale)(F,e,null==I?void 0:I.defaultLocale))}return N?a.default.cloneElement(r,B):(0,i.jsx)("a",{...R,...B,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(7294),i=n(3815),a="function"==typeof IntersectionObserver,o=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!a,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(u||c)return;let e=f.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:i,elements:a}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=o.get(r)))return t;let i=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},s.push(n),o.set(n,t),t}(n);return a.set(e,t),i.observe(e),function(){if(a.delete(e),i.unobserve(e),0===a.size){i.disconnect(),o.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,f.current]),[h,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(1997);let r=n(9919),i=n(7903);function a(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:h=!1,loading:p,className:m,quality:x,width:g,height:v,fill:y=!1,style:b,overrideSrc:w,onLoad:k,onLoadingComplete:_,placeholder:j="empty",blurDataURL:E,fetchPriority:O,layout:T,objectFit:C,objectPosition:S,lazyBoundary:N,lazyRoot:R,...I}=e,{imgConf:A,showAltText:L,blurComplete:P,defaultLoader:M}=t,Z=A||i.imageConfigDefault;if("allSizes"in Z)s=Z;else{let e=[...Z.deviceSizes,...Z.imageSizes].sort((e,t)=>e-t),t=Z.deviceSizes.sort((e,t)=>e-t);s={...Z,allSizes:e,deviceSizes:t}}if(void 0===M)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let D=I.loader||M;delete I.loader,delete I.srcSet;let F="__next_img_default"in D;if(F){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=D;D=t=>{let{config:n,...r}=t;return e(r)}}if(T){"fill"===T&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[T];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[T];t&&!d&&(d=t)}let z="",$=o(g),U=o(v);if("object"==typeof(n=c)&&(a(n)||void 0!==n.src)){let e=a(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,E=E||e.blurDataURL,z=e.src,!y){if($||U){if($&&!U){let t=$/e.width;U=Math.round(e.height*t)}else if(!$&&U){let t=U/e.height;$=Math.round(e.width*t)}}else $=e.width,U=e.height}}let W=!h&&("lazy"===p||void 0===p);(!(c="string"==typeof c?c:z)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,W=!1),s.unoptimized&&(f=!0),F&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),h&&(O="high");let H=o(x),G=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:S}:{},L?{}:{color:"transparent"},b),V=P||"empty"===j?null:"blur"===j?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:$,heightInt:U,blurWidth:l,blurHeight:u,blurDataURL:E||"",objectFit:G.objectFit})+'")':'url("'+j+'")',B=V?{backgroundSize:G.objectFit||"cover",backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},q=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:a,sizes:o,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,o),c=l.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:a,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:a,width:l[c]})}}({config:s,src:c,unoptimized:f,width:$,quality:H,sizes:d,loader:D});return{props:{...I,loading:W?"lazy":p,fetchPriority:O,width:$,height:U,decoding:"async",className:m,style:{...G,...B},sizes:q.sizes,srcSet:q.srcSet,src:w||q.src},meta:{unoptimized:f,priority:h,placeholder:j,fill:y}}}},9919:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:a,objectFit:o}=e,s=r?40*r:t,l=i?40*i:n,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+a+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},5666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return l},getImageProps:function(){return s}});let r=n(8754),i=n(7367),a=n(6541),o=r._(n(6663));function s(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/nsdocs/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let l=a.Image},6663:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},9488:function(){},1864:function(e){!function(){"use strict";var t={114:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--)o>=0?r=arguments[o]:(void 0===e&&(e=""),r=e),t(r),0!==r.length&&(i=r+"/"+i,a=47===r.charCodeAt(0));return(i=n(i,!a),a)?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return(0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;iu){if(47===n.charCodeAt(s+d))return n.slice(s+d+1);if(0===d)return n.slice(s+d)}else o>u&&(47===e.charCodeAt(i+d)?c=d:0===d&&(c=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;47===f&&(c=d)}var h="";for(d=i+c+1;d<=a;++d)(d===a||47===e.charCodeAt(d))&&(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(s+c):(s+=c,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return -1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw TypeError('"ext" argument must be a string');t(e);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else -1===l&&(o=!1,l=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=l))}return i===a?a=l:-1===a&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else -1===a&&(o=!1,a=r+1);return -1===a?"":e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47===l){if(!a){r=s+1;break}continue}-1===i&&(a=!1,i=s+1),46===l?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1)}return -1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){var t,n;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+n:t+"/"+n:n},parse:function(e){t(e);var n,r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var i=e.charCodeAt(0),a=47===i;a?(r.root="/",n=1):n=0;for(var o=-1,s=0,l=-1,u=!0,c=e.length-1,d=0;c>=n;--c){if(47===(i=e.charCodeAt(c))){if(!u){s=c+1;break}continue}-1===l&&(u=!1,l=c+1),46===i?-1===o?o=c:1!==d&&(d=1):-1!==o&&(d=-1)}return -1===o||-1===l||0===d||1===d&&o===l-1&&o===s+1?-1!==l&&(0===s&&a?r.base=r.name=e.slice(1,l):r.base=r.name=e.slice(s,l)):(0===s&&a?(r.name=e.slice(1,o),r.base=e.slice(1,l)):(r.name=e.slice(s,o),r.base=e.slice(s,l)),r.ext=e.slice(o,l)),s>0?r.dir=e.slice(0,s-1):a&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var a=n[e]={exports:{}},o=!0;try{t[e](a,a.exports,r),o=!1}finally{o&&delete n[e]}return a.exports}r.ab="//";var i=r(114);e.exports=i}()},7663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c1)for(var n=1;n{t(!0)},[]),e}var L=n(7222),P=()=>{let{locale:e=L.ZW,asPath:t,route:n}=(0,N.useRouter)();return(0,R.useMemo)(()=>{let{pathname:r}=new URL(L.hV.has(n)?n:t,"https://nextra.vercel.app");return(e?r.replace(RegExp(`\\.${e}(\\/|$)`),"$1"):r).replace(/\.html$/,"").replace(/\/index(\/|$)/,"$1").replace(/\/$/,"")||"/"},[t,e,n])},M=n(2643),Z=n(4861);(p=k||(k={})).assertEqual=e=>e,p.assertIs=function(e){},p.assertNever=function(e){throw Error()},p.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},p.getValidEnumValues=e=>{let t=p.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return p.objectValues(n)},p.objectValues=e=>p.objectKeys(e).map(function(t){return e[t]}),p.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},p.find=(e,t)=>{for(let n of e)if(t(n))return n},p.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,p.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},p.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(_||(_={})).mergeShapes=(e,t)=>({...e,...t});let D=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),F=e=>{switch(typeof e){case"undefined":return D.undefined;case"string":return D.string;case"number":return isNaN(e)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":if(Array.isArray(e))return D.array;if(null===e)return D.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return D.promise;if("undefined"!=typeof Map&&e instanceof Map)return D.map;if("undefined"!=typeof Set&&e instanceof Set)return D.set;if("undefined"!=typeof Date&&e instanceof Date)return D.date;return D.object;default:return D.unknown}},z=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class $ extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}$.create=e=>new $(e);let U=(e,t)=>{let n;switch(e.code){case z.invalid_type:n=e.received===D.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,k.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${k.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${k.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${k.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:k.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case z.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case z.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,k.assertNever(e)}return{message:n}},W=U;function H(){return W}let G=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let s="";for(let e of r.filter(e=>!!e).slice().reverse())s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function V(e,t){let n=H(),r=G({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===U?void 0:U].filter(e=>!!e)});e.common.issues.push(r)}class B{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return q;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return B.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return q;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let q=Object.freeze({status:"aborted"}),K=e=>({status:"dirty",value:e}),Y=e=>({status:"valid",value:e}),Q=e=>"aborted"===e.status,J=e=>"dirty"===e.status,X=e=>"valid"===e.status,ee=e=>"undefined"!=typeof Promise&&e instanceof Promise;function et(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function en(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError,(m=j||(j={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},m.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class er{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let ei=(e,t)=>{if(X(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new $(e.common.issues);return this._error=t,this._error}}};function ea(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var a,o;let{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:i.defaultError}:void 0===i.data?{message:null!==(a=null!=s?s:r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(o=null!=s?s:n)&&void 0!==o?o:i.defaultError}},description:i}}class eo{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return F(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new B,ctx:{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ee(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},i=this._parseSync({data:e,path:r.path,parent:r});return ei(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},r=this._parse({data:e,path:n.path,parent:n});return ei(n,await (ee(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:z.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new eY({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eQ.create(this,this._def)}nullable(){return eJ.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eA.create(this,this._def)}promise(){return eK.create(this,this._def)}or(e){return eP.create([this,e],this._def)}and(e){return eD.create(this,e,this._def)}transform(e){return new eY({...ea(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eX({...ea(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:T.ZodDefault})}brand(){return new e4({typeName:T.ZodBranded,type:this,...ea(this._def)})}catch(e){return new e0({...ea(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:T.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return e5.create(this,e)}readonly(){return e3.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let es=/^c[^\s-]{8,}$/i,el=/^[0-9a-z]+$/,eu=/^[0-9A-HJKMNP-TV-Z]{26}$/,ec=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ed=/^[a-z0-9_-]{21}$/i,ef=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ep=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,em=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ev=RegExp(`^${eg}$`);function ey(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function eb(e){let t=`${eg}T${ey(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)}class ew extends eo{_parse(e){var t,n;let i;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==D.string){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.string,received:t.parsedType}),q}let a=new B;for(let o of this._def.checks)if("min"===o.kind)e.data.lengtho.value&&(V(i=this._getOrReturnCtx(e,i),{code:z.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("length"===o.kind){let t=e.data.length>o.value,n=e.data.lengthe.test(t),{validation:t,code:z.invalid_string,...j.errToObj(n)})}_addCheck(e){return new ew({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...j.errToObj(e)})}url(e){return this._addCheck({kind:"url",...j.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...j.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...j.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...j.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...j.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...j.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...j.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...j.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...j.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...j.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...j.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...j.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...j.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...j.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...j.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...j.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...j.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...j.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...j.errToObj(t)})}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new ew({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ew({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ew({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new ew({checks:[],typeName:T.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...ea(e)})};class ek extends eo{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==D.number){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.number,received:t.parsedType}),q}let n=new B;for(let r of this._def.checks)"int"===r.kind?k.isInteger(e.data)||(V(t=this._getOrReturnCtx(e,t),{code:z.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.datar.value:e.data>=r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(V(t=this._getOrReturnCtx(e,t),{code:z.not_finite,message:r.message}),n.dirty()):k.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,n,r){return new ek({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:j.toString(r)}]})}_addCheck(e){return new ek({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&k.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.valuenew ek({checks:[],typeName:T.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...ea(e)});class e_ extends eo{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==D.bigint){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.bigint,received:t.parsedType}),q}let n=new B;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.datar.value:e.data>=r.value)&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(V(t=this._getOrReturnCtx(e,t),{code:z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):k.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,n,r){return new e_({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:j.toString(r)}]})}_addCheck(e){return new e_({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new e_({checks:[],typeName:T.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...ea(e)})};class ej extends eo{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==D.boolean){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.boolean,received:t.parsedType}),q}return Y(e.data)}}ej.create=e=>new ej({typeName:T.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...ea(e)});class eE extends eo{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==D.date){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.date,received:t.parsedType}),q}if(isNaN(e.data.getTime()))return V(this._getOrReturnCtx(e),{code:z.invalid_date}),q;let n=new B;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()r.value&&(V(t=this._getOrReturnCtx(e,t),{code:z.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):k.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eE({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:j.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew eE({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:T.ZodDate,...ea(e)});class eO extends eo{_parse(e){if(this._getType(e)!==D.symbol){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.symbol,received:t.parsedType}),q}return Y(e.data)}}eO.create=e=>new eO({typeName:T.ZodSymbol,...ea(e)});class eT extends eo{_parse(e){if(this._getType(e)!==D.undefined){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.undefined,received:t.parsedType}),q}return Y(e.data)}}eT.create=e=>new eT({typeName:T.ZodUndefined,...ea(e)});class eC extends eo{_parse(e){if(this._getType(e)!==D.null){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.null,received:t.parsedType}),q}return Y(e.data)}}eC.create=e=>new eC({typeName:T.ZodNull,...ea(e)});class eS extends eo{constructor(){super(...arguments),this._any=!0}_parse(e){return Y(e.data)}}eS.create=e=>new eS({typeName:T.ZodAny,...ea(e)});class eN extends eo{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Y(e.data)}}eN.create=e=>new eN({typeName:T.ZodUnknown,...ea(e)});class eR extends eo{_parse(e){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.never,received:t.parsedType}),q}}eR.create=e=>new eR({typeName:T.ZodNever,...ea(e)});class eI extends eo{_parse(e){if(this._getType(e)!==D.undefined){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.void,received:t.parsedType}),q}return Y(e.data)}}eI.create=e=>new eI({typeName:T.ZodVoid,...ea(e)});class eA extends eo{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==D.array)return V(t,{code:z.invalid_type,expected:D.array,received:t.parsedType}),q;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(V(t,{code:z.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new er(t,e,t.path,n)))).then(e=>B.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new er(t,e,t.path,n)));return B.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new eA({...this._def,minLength:{value:e,message:j.toString(t)}})}max(e,t){return new eA({...this._def,maxLength:{value:e,message:j.toString(t)}})}length(e,t){return new eA({...this._def,exactLength:{value:e,message:j.toString(t)}})}nonempty(e){return this.min(1,e)}}eA.create=(e,t)=>new eA({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...ea(t)});class eL extends eo{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=k.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==D.object){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.object,received:t.parsedType}),q}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof eR&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new er(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof eR){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(V(n,{code:z.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new er(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>B.mergeObjectSync(t,e)):B.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new eL({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,o;let s=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=j.errToObj(e).message)&&void 0!==o?o:s}:{message:s}}}:{}})}strip(){return new eL({...this._def,unknownKeys:"strip"})}passthrough(){return new eL({...this._def,unknownKeys:"passthrough"})}extend(e){return new eL({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eL({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eL({...this._def,catchall:e})}pick(e){let t={};return k.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new eL({...this._def,shape:()=>t})}omit(e){let t={};return k.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new eL({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eL){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=eQ.create(e(i))}return new eL({...t._def,shape:()=>n})}return t instanceof eA?new eA({...t._def,type:e(t.element)}):t instanceof eQ?eQ.create(e(t.unwrap())):t instanceof eJ?eJ.create(e(t.unwrap())):t instanceof eF?eF.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return k.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new eL({...this._def,shape:()=>t})}required(e){let t={};return k.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof eQ;)e=e._def.innerType;t[n]=e}}),new eL({...this._def,shape:()=>t})}keyof(){return eV(k.objectKeys(this.shape))}}eL.create=(e,t)=>new eL({shape:()=>e,unknownKeys:"strip",catchall:eR.create(),typeName:T.ZodObject,...ea(t)}),eL.strictCreate=(e,t)=>new eL({shape:()=>e,unknownKeys:"strict",catchall:eR.create(),typeName:T.ZodObject,...ea(t)}),eL.lazycreate=(e,t)=>new eL({shape:e,unknownKeys:"strip",catchall:eR.create(),typeName:T.ZodObject,...ea(t)});class eP extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new $(e.ctx.common.issues));return V(t,{code:z.invalid_union,unionErrors:n}),q});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new $(e));return V(t,{code:z.invalid_union,unionErrors:i}),q}}get options(){return this._def.options}}eP.create=(e,t)=>new eP({options:e,typeName:T.ZodUnion,...ea(t)});let eM=e=>{if(e instanceof eH)return eM(e.schema);if(e instanceof eY)return eM(e.innerType());if(e instanceof eG)return[e.value];if(e instanceof eB)return e.options;if(e instanceof eq)return k.objectValues(e.enum);if(e instanceof eX)return eM(e._def.innerType);if(e instanceof eT)return[void 0];else if(e instanceof eC)return[null];else if(e instanceof eQ)return[void 0,...eM(e.unwrap())];else if(e instanceof eJ)return[null,...eM(e.unwrap())];else if(e instanceof e4)return eM(e.unwrap());else if(e instanceof e3)return eM(e.unwrap());else if(e instanceof e0)return eM(e._def.innerType);else return[]};class eZ extends eo{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==D.object)return V(t,{code:z.invalid_type,expected:D.object,received:t.parsedType}),q;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(V(t,{code:z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=eM(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new eZ({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...ea(n)})}}class eD extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Q(e)||Q(r))return q;let i=function e(t,n){let r=F(t),i=F(n);if(t===n)return{valid:!0,data:t};if(r===D.object&&i===D.object){let r=k.objectKeys(n),i=k.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===D.array&&i===D.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;ir(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}eD.create=(e,t,n)=>new eD({left:e,right:t,typeName:T.ZodIntersection,...ea(n)});class eF extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.array)return V(n,{code:z.invalid_type,expected:D.array,received:n.parsedType}),q;if(n.data.lengththis._def.items.length&&(V(n,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new er(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>B.mergeArray(t,e)):B.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new eF({...this._def,rest:e})}}eF.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eF({items:e,typeName:T.ZodTuple,rest:null,...ea(t)})};class ez extends eo{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.object)return V(n,{code:z.invalid_type,expected:D.object,received:n.parsedType}),q;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new er(n,e,n.path,e)),value:a._parse(new er(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?B.mergeObjectAsync(t,r):B.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new ez(t instanceof eo?{keyType:e,valueType:t,typeName:T.ZodRecord,...ea(n)}:{keyType:ew.create(),valueType:e,typeName:T.ZodRecord,...ea(t)})}}class e$ extends eo{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.map)return V(n,{code:z.invalid_type,expected:D.map,received:n.parsedType}),q;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new er(n,e,n.path,[a,"key"])),value:i._parse(new er(n,t,n.path,[a,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return q;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}e$.create=(e,t,n)=>new e$({valueType:t,keyType:e,typeName:T.ZodMap,...ea(n)});class eU extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.set)return V(n,{code:z.invalid_type,expected:D.set,received:n.parsedType}),q;let r=this._def;null!==r.minSize&&n.data.sizer.maxSize.value&&(V(n,{code:z.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return q;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new er(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(e,t){return new eU({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new eU({...this._def,maxSize:{value:e,message:j.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eU.create=(e,t)=>new eU({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...ea(t)});class eW extends eo{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==D.function)return V(t,{code:z.invalid_type,expected:D.function,received:t.parsedType}),q;function n(e,n){return G({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,H(),U].filter(e=>!!e),issueData:{code:z.invalid_arguments,argumentsError:n}})}function r(e,n){return G({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,H(),U].filter(e=>!!e),issueData:{code:z.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eK){let e=this;return Y(async function(...t){let o=new $([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),l=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw o.addIssue(r(l,e)),o})})}{let e=this;return Y(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new $([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),l=e._def.returns.safeParse(s,i);if(!l.success)throw new $([r(s,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eW({...this._def,args:eF.create(e).rest(eN.create())})}returns(e){return new eW({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new eW({args:e||eF.create([]).rest(eN.create()),returns:t||eN.create(),typeName:T.ZodFunction,...ea(n)})}}class eH extends eo{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eH.create=(e,t)=>new eH({getter:e,typeName:T.ZodLazy,...ea(t)});class eG extends eo{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return V(t,{received:t.data,code:z.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eV(e,t){return new eB({values:e,typeName:T.ZodEnum,...ea(t)})}eG.create=(e,t)=>new eG({value:e,typeName:T.ZodLiteral,...ea(t)});class eB extends eo{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return V(t,{expected:k.joinValues(n),received:t.parsedType,code:z.invalid_type}),q}if(et(this,E,"f")||en(this,E,new Set(this._def.values),"f"),!et(this,E,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return V(t,{received:t.data,code:z.invalid_enum_value,options:n}),q}return Y(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eB.create(e,{...this._def,...t})}exclude(e,t=this._def){return eB.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}E=new WeakMap,eB.create=eV;class eq extends eo{constructor(){super(...arguments),O.set(this,void 0)}_parse(e){let t=k.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==D.string&&n.parsedType!==D.number){let e=k.objectValues(t);return V(n,{expected:k.joinValues(e),received:n.parsedType,code:z.invalid_type}),q}if(et(this,O,"f")||en(this,O,new Set(k.getValidEnumValues(this._def.values)),"f"),!et(this,O,"f").has(e.data)){let e=k.objectValues(t);return V(n,{received:n.data,code:z.invalid_enum_value,options:e}),q}return Y(e.data)}get enum(){return this._def.values}}O=new WeakMap,eq.create=(e,t)=>new eq({values:e,typeName:T.ZodNativeEnum,...ea(t)});class eK extends eo{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==D.promise&&!1===t.common.async?(V(t,{code:z.invalid_type,expected:D.promise,received:t.parsedType}),q):Y((t.parsedType===D.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eK.create=(e,t)=>new eK({type:e,typeName:T.ZodPromise,...ea(t)});class eY extends eo{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{V(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return q;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?K(r.value):r});{if("aborted"===t.value)return q;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?q:"dirty"===r.status||"dirty"===t.value?K(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?q:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?q:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>X(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!X(e))return e;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}k.assertNever(r)}}eY.create=(e,t,n)=>new eY({schema:e,typeName:T.ZodEffects,effect:t,...ea(n)}),eY.createWithPreprocess=(e,t,n)=>new eY({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...ea(n)});class eQ extends eo{_parse(e){return this._getType(e)===D.undefined?Y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eQ.create=(e,t)=>new eQ({innerType:e,typeName:T.ZodOptional,...ea(t)});class eJ extends eo{_parse(e){return this._getType(e)===D.null?Y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eJ.create=(e,t)=>new eJ({innerType:e,typeName:T.ZodNullable,...ea(t)});class eX extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===D.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eX.create=(e,t)=>new eX({innerType:e,typeName:T.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...ea(t)});class e0 extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ee(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}e0.create=(e,t)=>new e0({innerType:e,typeName:T.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...ea(t)});class e1 extends eo{_parse(e){if(this._getType(e)!==D.nan){let t=this._getOrReturnCtx(e);return V(t,{code:z.invalid_type,expected:D.nan,received:t.parsedType}),q}return{status:"valid",value:e.data}}}e1.create=e=>new e1({typeName:T.ZodNaN,...ea(e)});let e2=Symbol("zod_brand");class e4 extends eo{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class e5 extends eo{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),K(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?q:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new e5({in:e,out:t,typeName:T.ZodPipeline})}}class e3 extends eo{_parse(e){let t=this._def.innerType._parse(e),n=e=>(X(e)&&(e.value=Object.freeze(e.value)),e);return ee(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function e6(e,t={},n){return e?eS.create().superRefine((r,i)=>{var a,o;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(o=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===o||o;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:s})}}):eS.create()}e3.create=(e,t)=>new e3({innerType:e,typeName:T.ZodReadonly,...ea(t)});let e7={object:eL.lazycreate};(x=T||(T={})).ZodString="ZodString",x.ZodNumber="ZodNumber",x.ZodNaN="ZodNaN",x.ZodBigInt="ZodBigInt",x.ZodBoolean="ZodBoolean",x.ZodDate="ZodDate",x.ZodSymbol="ZodSymbol",x.ZodUndefined="ZodUndefined",x.ZodNull="ZodNull",x.ZodAny="ZodAny",x.ZodUnknown="ZodUnknown",x.ZodNever="ZodNever",x.ZodVoid="ZodVoid",x.ZodArray="ZodArray",x.ZodObject="ZodObject",x.ZodUnion="ZodUnion",x.ZodDiscriminatedUnion="ZodDiscriminatedUnion",x.ZodIntersection="ZodIntersection",x.ZodTuple="ZodTuple",x.ZodRecord="ZodRecord",x.ZodMap="ZodMap",x.ZodSet="ZodSet",x.ZodFunction="ZodFunction",x.ZodLazy="ZodLazy",x.ZodLiteral="ZodLiteral",x.ZodEnum="ZodEnum",x.ZodEffects="ZodEffects",x.ZodNativeEnum="ZodNativeEnum",x.ZodOptional="ZodOptional",x.ZodNullable="ZodNullable",x.ZodDefault="ZodDefault",x.ZodCatch="ZodCatch",x.ZodPromise="ZodPromise",x.ZodBranded="ZodBranded",x.ZodPipeline="ZodPipeline",x.ZodReadonly="ZodReadonly";let e9=ew.create,e8=ek.create,te=e1.create,tt=e_.create,tn=ej.create,tr=eE.create,ti=eO.create,ta=eT.create,to=eC.create,ts=eS.create,tl=eN.create,tu=eR.create,tc=eI.create,td=eA.create,tf=eL.create,th=eL.strictCreate,tp=eP.create,tm=eZ.create,tx=eD.create,tg=eF.create,tv=ez.create,ty=e$.create,tb=eU.create,tw=eW.create,tk=eH.create,t_=eG.create,tj=eB.create,tE=eq.create,tO=eK.create,tT=eY.create,tC=eQ.create,tS=eJ.create,tN=eY.createWithPreprocess,tR=e5.create;var tI=Object.freeze({__proto__:null,defaultErrorMap:U,setErrorMap:function(e){W=e},getErrorMap:H,makeIssue:G,EMPTY_PATH:[],addIssueToContext:V,ParseStatus:B,INVALID:q,DIRTY:K,OK:Y,isAborted:Q,isDirty:J,isValid:X,isAsync:ee,get util(){return k},get objectUtil(){return _},ZodParsedType:D,getParsedType:F,ZodType:eo,datetimeRegex:eb,ZodString:ew,ZodNumber:ek,ZodBigInt:e_,ZodBoolean:ej,ZodDate:eE,ZodSymbol:eO,ZodUndefined:eT,ZodNull:eC,ZodAny:eS,ZodUnknown:eN,ZodNever:eR,ZodVoid:eI,ZodArray:eA,ZodObject:eL,ZodUnion:eP,ZodDiscriminatedUnion:eZ,ZodIntersection:eD,ZodTuple:eF,ZodRecord:ez,ZodMap:e$,ZodSet:eU,ZodFunction:eW,ZodLazy:eH,ZodLiteral:eG,ZodEnum:eB,ZodNativeEnum:eq,ZodPromise:eK,ZodEffects:eY,ZodTransformer:eY,ZodOptional:eQ,ZodNullable:eJ,ZodDefault:eX,ZodCatch:e0,ZodNaN:e1,BRAND:e2,ZodBranded:e4,ZodPipeline:e5,ZodReadonly:e3,custom:e6,Schema:eo,ZodSchema:eo,late:e7,get ZodFirstPartyTypeKind(){return T},coerce:{string:e=>ew.create({...e,coerce:!0}),number:e=>ek.create({...e,coerce:!0}),boolean:e=>ej.create({...e,coerce:!0}),bigint:e=>e_.create({...e,coerce:!0}),date:e=>eE.create({...e,coerce:!0})},any:ts,array:td,bigint:tt,boolean:tn,date:tr,discriminatedUnion:tm,effect:tT,enum:tj,function:tw,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>e6(t=>t instanceof e,t),intersection:tx,lazy:tk,literal:t_,map:ty,nan:te,nativeEnum:tE,never:tu,null:to,nullable:tS,number:e8,object:tf,oboolean:()=>tn().optional(),onumber:()=>e8().optional(),optional:tC,ostring:()=>e9().optional(),pipeline:tR,preprocess:tN,promise:tO,record:tv,set:tb,strictObject:th,string:e9,symbol:ti,transformer:tT,tuple:tg,undefined:ta,union:tp,unknown:tl,void:tc,NEVER:q,ZodIssueCode:z,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:$}),tA=n(1664),tL=n.n(tA);n(6337);var tP=n(5893);let tM=["light","dark"],tZ="(prefers-color-scheme: dark)",tD="undefined"==typeof window,tF=(0,R.createContext)(void 0),tz={setTheme:e=>{},themes:[]},t$=()=>{var e;return null!==(e=(0,R.useContext)(tF))&&void 0!==e?e:tz},tU=e=>(0,R.useContext)(tF)?R.createElement(R.Fragment,null,e.children):R.createElement(tH,e),tW=["light","dark"],tH=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:a=tW,defaultTheme:o=n?"system":"light",attribute:s="data-theme",value:l,children:u,nonce:c})=>{let[d,f]=(0,R.useState)(()=>tV(i,o)),[h,p]=(0,R.useState)(()=>tV(i)),m=l?Object.values(l):a,x=(0,R.useCallback)(e=>{let i=e;if(!i)return;"system"===e&&n&&(i=tq());let a=l?l[i]:i,u=t?tB():null,c=document.documentElement;if("class"===s?(c.classList.remove(...m),a&&c.classList.add(a)):a?c.setAttribute(s,a):c.removeAttribute(s),r){let e=tM.includes(o)?o:null,t=tM.includes(i)?i:e;c.style.colorScheme=t}null==u||u()},[]),g=(0,R.useCallback)(e=>{f(e);try{localStorage.setItem(i,e)}catch(e){}},[e]),v=(0,R.useCallback)(t=>{p(tq(t)),"system"===d&&n&&!e&&x("system")},[d,e]);(0,R.useEffect)(()=>{let e=window.matchMedia(tZ);return e.addListener(v),v(e),()=>e.removeListener(v)},[v]),(0,R.useEffect)(()=>{let e=e=>{e.key===i&&g(e.newValue||o)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[g]),(0,R.useEffect)(()=>{x(null!=e?e:d)},[e,d]);let y=(0,R.useMemo)(()=>({theme:d,setTheme:g,forcedTheme:e,resolvedTheme:"system"===d?h:d,themes:n?[...a,"system"]:a,systemTheme:n?h:void 0}),[d,g,e,h,n,a]);return R.createElement(tF.Provider,{value:y},R.createElement(tG,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:i,themes:a,defaultTheme:o,attribute:s,value:l,children:u,attrs:m,nonce:c}),u)},tG=(0,R.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:l})=>{let u="system"===a,c="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${s.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?tM.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(e,t=!1,r=!0)=>{let a=o?o[e]:e,s=t?e+"|| ''":`'${a}'`,l="";return i&&r&&!t&&tM.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||a?`c.add(${s})`:"null":a&&(l+=`d[s](n,${s})`),l},h=e?`!function(){${c}${f(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${tZ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${d}}catch(t){}}();`;return R.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})},()=>!0),tV=(e,t)=>{let n;if(!tD){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},tB=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},tq=e=>(e||(e=window.matchMedia(tZ)),e.matches?"dark":"light");var tK={breadcrumb:!0,collapsed:!1,footer:!0,layout:"default",navbar:!0,pagination:!0,sidebar:!0,timestamp:!0,toc:!0,typesetting:"default"},tY=tI.strictObject({breadcrumb:tI.boolean(),collapsed:tI.boolean(),footer:tI.boolean(),layout:tI.enum(["default","full","raw"]),navbar:tI.boolean(),pagination:tI.boolean(),sidebar:tI.boolean(),timestamp:tI.boolean(),toc:tI.boolean(),typesetting:tI.enum(["default","article"])}),tQ=tI.enum(["normal","hidden","children"]),tJ=tI.string(),tX=tI.strictObject({href:tI.string(),newWindow:tI.boolean(),title:tJ}),t0=tI.strictObject({display:tQ.optional(),items:tI.record(tX.partial({href:!0,newWindow:!0})),title:tJ,type:tI.literal("menu")}),t1=tI.strictObject({title:tJ.optional(),type:tI.literal("separator")}),t2=tX.extend({display:tQ,theme:tY,title:tJ,type:tI.enum(["page","doc"])}).deepPartial();tI.string().or(t0).or(t1).or(t2);var t4=n(3458),t5=n.n(t4);function t3(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function t6(e){var t=t3(e).Element;return e instanceof t||e instanceof Element}function t7(e){var t=t3(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function t9(e){if("undefined"==typeof ShadowRoot)return!1;var t=t3(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var t8=Math.max,ne=Math.min,nt=Math.round;function nn(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nr(){return!/^((?!chrome|android).)*safari/i.test(nn())}function ni(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&t7(e)&&(i=e.offsetWidth>0&&nt(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&nt(r.height)/e.offsetHeight||1);var o=(t6(e)?t3(e):window).visualViewport,s=!nr()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/i,u=(r.top+(s&&o?o.offsetTop:0))/a,c=r.width/i,d=r.height/a;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function na(e){var t=t3(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function no(e){return e?(e.nodeName||"").toLowerCase():null}function ns(e){return((t6(e)?e.ownerDocument:e.document)||window.document).documentElement}function nl(e){return ni(ns(e)).left+na(e).scrollLeft}function nu(e){return t3(e).getComputedStyle(e)}function nc(e){var t=nu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function nd(e){var t=ni(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nf(e){return"html"===no(e)?e:e.assignedSlot||e.parentNode||(t9(e)?e.host:null)||ns(e)}function nh(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(no(t))>=0?t.ownerDocument.body:t7(t)&&nc(t)?t:e(nf(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=t3(r),o=i?[a].concat(a.visualViewport||[],nc(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(nh(nf(o)))}function np(e){return t7(e)&&"fixed"!==nu(e).position?e.offsetParent:null}function nm(e){for(var t=t3(e),n=np(e);n&&["table","td","th"].indexOf(no(n))>=0&&"static"===nu(n).position;)n=np(n);return n&&("html"===no(n)||"body"===no(n)&&"static"===nu(n).position)?t:n||function(e){var t=/firefox/i.test(nn());if(/Trident/i.test(nn())&&t7(e)&&"fixed"===nu(e).position)return null;var n=nf(e);for(t9(n)&&(n=n.host);t7(n)&&0>["html","body"].indexOf(no(n));){var r=nu(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var nx="bottom",ng="right",nv="left",ny="auto",nb=["top",nx,ng,nv],nw="start",nk="viewport",n_="popper",nj=nb.reduce(function(e,t){return e.concat([t+"-"+nw,t+"-end"])},[]),nE=[].concat(nb,[ny]).reduce(function(e,t){return e.concat([t,t+"-"+nw,t+"-end"])},[]),nO=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],nT={placement:"bottom",modifiers:[],strategy:"absolute"};function nC(){for(var e=arguments.length,t=Array(e),n=0;n=0?"x":"y"}function nA(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?nN(i):null,o=i?nR(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:s,y:n.y-r.height};break;case nx:t={x:s,y:n.y+n.height};break;case ng:t={x:n.x+n.width,y:l};break;case nv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=a?nI(a):null;if(null!=u){var c="y"===u?"height":"width";switch(o){case nw:t[u]=t[u]-(n[c]/2-r[c]/2);break;case"end":t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var nL={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nP(e){var t,n,r,i,a,o,s,l=e.popper,u=e.popperRect,c=e.placement,d=e.variation,f=e.offsets,h=e.position,p=e.gpuAcceleration,m=e.adaptive,x=e.roundOffsets,g=e.isFixed,v=f.x,y=void 0===v?0:v,b=f.y,w=void 0===b?0:b,k="function"==typeof x?x({x:y,y:w}):{x:y,y:w};y=k.x,w=k.y;var _=f.hasOwnProperty("x"),j=f.hasOwnProperty("y"),E=nv,O="top",T=window;if(m){var C=nm(l),S="clientHeight",N="clientWidth";C===t3(l)&&"static"!==nu(C=ns(l)).position&&"absolute"===h&&(S="scrollHeight",N="scrollWidth"),("top"===c||(c===nv||c===ng)&&"end"===d)&&(O=nx,w-=(g&&C===T&&T.visualViewport?T.visualViewport.height:C[S])-u.height,w*=p?1:-1),(c===nv||("top"===c||c===nx)&&"end"===d)&&(E=ng,y-=(g&&C===T&&T.visualViewport?T.visualViewport.width:C[N])-u.width,y*=p?1:-1)}var R=Object.assign({position:h},m&&nL),I=!0===x?(t={x:y,y:w},n=t3(l),r=t.x,i=t.y,{x:nt(r*(a=n.devicePixelRatio||1))/a||0,y:nt(i*a)/a||0}):{x:y,y:w};return(y=I.x,w=I.y,p)?Object.assign({},R,((s={})[O]=j?"0":"",s[E]=_?"0":"",s.transform=1>=(T.devicePixelRatio||1)?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",s)):Object.assign({},R,((o={})[O]=j?w+"px":"",o[E]=_?y+"px":"",o.transform="",o))}var nM={left:"right",right:"left",bottom:"top",top:"bottom"};function nZ(e){return e.replace(/left|right|bottom|top/g,function(e){return nM[e]})}var nD={start:"end",end:"start"};function nF(e){return e.replace(/start|end/g,function(e){return nD[e]})}function nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&t9(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function n$(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nU(e,t,n){var r,i,a,o,s,l,u,c,d,f;return t===nk?n$(function(e,t){var n=t3(e),r=ns(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var u=nr();(u||!u&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+nl(e),y:l}}(e,n)):t6(t)?((r=ni(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):n$((i=ns(e),o=ns(i),s=na(i),l=null==(a=i.ownerDocument)?void 0:a.body,u=t8(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=t8(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-s.scrollLeft+nl(i),f=-s.scrollTop,"rtl"===nu(l||o).direction&&(d+=t8(o.clientWidth,l?l.clientWidth:0)-u),{width:u,height:c,x:d,y:f}))}function nW(){return{top:0,right:0,bottom:0,left:0}}function nH(e){return Object.assign({},nW(),e)}function nG(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function nV(e,t){void 0===t&&(t={});var n,r,i,a,o,s,l,u,c=t,d=c.placement,f=void 0===d?e.placement:d,h=c.strategy,p=void 0===h?e.strategy:h,m=c.boundary,x=c.rootBoundary,g=c.elementContext,v=void 0===g?n_:g,y=c.altBoundary,b=c.padding,w=void 0===b?0:b,k=nH("number"!=typeof w?w:nG(w,nb)),_=e.rects.popper,j=e.elements[void 0!==y&&y?v===n_?"reference":n_:v],E=(n=t6(j)?j:j.contextElement||ns(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===x?nk:x,l=(s=[].concat("clippingParents"===r?(a=nh(nf(n)),t6(o=["absolute","fixed"].indexOf(nu(n).position)>=0&&t7(n)?nm(n):n)?a.filter(function(e){return t6(e)&&nz(e,o)&&"body"!==no(e)}):[]):[].concat(r),[i]))[0],(u=s.reduce(function(e,t){var r=nU(n,t,p);return e.top=t8(r.top,e.top),e.right=ne(r.right,e.right),e.bottom=ne(r.bottom,e.bottom),e.left=t8(r.left,e.left),e},nU(n,l,p))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),O=ni(e.elements.reference),T=nA({reference:O,element:_,strategy:"absolute",placement:f}),C=n$(Object.assign({},_,T)),S=v===n_?C:O,N={top:E.top-S.top+k.top,bottom:S.bottom-E.bottom+k.bottom,left:E.left-S.left+k.left,right:S.right-E.right+k.right},R=e.modifiersData.offset;if(v===n_&&R){var I=R[f];Object.keys(N).forEach(function(e){var t=[ng,nx].indexOf(e)>=0?1:-1,n=["top",nx].indexOf(e)>=0?"y":"x";N[e]+=I[n]*t})}return N}function nB(e,t,n){return t8(e,ne(t,n))}function nq(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function nK(e){return["top",ng,nx,nv].some(function(t){return e[t]>=0})}var nY=(y=void 0===(v=(g={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=t3(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(e){e.addEventListener("scroll",n.update,nS)}),s&&l.addEventListener("resize",n.update,nS),function(){a&&u.forEach(function(e){e.removeEventListener("scroll",n.update,nS)}),s&&l.removeEventListener("resize",n.update,nS)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=nA({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,a=n.roundOffsets,o=void 0===a||a,s={placement:nN(t.placement),variation:nR(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,nP(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,nP(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];t7(i)&&no(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});t7(r)&&no(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=nE.reduce(function(e,n){var r,i,o,s,l,u;return e[n]=(r=t.rects,o=[nv,"top"].indexOf(i=nN(n))>=0?-1:1,l=(s="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],u=s[1],l=l||0,u=(u||0)*o,[nv,ng].indexOf(i)>=0?{x:u,y:l}:{x:l,y:u}),e},{}),s=o[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,x=t.options.placement,g=nN(x)===x,v=l||(g||!p?[nZ(x)]:function(e){if(nN(e)===ny)return[];var t=nZ(e);return[nF(e),t,nF(t)]}(x)),y=[x].concat(v).reduce(function(e,n){var r,i,a,o,s,l,f,h,x,g,v,y;return e.concat(nN(n)===ny?(i=(r={placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:m}).placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,h=void 0===(f=r.allowedAutoPlacements)?nE:f,0===(v=(g=(x=nR(i))?l?nj:nj.filter(function(e){return nR(e)===x}):nb).filter(function(e){return h.indexOf(e)>=0})).length&&(v=g),Object.keys(y=v.reduce(function(e,n){return e[n]=nV(t,{placement:n,boundary:a,rootBoundary:o,padding:s})[nN(n)],e},{})).sort(function(e,t){return y[e]-y[t]})):n)},[]),b=t.rects.reference,w=t.rects.popper,k=new Map,_=!0,j=y[0],E=0;E=0,N=S?"width":"height",R=nV(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),I=S?C?ng:nv:C?nx:"top";b[N]>w[N]&&(I=nZ(I));var A=nZ(I),L=[];if(a&&L.push(R[T]<=0),s&&L.push(R[I]<=0,R[A]<=0),L.every(function(e){return e})){j=O,_=!1;break}k.set(O,L)}if(_)for(var P=p?3:1,M=function(e){var t=y.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return j=t,"break"},Z=P;Z>0&&"break"!==M(Z);Z--);t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=n.altAxis,o=n.boundary,s=n.rootBoundary,l=n.altBoundary,u=n.padding,c=n.tether,d=void 0===c||c,f=n.tetherOffset,h=void 0===f?0:f,p=nV(t,{boundary:o,rootBoundary:s,padding:u,altBoundary:l}),m=nN(t.placement),x=nR(t.placement),g=!x,v=nI(m),y="x"===v?"y":"x",b=t.modifiersData.popperOffsets,w=t.rects.reference,k=t.rects.popper,_="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,j="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(void 0===i||i){var T,C="y"===v?"top":nv,S="y"===v?nx:ng,N="y"===v?"height":"width",R=b[v],I=R+p[C],A=R-p[S],L=d?-k[N]/2:0,P=x===nw?w[N]:k[N],M=x===nw?-k[N]:-w[N],Z=t.elements.arrow,D=d&&Z?nd(Z):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nW(),z=F[C],$=F[S],U=nB(0,w[N],D[N]),W=g?w[N]/2-L-U-z-j.mainAxis:P-U-z-j.mainAxis,H=g?-w[N]/2+L+U+$+j.mainAxis:M+U+$+j.mainAxis,G=t.elements.arrow&&nm(t.elements.arrow),V=G?"y"===v?G.clientTop||0:G.clientLeft||0:0,B=null!=(T=null==E?void 0:E[v])?T:0,q=nB(d?ne(I,R+W-B-V):I,R,d?t8(A,R+H-B):A);b[v]=q,O[v]=q-R}if(void 0!==a&&a){var K,Y,Q="x"===v?"top":nv,J="x"===v?nx:ng,X=b[y],ee="y"===y?"height":"width",et=X+p[Q],en=X-p[J],er=-1!==["top",nv].indexOf(m),ei=null!=(Y=null==E?void 0:E[y])?Y:0,ea=er?et:X-w[ee]-k[ee]-ei+j.altAxis,eo=er?X+w[ee]+k[ee]-ei-j.altAxis:en,es=d&&er?(K=nB(ea,X,eo))>eo?eo:K:nB(d?ea:et,X,d?eo:en);b[y]=es,O[y]=es-X}t.modifiersData[r]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n,r=e.state,i=e.name,a=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=nN(r.placement),u=nI(l),c=[nv,ng].indexOf(l)>=0?"height":"width";if(o&&s){var d=nH("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},r.rects,{placement:r.placement})):t)?t:nG(t,nb)),f=nd(o),h="y"===u?"top":nv,p="y"===u?nx:ng,m=r.rects.reference[c]+r.rects.reference[u]-s[u]-r.rects.popper[c],x=s[u]-r.rects.reference[u],g=nm(o),v=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,y=d[h],b=v-f[c]-d[p],w=v/2-f[c]/2+(m/2-x/2),k=nB(y,w,b);r.modifiersData[i]=((n={})[u]=k,n.centerOffset=k-w,n)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&nz(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=nV(t,{elementContext:"reference"}),s=nV(t,{altBoundary:!0}),l=nq(o,r),u=nq(s,i,a),c=nK(l),d=nK(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:v,w=void 0===(b=g.defaultOptions)?nT:b,function(e,t,n){void 0===n&&(n=w);var r,i,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},nT,w),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,l={state:a,setOptions:function(n){var r,i,s,c,d,f="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},w,a.options,f),a.scrollParents={reference:t6(e)?nh(e):e.contextElement?nh(e.contextElement):[],popper:nh(t)};var h=(i=Object.keys(r=[].concat(y,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),s=new Map,c=new Set,d=[],i.forEach(function(e){s.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var n=s.get(t);n&&e(n)}}),d.push(t)}(e)}),nO.reduce(function(e,t){return e.concat(d.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=h.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:a,name:t,instance:l,options:void 0===n?{}:n});o.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e,t,n,r,i,o,u,c,d,f,h,p,m=a.elements,x=m.reference,g=m.popper;if(nC(x,g)){a.rects={reference:(t=nm(g),n="fixed"===a.options.strategy,r=t7(t),c=t7(t)&&(o=nt((i=t.getBoundingClientRect()).width)/t.offsetWidth||1,u=nt(i.height)/t.offsetHeight||1,1!==o||1!==u),d=ns(t),f=ni(x,c,n),h={scrollLeft:0,scrollTop:0},p={x:0,y:0},(r||!r&&!n)&&(("body"!==no(t)||nc(d))&&(h=(e=t)!==t3(e)&&t7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:na(e)),t7(t)?(p=ni(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):d&&(p.x=nl(d))),{x:f.left+h.scrollLeft-p.x,y:f.top+h.scrollTop-p.y,width:f.width,height:f.height}),popper:nd(g)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var v=0;v=r))));t++);if(n)return a?rm(l,r,0):void(t[t.length]=l)}return!n&&l}function rm(e,t,n){return e=1===e.length?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function rx(e,t,n,r){return e=n?(e=e[(r=r&&t>n)?t:n])&&e[r?n:t]:e[t]}function rg(e,t,n,r,i){let a=0;if(e.constructor===Array){if(i)-1!==(t=e.indexOf(t))?1=this.B&&(d||!c[p])){var a=rf(f,r,h),o="";switch(this.G){case"full":if(2a;s--)if(s-a>=this.B){var l=rf(f,r,h,i,a);rh(this,c,o=p.substring(a,s),l,e,n)}break}case"reverse":if(1=this.B&&rh(this,c,o,rf(f,r,h,i,s),e,n);o=""}case"forward":if(1=this.B&&rh(this,c,o,a,e,n);break}default:if(this.C&&(a=Math.min(a/this.C(t,p,h)|0,f-1)),rh(this,c,p,a,e,n),d&&1=this.B&&!i[p]){i[p]=1;let t=this.l&&p>a;rh(this,u,t?a:p,rf(o+(r/2>o?0:1),r,h,s-1,l-1),e,n,t?p:a)}}}}}this.m||(this.register[e]=1)}}return this},C.search=function(e,t,n){let r,i,a;n||(!t&&n2(e)?e=(n=e).query:n2(t)&&(n=t));let o=[],s,l,u=0;if(n){e=n.query||e,t=n.limit,u=n.offset||0;var c=n.context;l=n.suggest}if(e&&1<(s=(e=this.encode(""+e)).length)){n=nX();var d=[];for(let t=0,r=0,i;t=this.B&&!n[i]){if(!this.s&&!l&&!this.map[i])return o;d[r++]=i,n[i]=1}s=(e=d).length}if(!s)return o;for(t||(t=100),c=this.depth&&1{a=e})),i||(i=0)){case 0:if(o="reg",this.m)for(let e in s=nX(),this.register)s[e]=1;else s=this.register;break;case 1:o="cfg",s={doc:0,opt:this.s?1:0};break;case 2:o="map",s=this.map;break;case 3:o="ctx",s=this.h;break;default:void 0===n&&a&&a();return}return rc(e,t||this,n,o,r,i,s,a),l},C.import=function(e,t){if(t)switch(n1(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},ri(rd.prototype);let ry=0;function rb(e){var t;if(!(this instanceof rb))return new rb(e);e?n4(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());let r="undefined"==typeof window&&self.exports,i=this;this.o=function(e,t,r){let i;try{i=t?new(n(5789)).Worker("//node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+rv.toString()],{type:"text/javascript"}))):new Worker(n1(r)?r:"worker/worker.js",{type:"module"})}catch(e){}return i}(t,r,e.worker),this.h=nX(),this.o&&(r?this.o.on("message",function(e){i.h[e.id](e.msg),delete i.h[e.id]}):this.o.onmessage=function(e){e=e.data,i.h[e.id](e.msg),delete i.h[e.id]},this.o.postMessage({task:"init",factory:t,options:e}))}function rw(e){rb.prototype[e]=rb.prototype[e+"Async"]=function(){let t;let n=this,r=[].slice.call(arguments);var i=r[r.length-1];return n4(i)&&(t=i,r.splice(r.length-1,1)),i=new Promise(function(t){setTimeout(function(){n.h[++ry]=t,n.o.postMessage({task:e,id:ry,args:r})})}),t?(i.then(t),this):i}}function rk(e){if(!(this instanceof rk))return new rk(e);var t,n=e.document||e.doc||e;this.K=[],this.h=[],this.A=[],this.register=nX(),this.key=(t=n.key||n.id)&&r_(t,this.A)||"id",this.m=nQ(e.fastupdate),this.C=(t=n.store)&&!0!==t&&[],this.store=t&&nX(),this.I=(t=n.tag)&&r_(t,this.A),this.l=t&&nX(),this.cache=(t=e.cache)&&new rs(t),e.cache=!1,this.o=e.worker,this.async=!1,t=nX();let r=n.index||n.field||n;n1(r)&&(r=[r]);for(let n=0,i,a;nt||n)&&(i=i.slice(n,n+t)),r&&(i=rO.call(this,i)),{tag:e,result:i}}function rO(e){let t=Array(e.length);for(let n=0,r;n{a=e})),i||(i=0),r||(r=0),r()=>e.dispose(),[e]),e}var rZ=n(3),rD=n(2308),rF=n(1378),rz=n(5508),r$=n(2047),rU=n(1813),rW=n(8844);function rH(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.add(...n)}function rG(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.remove(...n)}let rV=(0,R.createContext)(null);rV.displayName="OpenClosedContext";var rB=((i=rB||{})[i.Open=1]="Open",i[i.Closed=2]="Closed",i[i.Closing=4]="Closing",i[i.Opening=8]="Opening",i);function rq(){return(0,R.useContext)(rV)}function rK(e){let{value:t,children:n}=e;return R.createElement(rV.Provider,{value:t},n)}var rY=n(5602),rQ=n(8287);function rJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/\s+/).filter(e=>e.length>1)}let rX=(0,R.createContext)(null);rX.displayName="TransitionContext";var r0=((a=r0||{}).Visible="visible",a.Hidden="hidden",a);let r1=(0,R.createContext)(null);function r2(e){return"children"in e?r2(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function r4(e,t){let n=(0,rz.E)(e),r=(0,R.useRef)([]),i=(0,rD.t)(),a=rM(),o=(0,rZ.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rQ.l4.Hidden,o=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==o&&((0,rW.E)(t,{[rQ.l4.Unmount](){r.current.splice(o,1)},[rQ.l4.Hidden](){r.current[o].state="hidden"}}),a.microTask(()=>{var e;!r2(r)&&i.current&&(null==(e=n.current)||e.call(n))}))}),s=(0,rZ.z)(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>o(e,rQ.l4.Unmount)}),l=(0,R.useRef)([]),u=(0,R.useRef)(Promise.resolve()),c=(0,R.useRef)({enter:[],leave:[],idle:[]}),d=(0,rZ.z)((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(c.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?u.current=u.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),f=(0,rZ.z)((e,t,n)=>{Promise.all(c.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>n(t))});return(0,R.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:u,chains:c}),[s,o,r,d,f,c,u])}function r5(){}r1.displayName="NestingContext";let r3=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function r6(e){var t;let n={};for(let r of r3)n[r]=null!=(t=e[r])?t:r5;return n}let r7=rQ.AN.RenderStrategy,r9=(0,rQ.yV)(function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,R.useRef)(null),s=(0,rU.T)(o,t);(0,r$.H)();let l=rq();if(void 0===n&&null!==l&&(n=(l&rB.Open)===rB.Open),![!0,!1].includes(n))throw Error("A is used but it is missing a `show={true | false}` prop.");let[u,c]=(0,R.useState)(n?"visible":"hidden"),d=r4(()=>{c("hidden")}),[f,h]=(0,R.useState)(!0),p=(0,R.useRef)([n]);(0,rF.e)(()=>{!1!==f&&p.current[p.current.length-1]!==n&&(p.current.push(n),h(!1))},[p,n]);let m=(0,R.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);(0,R.useEffect)(()=>{if(n)c("visible");else if(r2(d)){let e=o.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&c("hidden")}else c("hidden")},[n,d]);let x={unmount:i},g=(0,rZ.z)(()=>{var t;f&&h(!1),null==(t=e.beforeEnter)||t.call(e)}),v=(0,rZ.z)(()=>{var t;f&&h(!1),null==(t=e.beforeLeave)||t.call(e)});return R.createElement(r1.Provider,{value:d},R.createElement(rX.Provider,{value:m},(0,rQ.sY)({ourProps:{...x,as:R.Fragment,children:R.createElement(r8,{ref:s,...x,...a,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:R.Fragment,features:r7,visible:"visible"===u,name:"Transition"})))}),r8=(0,rQ.yV)(function(e,t){var n,r,i;let a;let{beforeEnter:o,afterEnter:s,beforeLeave:l,afterLeave:u,enter:c,enterFrom:d,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:x,...g}=e,v=(0,R.useRef)(null),y=(0,rU.T)(v,t),b=null==(n=g.unmount)||n?rQ.l4.Unmount:rQ.l4.Hidden,{show:w,appear:k,initial:_}=function(){let e=(0,R.useContext)(rX);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[j,E]=(0,R.useState)(w?"visible":"hidden"),O=function(){let e=(0,R.useContext)(r1);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:T,unregister:C}=O;(0,R.useEffect)(()=>T(v),[T,v]),(0,R.useEffect)(()=>{if(b===rQ.l4.Hidden&&v.current){if(w&&"visible"!==j){E("visible");return}return(0,rW.E)(j,{hidden:()=>C(v),visible:()=>T(v)})}},[j,v,T,C,w,b]);let S=(0,rz.E)({base:rJ(g.className),enter:rJ(c),enterFrom:rJ(d),enterTo:rJ(f),entered:rJ(h),leave:rJ(p),leaveFrom:rJ(m),leaveTo:rJ(x)}),N=(i={beforeEnter:o,afterEnter:s,beforeLeave:l,afterLeave:u},a=(0,R.useRef)(r6(i)),(0,R.useEffect)(()=>{a.current=r6(i)},[i]),a),I=(0,r$.H)();(0,R.useEffect)(()=>{if(I&&"visible"===j&&null===v.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,j,I]);let A=k&&w&&_,L=I&&(!_||k)?w?"enter":"leave":"idle",P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,R.useState)(e),r=(0,rD.t)(),i=(0,R.useCallback)(e=>{r.current&&n(t=>t|e)},[t,r]),a=(0,R.useCallback)(e=>!!(t&e),[t]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:(0,R.useCallback)(e=>{r.current&&n(t=>t&~e)},[n,r]),toggleFlag:(0,R.useCallback)(e=>{r.current&&n(t=>t^e)},[n])}}(0),M=(0,rZ.z)(e=>(0,rW.E)(e,{enter:()=>{P.addFlag(rB.Opening),N.current.beforeEnter()},leave:()=>{P.addFlag(rB.Closing),N.current.beforeLeave()},idle:()=>{}})),Z=(0,rZ.z)(e=>(0,rW.E)(e,{enter:()=>{P.removeFlag(rB.Opening),N.current.afterEnter()},leave:()=>{P.removeFlag(rB.Closing),N.current.afterLeave()},idle:()=>{}})),D=r4(()=>{E("hidden"),C(v)},O),F=(0,R.useRef)(!1);!function(e){let{immediate:t,container:n,direction:r,classes:i,onStart:a,onStop:o}=e,s=(0,rD.t)(),l=rM(),u=(0,rz.E)(r);(0,rF.e)(()=>{t&&(u.current="enter")},[t]),(0,rF.e)(()=>{let e=(0,rP.k)();l.add(e.dispose);let t=n.current;if(t&&"idle"!==u.current&&s.current){var r,c,d;let n,s,l,f,h,p,m;return e.dispose(),a.current(u.current),e.add((r=i.current,c="enter"===u.current,d=()=>{e.dispose(),o.current(u.current)},s=c?"enter":"leave",l=(0,rP.k)(),f=void 0!==d?(n={called:!1},function(){for(var e=arguments.length,t=Array(e),r=0;r{},"enter"===s&&(t.removeAttribute("hidden"),t.style.display=""),h=(0,rW.E)(s,{enter:()=>r.enter,leave:()=>r.leave}),p=(0,rW.E)(s,{enter:()=>r.enterTo,leave:()=>r.leaveTo}),m=(0,rW.E)(s,{enter:()=>r.enterFrom,leave:()=>r.leaveFrom}),rG(t,...r.base,...r.enter,...r.enterTo,...r.enterFrom,...r.leave,...r.leaveFrom,...r.leaveTo,...r.entered),rH(t,...r.base,...h,...m),l.nextFrame(()=>{rG(t,...r.base,...h,...m),rH(t,...r.base,...h,...p),function(e,t){let n=(0,rP.k)();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t}),s=a+o;if(0!==s){n.group(n=>{n.setTimeout(()=>{t(),n.dispose()},s),n.addEventListener(e,"transitionrun",e=>{e.target===e.currentTarget&&n.dispose()})});let r=n.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();n.add(()=>t()),n.dispose}(t,()=>(rG(t,...r.base,...h),rH(t,...r.base,...r.entered),f()))}),l.dispose)),e.dispose}},[r])}({immediate:A,container:v,classes:S,direction:L,onStart:(0,rz.E)(e=>{F.current=!0,D.onStart(v,e,M)}),onStop:(0,rz.E)(e=>{F.current=!1,D.onStop(v,e,Z),"leave"!==e||r2(D)||(E("hidden"),C(v))})});let z=g;return A?z={...z,className:(0,rY.A)(g.className,...S.current.enter,...S.current.enterFrom)}:F.current&&(z.className=(0,rY.A)(g.className,null==(r=v.current)?void 0:r.className),""===z.className&&delete z.className),R.createElement(r1.Provider,{value:D},R.createElement(rK,{value:(0,rW.E)(j,{visible:rB.Open,hidden:rB.Closed})|P.flags},(0,rQ.sY)({ourProps:{ref:y},theirProps:z,defaultTag:"div",features:r7,visible:"visible"===j,name:"Transition.Child"})))}),ie=(0,rQ.yV)(function(e,t){let n=null!==(0,R.useContext)(rX),r=null!==rq();return R.createElement(R.Fragment,null,!n&&r?R.createElement(r9,{ref:t,...e}):R.createElement(r8,{ref:t,...e}))}),it=Object.assign(r9,{Child:ie,Root:r9});var ir=n(953);function ii(e,t){let[n,r]=(0,R.useState)(e),i=(0,rz.E)(e);return(0,rF.e)(()=>r(i.current),[i,r,...t]),n}var ia=n(4924),io=n(8657);function is(e,t,n){let r=(0,rz.E)(t);(0,R.useEffect)(()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}function il(e,t){var n,r;let i,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=(0,R.useRef)(!1);function s(n,r){if(!o.current||n.defaultPrevented)return;let i=r(n);if(null!==i&&i.getRootNode().contains(i)&&i.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(i)||n.composed&&n.composedPath().includes(e))return}return(0,io.sP)(i,io.tJ.Loose)||-1===i.tabIndex||n.preventDefault(),t(n,i)}}(0,R.useEffect)(()=>{requestAnimationFrame(()=>{o.current=a})},[a]);let l=(0,R.useRef)(null);is("pointerdown",e=>{var t,n;o.current&&(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),is("mousedown",e=>{var t,n;o.current&&(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),is("click",e=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||l.current&&(s(e,()=>l.current),l.current=null)},!0),is("touchend",e=>s(e,()=>e.target instanceof HTMLElement?e.target:null),!0),n="blur",r=e=>s(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),i=(0,rz.E)(r),(0,R.useEffect)(()=>{function e(e){i.current(e)}return window.addEventListener(n,e,!0),()=>window.removeEventListener(n,e,!0)},[n,!0])}var iu=n(961);let ic=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function id(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let a=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),a=!0;let o=a?null!=(n=i.innerText)?n:"":r;return ic.test(o)&&(o=o.replace(ic,"")),o}function ih(e){let t=(0,R.useRef)(""),n=(0,R.useRef)("");return(0,rZ.z)(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let a=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():id(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return id(e).trim()})(r).trim().toLowerCase();return t.current=i,n.current=a,a})}function ip(e){return[e.screenX,e.screenY]}function im(){let e=(0,R.useRef)([-1,-1]);return{wasMoved(t){let n=ip(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=ip(t)}}}var ix=n(7524);function ig(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var iv=((o=iv||{})[o.First=0]="First",o[o.Previous=1]="Previous",o[o.Next=2]="Next",o[o.Last=3]="Last",o[o.Specific=4]="Specific",o[o.Nothing=5]="Nothing",o);function iy(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,io.z2)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{options:r,activeOptionIndex:i}}let iC={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(e=>n(e.dataRef.current.value));return -1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||1===e.listboxState)return e;let r=iT(e),i=iy(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),a=i?e.options.indexOf(i):-1;return -1===a||a===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:a,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=iT(e,e=>[...e,n]);return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=iT(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},iS=(0,R.createContext)(null);function iN(e){let t=(0,R.useContext)(iS);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,iN),t}return t}iS.displayName="ListboxActionsContext";let iR=(0,R.createContext)(null);function iI(e){let t=(0,R.useContext)(iR);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,iI),t}return t}function iA(e,t){return(0,rW.E)(t.type,iC,e,t)}iR.displayName="ListboxDataContext";let iL=R.Fragment,iP=rQ.AN.RenderStrategy|rQ.AN.Static,iM=Object.assign((0,rQ.yV)(function(e,t){let{value:n,defaultValue:r,form:i,name:a,onChange:o,by:s=(e,t)=>e===t,disabled:l=!1,horizontal:u=!1,multiple:c=!1,...d}=e,f=u?"horizontal":"vertical",h=(0,rU.T)(t),[p=c?[]:void 0,m]=function(e,t,n){let[r,i]=(0,R.useState)(n),a=void 0!==e,o=(0,R.useRef)(a),s=(0,R.useRef)(!1),l=(0,R.useRef)(!1);return!a||o.current||s.current?a||!o.current||l.current||(l.current=!0,o.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,o.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:r,(0,rZ.z)(e=>(a||i(e),null==t?void 0:t(e)))]}(n,o,r),[x,g]=(0,R.useReducer)(iA,{dataRef:(0,R.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),v=(0,R.useRef)({static:!1,hold:!1}),y=(0,R.useRef)(null),b=(0,R.useRef)(null),w=(0,R.useRef)(null),k=(0,rZ.z)("string"==typeof s?(e,t)=>(null==e?void 0:e[s])===(null==t?void 0:t[s]):s),_=(0,R.useCallback)(e=>(0,rW.E)(j.mode,{1:()=>p.some(t=>k(t,e)),0:()=>k(p,e)}),[p]),j=(0,R.useMemo)(()=>({...x,value:p,disabled:l,mode:c?1:0,orientation:f,compare:k,isSelected:_,optionsPropsRef:v,labelRef:y,buttonRef:b,optionsRef:w}),[p,l,c,x]);(0,rF.e)(()=>{x.dataRef.current=j},[j]),il([j.buttonRef,j.optionsRef],(e,t)=>{var n;g({type:1}),(0,io.sP)(t,io.tJ.Loose)||(e.preventDefault(),null==(n=j.buttonRef.current)||n.focus())},0===j.listboxState);let E=(0,R.useMemo)(()=>({open:0===j.listboxState,disabled:l,value:p}),[j,l,p]),O=(0,rZ.z)(e=>{let t=j.options.find(t=>t.id===e);t&&L(t.dataRef.current.value)}),T=(0,rZ.z)(()=>{if(null!==j.activeOptionIndex){let{dataRef:e,id:t}=j.options[j.activeOptionIndex];L(e.current.value),g({type:2,focus:iv.Specific,id:t})}}),C=(0,rZ.z)(()=>g({type:0})),S=(0,rZ.z)(()=>g({type:1})),N=(0,rZ.z)((e,t,n)=>e===iv.Specific?g({type:2,focus:iv.Specific,id:t,trigger:n}):g({type:2,focus:e,trigger:n})),I=(0,rZ.z)((e,t)=>(g({type:5,id:e,dataRef:t}),()=>g({type:6,id:e}))),A=(0,rZ.z)(e=>(g({type:7,id:e}),()=>g({type:7,id:null}))),L=(0,rZ.z)(e=>(0,rW.E)(j.mode,{0:()=>null==m?void 0:m(e),1(){let t=j.value.slice(),n=t.findIndex(t=>k(t,e));return -1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}})),P=(0,rZ.z)(e=>g({type:3,value:e})),M=(0,rZ.z)(()=>g({type:4})),Z=(0,R.useMemo)(()=>({onChange:L,registerOption:I,registerLabel:A,goToOption:N,closeListbox:S,openListbox:C,selectActiveOption:T,selectOption:O,search:P,clearSearch:M}),[]),D=(0,R.useRef)(null),F=rM();return(0,R.useEffect)(()=>{D.current&&void 0!==r&&F.addEventListener(D.current,"reset",()=>{null==m||m(r)})},[D,m]),R.createElement(iS.Provider,{value:Z},R.createElement(iR.Provider,{value:j},R.createElement(rK,{value:(0,rW.E)(j.listboxState,{0:rB.Open,1:rB.Closed})},null!=a&&null!=p&&(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[i,a]of Object.entries(t))!function t(n,r,i){if(Array.isArray(i))for(let[e,a]of i.entries())t(n,ib(r,e.toString()),a);else i instanceof Date?n.push([r,i.toISOString()]):"boolean"==typeof i?n.push([r,i?"1":"0"]):"string"==typeof i?n.push([r,i]):"number"==typeof i?n.push([r,"".concat(i)]):null==i?n.push([r,""]):e(i,r,n)}(r,ib(n,i),a);return r})({[a]:p}).map((e,t)=>{let[n,r]=e;return R.createElement(ix._,{features:ix.A.Hidden,ref:0===t?e=>{var t;D.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...(0,rQ.oA)({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:n,value:r})})}),(0,rQ.sY)({ourProps:{ref:h},theirProps:d,slot:E,defaultTag:iL,name:"Listbox"}))))}),{Button:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-listbox-button-".concat(r),...a}=e,o=iI("Listbox.Button"),s=iN("Listbox.Button"),l=(0,rU.T)(o.buttonRef,t),u=rM(),c=(0,rZ.z)(e=>{switch(e.key){case ik.R.Space:case ik.R.Enter:case ik.R.ArrowDown:e.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(iv.First)});break;case ik.R.ArrowUp:e.preventDefault(),s.openListbox(),u.nextFrame(()=>{o.value||s.goToOption(iv.Last)})}}),d=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),f=(0,rZ.z)(e=>{if(ig(e.currentTarget))return e.preventDefault();0===o.listboxState?(s.closeListbox(),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),s.openListbox())}),h=ii(()=>{if(o.labelId)return[o.labelId,i].join(" ")},[o.labelId,i]),p=(0,R.useMemo)(()=>({open:0===o.listboxState,disabled:o.disabled,value:o.value}),[o]),m={ref:l,id:i,type:(0,iu.f)(e,o.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsRef.current)?void 0:n.id,"aria-expanded":0===o.listboxState,"aria-labelledby":h,disabled:o.disabled,onKeyDown:c,onKeyUp:d,onClick:f};return(0,rQ.sY)({ourProps:m,theirProps:a,slot:p,defaultTag:"button",name:"Listbox.Button"})}),Label:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-listbox-label-".concat(n),...i}=e,a=iI("Listbox.Label"),o=iN("Listbox.Label"),s=(0,rU.T)(a.labelRef,t);(0,rF.e)(()=>o.registerLabel(r),[r]);let l=(0,rZ.z)(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),u=(0,R.useMemo)(()=>({open:0===a.listboxState,disabled:a.disabled}),[a]);return(0,rQ.sY)({ourProps:{ref:s,id:r,onClick:l},theirProps:i,slot:u,defaultTag:"label",name:"Listbox.Label"})}),Options:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-listbox-options-".concat(r),...a}=e,o=iI("Listbox.Options"),s=iN("Listbox.Options"),l=(0,rU.T)(o.optionsRef,t),u=rM(),c=rM(),d=rq(),f=null!==d?(d&rB.Open)===rB.Open:0===o.listboxState;(0,R.useEffect)(()=>{var e;let t=o.optionsRef.current;t&&0===o.listboxState&&t!==(null==(e=(0,iw.r)(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[o.listboxState,o.optionsRef]);let h=(0,rZ.z)(e=>{switch(c.dispose(),e.key){case ik.R.Space:if(""!==o.searchQuery)return e.preventDefault(),e.stopPropagation(),s.search(e.key);case ik.R.Enter:if(e.preventDefault(),e.stopPropagation(),null!==o.activeOptionIndex){let{dataRef:e}=o.options[o.activeOptionIndex];s.onChange(e.current.value)}0===o.mode&&(s.closeListbox(),(0,rP.k)().nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case(0,rW.E)(o.orientation,{vertical:ik.R.ArrowDown,horizontal:ik.R.ArrowRight}):return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Next);case(0,rW.E)(o.orientation,{vertical:ik.R.ArrowUp,horizontal:ik.R.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Previous);case ik.R.Home:case ik.R.PageUp:return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.First);case ik.R.End:case ik.R.PageDown:return e.preventDefault(),e.stopPropagation(),s.goToOption(iv.Last);case ik.R.Escape:return e.preventDefault(),e.stopPropagation(),s.closeListbox(),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case ik.R.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(s.search(e.key),c.setTimeout(()=>s.clearSearch(),350))}}),p=ii(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.id},[o.buttonRef.current]),m=(0,R.useMemo)(()=>({open:0===o.listboxState}),[o]),x={"aria-activedescendant":null===o.activeOptionIndex||null==(n=o.options[o.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===o.mode||void 0,"aria-labelledby":p,"aria-orientation":o.orientation,id:i,onKeyDown:h,role:"listbox",tabIndex:0,ref:l};return(0,rQ.sY)({ourProps:x,theirProps:a,slot:m,defaultTag:"ul",features:iP,visible:f,name:"Listbox.Options"})}),Option:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-listbox-option-".concat(n),disabled:i=!1,value:a,...o}=e,s=iI("Listbox.Option"),l=iN("Listbox.Option"),u=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===r,c=s.isSelected(a),d=(0,R.useRef)(null),f=ih(d),h=(0,rz.E)({disabled:i,value:a,domRef:d,get textValue(){return f()}}),p=(0,rU.T)(t,d);(0,rF.e)(()=>{if(0!==s.listboxState||!u||0===s.activationTrigger)return;let e=(0,rP.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=d.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[d,u,s.listboxState,s.activationTrigger,s.activeOptionIndex]),(0,rF.e)(()=>l.registerOption(r,h),[h,r]);let m=(0,rZ.z)(e=>{if(i)return e.preventDefault();l.onChange(a),0===s.mode&&(l.closeListbox(),(0,rP.k)().nextFrame(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),x=(0,rZ.z)(()=>{if(i)return l.goToOption(iv.Nothing);l.goToOption(iv.Specific,r)}),g=im(),v=(0,rZ.z)(e=>g.update(e)),y=(0,rZ.z)(e=>{g.wasMoved(e)&&(i||u||l.goToOption(iv.Specific,r,0))}),b=(0,rZ.z)(e=>{g.wasMoved(e)&&(i||u&&l.goToOption(iv.Nothing))}),w=(0,R.useMemo)(()=>({active:u,selected:c,disabled:i}),[u,c,i]);return(0,rQ.sY)({ourProps:{id:r,ref:p,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":c,disabled:void 0,onClick:m,onFocus:x,onPointerEnter:v,onMouseEnter:v,onPointerMove:y,onMouseMove:y,onPointerLeave:b,onMouseLeave:b},theirProps:o,slot:w,defaultTag:"li",name:"Listbox.Option"})})});var iZ=n(3935),iD=n(9008),iF=n.n(iD);function iz(){return(iz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var iU=["keyOverride"],iW=["crossOrigin"],iH={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},iG=function(e,t,n){void 0===t&&(t=[]);var r=void 0===n?{}:n,i=r.defaultWidth,a=r.defaultHeight;return t.reduce(function(t,n,r){return t.push(R.createElement("meta",{key:"og:"+e+":0"+r,property:"og:"+e,content:n.url})),n.alt&&t.push(R.createElement("meta",{key:"og:"+e+":alt0"+r,property:"og:"+e+":alt",content:n.alt})),n.secureUrl&&t.push(R.createElement("meta",{key:"og:"+e+":secure_url0"+r,property:"og:"+e+":secure_url",content:n.secureUrl.toString()})),n.type&&t.push(R.createElement("meta",{key:"og:"+e+":type0"+r,property:"og:"+e+":type",content:n.type.toString()})),n.width?t.push(R.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:n.width.toString()})):i&&t.push(R.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:i.toString()})),n.height?t.push(R.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:n.height.toString()})):a&&t.push(R.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:a.toString()})),t},[])},iV=function(e){var t,n,r,i,a,o=[];e.titleTemplate&&(iH.templateTitle=e.titleTemplate);var s="";e.title?(s=e.title,iH.templateTitle&&(s=iH.templateTitle.replace(/%s/g,function(){return s}))):e.defaultTitle&&(s=e.defaultTitle),s&&o.push(R.createElement("title",{key:"title"},s));var l=void 0===e.noindex?iH.noindex||e.dangerouslySetAllPagesToNoIndex:e.noindex,u=void 0===e.nofollow?iH.nofollow||e.dangerouslySetAllPagesToNoFollow:e.nofollow,c=e.norobots||iH.norobots,d="";if(e.robotsProps){var f=e.robotsProps,h=f.nosnippet,p=f.maxSnippet,m=f.maxImagePreview,x=f.maxVideoPreview,g=f.noarchive,v=f.noimageindex,y=f.notranslate,b=f.unavailableAfter;d=(h?",nosnippet":"")+(p?",max-snippet:"+p:"")+(m?",max-image-preview:"+m:"")+(g?",noarchive":"")+(b?",unavailable_after:"+b:"")+(v?",noimageindex":"")+(x?",max-video-preview:"+x:"")+(y?",notranslate":"")}if(e.norobots&&(iH.norobots=!0),l||u?(e.dangerouslySetAllPagesToNoIndex&&(iH.noindex=!0),e.dangerouslySetAllPagesToNoFollow&&(iH.nofollow=!0),o.push(R.createElement("meta",{key:"robots",name:"robots",content:(l?"noindex":"index")+","+(u?"nofollow":"follow")+d}))):(!c||d)&&o.push(R.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+d})),e.description&&o.push(R.createElement("meta",{key:"description",name:"description",content:e.description})),e.themeColor&&o.push(R.createElement("meta",{key:"theme-color",name:"theme-color",content:e.themeColor})),e.mobileAlternate&&o.push(R.createElement("link",{rel:"alternate",key:"mobileAlternate",media:e.mobileAlternate.media,href:e.mobileAlternate.href})),e.languageAlternates&&e.languageAlternates.length>0&&e.languageAlternates.forEach(function(e){o.push(R.createElement("link",{rel:"alternate",key:"languageAlternate-"+e.hrefLang,hrefLang:e.hrefLang,href:e.href}))}),e.twitter&&(e.twitter.cardType&&o.push(R.createElement("meta",{key:"twitter:card",name:"twitter:card",content:e.twitter.cardType})),e.twitter.site&&o.push(R.createElement("meta",{key:"twitter:site",name:"twitter:site",content:e.twitter.site})),e.twitter.handle&&o.push(R.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:e.twitter.handle}))),e.facebook&&e.facebook.appId&&o.push(R.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:e.facebook.appId})),(null!=(t=e.openGraph)&&t.title||s)&&o.push(R.createElement("meta",{key:"og:title",property:"og:title",content:(null==(i=e.openGraph)?void 0:i.title)||s})),(null!=(n=e.openGraph)&&n.description||e.description)&&o.push(R.createElement("meta",{key:"og:description",property:"og:description",content:(null==(a=e.openGraph)?void 0:a.description)||e.description})),e.openGraph){if((e.openGraph.url||e.canonical)&&o.push(R.createElement("meta",{key:"og:url",property:"og:url",content:e.openGraph.url||e.canonical})),e.openGraph.type){var w=e.openGraph.type.toLowerCase();o.push(R.createElement("meta",{key:"og:type",property:"og:type",content:w})),"profile"===w&&e.openGraph.profile?(e.openGraph.profile.firstName&&o.push(R.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:e.openGraph.profile.firstName})),e.openGraph.profile.lastName&&o.push(R.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:e.openGraph.profile.lastName})),e.openGraph.profile.username&&o.push(R.createElement("meta",{key:"profile:username",property:"profile:username",content:e.openGraph.profile.username})),e.openGraph.profile.gender&&o.push(R.createElement("meta",{key:"profile:gender",property:"profile:gender",content:e.openGraph.profile.gender}))):"book"===w&&e.openGraph.book?(e.openGraph.book.authors&&e.openGraph.book.authors.length&&e.openGraph.book.authors.forEach(function(e,t){o.push(R.createElement("meta",{key:"book:author:0"+t,property:"book:author",content:e}))}),e.openGraph.book.isbn&&o.push(R.createElement("meta",{key:"book:isbn",property:"book:isbn",content:e.openGraph.book.isbn})),e.openGraph.book.releaseDate&&o.push(R.createElement("meta",{key:"book:release_date",property:"book:release_date",content:e.openGraph.book.releaseDate})),e.openGraph.book.tags&&e.openGraph.book.tags.length&&e.openGraph.book.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"book:tag:0"+t,property:"book:tag",content:e}))})):"article"===w&&e.openGraph.article?(e.openGraph.article.publishedTime&&o.push(R.createElement("meta",{key:"article:published_time",property:"article:published_time",content:e.openGraph.article.publishedTime})),e.openGraph.article.modifiedTime&&o.push(R.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:e.openGraph.article.modifiedTime})),e.openGraph.article.expirationTime&&o.push(R.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:e.openGraph.article.expirationTime})),e.openGraph.article.authors&&e.openGraph.article.authors.length&&e.openGraph.article.authors.forEach(function(e,t){o.push(R.createElement("meta",{key:"article:author:0"+t,property:"article:author",content:e}))}),e.openGraph.article.section&&o.push(R.createElement("meta",{key:"article:section",property:"article:section",content:e.openGraph.article.section})),e.openGraph.article.tags&&e.openGraph.article.tags.length&&e.openGraph.article.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"article:tag:0"+t,property:"article:tag",content:e}))})):("video.movie"===w||"video.episode"===w||"video.tv_show"===w||"video.other"===w)&&e.openGraph.video&&(e.openGraph.video.actors&&e.openGraph.video.actors.length&&e.openGraph.video.actors.forEach(function(e,t){e.profile&&o.push(R.createElement("meta",{key:"video:actor:0"+t,property:"video:actor",content:e.profile})),e.role&&o.push(R.createElement("meta",{key:"video:actor:role:0"+t,property:"video:actor:role",content:e.role}))}),e.openGraph.video.directors&&e.openGraph.video.directors.length&&e.openGraph.video.directors.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:director:0"+t,property:"video:director",content:e}))}),e.openGraph.video.writers&&e.openGraph.video.writers.length&&e.openGraph.video.writers.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:writer:0"+t,property:"video:writer",content:e}))}),e.openGraph.video.duration&&o.push(R.createElement("meta",{key:"video:duration",property:"video:duration",content:e.openGraph.video.duration.toString()})),e.openGraph.video.releaseDate&&o.push(R.createElement("meta",{key:"video:release_date",property:"video:release_date",content:e.openGraph.video.releaseDate})),e.openGraph.video.tags&&e.openGraph.video.tags.length&&e.openGraph.video.tags.forEach(function(e,t){o.push(R.createElement("meta",{key:"video:tag:0"+t,property:"video:tag",content:e}))}),e.openGraph.video.series&&o.push(R.createElement("meta",{key:"video:series",property:"video:series",content:e.openGraph.video.series})))}e.defaultOpenGraphImageWidth&&(iH.defaultOpenGraphImageWidth=e.defaultOpenGraphImageWidth),e.defaultOpenGraphImageHeight&&(iH.defaultOpenGraphImageHeight=e.defaultOpenGraphImageHeight),e.openGraph.images&&e.openGraph.images.length&&o.push.apply(o,iG("image",e.openGraph.images,{defaultWidth:iH.defaultOpenGraphImageWidth,defaultHeight:iH.defaultOpenGraphImageHeight})),e.defaultOpenGraphVideoWidth&&(iH.defaultOpenGraphVideoWidth=e.defaultOpenGraphVideoWidth),e.defaultOpenGraphVideoHeight&&(iH.defaultOpenGraphVideoHeight=e.defaultOpenGraphVideoHeight),e.openGraph.videos&&e.openGraph.videos.length&&o.push.apply(o,iG("video",e.openGraph.videos,{defaultWidth:iH.defaultOpenGraphVideoWidth,defaultHeight:iH.defaultOpenGraphVideoHeight})),e.openGraph.audio&&o.push.apply(o,iG("audio",e.openGraph.audio)),e.openGraph.locale&&o.push(R.createElement("meta",{key:"og:locale",property:"og:locale",content:e.openGraph.locale})),(e.openGraph.siteName||e.openGraph.site_name)&&o.push(R.createElement("meta",{key:"og:site_name",property:"og:site_name",content:e.openGraph.siteName||e.openGraph.site_name}))}return e.canonical&&o.push(R.createElement("link",{rel:"canonical",href:e.canonical,key:"canonical"})),e.additionalMetaTags&&e.additionalMetaTags.length>0&&e.additionalMetaTags.forEach(function(e){var t,n,r=e.keyOverride,i=i$(e,iU);o.push(R.createElement("meta",iz({key:"meta:"+(null!=(t=null!=(n=null!=r?r:i.name)?n:i.property)?t:i.httpEquiv)},i)))}),null!=(r=e.additionalLinkTags)&&r.length&&e.additionalLinkTags.forEach(function(e){var t,n=e.crossOrigin,r=i$(e,iW);o.push(R.createElement("link",iz({key:"link"+(null!=(t=r.keyOverride)?t:r.href)+r.rel},r,{crossOrigin:"anonymous"===n||"use-credentials"===n||""===n?n:void 0})))}),o},iB=function(e){return R.createElement(iF(),null,iV(e))},iq=function(e){var t=e.title,n=e.themeColor,r=e.noindex,i=e.nofollow,a=e.robotsProps,o=e.description,s=e.canonical,l=e.openGraph,u=e.facebook,c=e.twitter,d=e.additionalMetaTags,f=e.titleTemplate,h=e.defaultTitle,p=e.mobileAlternate,m=e.languageAlternates,x=e.additionalLinkTags;return R.createElement(R.Fragment,null,R.createElement(iB,{title:t,themeColor:n,noindex:r,nofollow:i,robotsProps:a,description:o,canonical:s,facebook:u,openGraph:l,additionalMetaTags:d,twitter:c,titleTemplate:f,defaultTitle:h,mobileAlternate:p,languageAlternates:m,additionalLinkTags:x}))};RegExp("["+Object.keys(Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"})).join("")+"]","g");var iK=((d=iK||{})[d.Open=0]="Open",d[d.Closed=1]="Closed",d),iY=((f=iY||{})[f.Pointer=0]="Pointer",f[f.Other=1]="Other",f),iQ=((h=iQ||{})[h.OpenMenu=0]="OpenMenu",h[h.CloseMenu=1]="CloseMenu",h[h.GoToItem=2]="GoToItem",h[h.Search=3]="Search",h[h.ClearSearch=4]="ClearSearch",h[h.RegisterItem=5]="RegisterItem",h[h.UnregisterItem=6]="UnregisterItem",h);function iJ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=(0,io.z2)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{items:r,activeItemIndex:i}}let iX={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var n;let r=iJ(e),i=iy(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled}),a=i?e.items.indexOf(i):-1;return -1===a||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=iJ(e,e=>[...e,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=iJ(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}}},i0=(0,R.createContext)(null);function i1(e){let t=(0,R.useContext)(i0);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,i1),t}return t}function i2(e,t){return(0,rW.E)(t.type,iX,e,t)}i0.displayName="MenuContext";let i4=R.Fragment,i5=rQ.AN.RenderStrategy|rQ.AN.Static,i3=R.Fragment,i6=Object.assign((0,rQ.yV)(function(e,t){let{__demoMode:n=!1,...r}=e,i=(0,R.useReducer)(i2,{__demoMode:n,menuState:n?0:1,buttonRef:(0,R.createRef)(),itemsRef:(0,R.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:a,itemsRef:o,buttonRef:s},l]=i,u=(0,rU.T)(t);il([s,o],(e,t)=>{var n;l({type:1}),(0,io.sP)(t,io.tJ.Loose)||(e.preventDefault(),null==(n=s.current)||n.focus())},0===a);let c=(0,rZ.z)(()=>{l({type:1})}),d=(0,R.useMemo)(()=>({open:0===a,close:c}),[a,c]);return R.createElement(i0.Provider,{value:i},R.createElement(rK,{value:(0,rW.E)(a,{0:rB.Open,1:rB.Closed})},(0,rQ.sY)({ourProps:{ref:u},theirProps:r,slot:d,defaultTag:i4,name:"Menu"})))}),{Button:(0,rQ.yV)(function(e,t){var n;let r=(0,ia.M)(),{id:i="headlessui-menu-button-".concat(r),...a}=e,[o,s]=i1("Menu.Button"),l=(0,rU.T)(o.buttonRef,t),u=rM(),c=(0,rZ.z)(e=>{switch(e.key){case ik.R.Space:case ik.R.Enter:case ik.R.ArrowDown:e.preventDefault(),e.stopPropagation(),s({type:0}),u.nextFrame(()=>s({type:2,focus:iv.First}));break;case ik.R.ArrowUp:e.preventDefault(),e.stopPropagation(),s({type:0}),u.nextFrame(()=>s({type:2,focus:iv.Last}))}}),d=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),f=(0,rZ.z)(t=>{if(ig(t.currentTarget))return t.preventDefault();e.disabled||(0===o.menuState?(s({type:1}),u.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(t.preventDefault(),s({type:0})))}),h=(0,R.useMemo)(()=>({open:0===o.menuState}),[o]),p={ref:l,id:i,type:(0,iu.f)(e,o.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=o.itemsRef.current)?void 0:n.id,"aria-expanded":0===o.menuState,onKeyDown:c,onKeyUp:d,onClick:f};return(0,rQ.sY)({ourProps:p,theirProps:a,slot:h,defaultTag:"button",name:"Menu.Button"})}),Items:(0,rQ.yV)(function(e,t){var n,r;let i=(0,ia.M)(),{id:a="headlessui-menu-items-".concat(i),...o}=e,[s,l]=i1("Menu.Items"),u=(0,rU.T)(s.itemsRef,t),c=function(){for(var e=arguments.length,t=Array(e),n=0;n(0,iw.r)(...t),[...t])}(s.itemsRef),d=rM(),f=rq(),h=null!==f?(f&rB.Open)===rB.Open:0===s.menuState;(0,R.useEffect)(()=>{let e=s.itemsRef.current;e&&0===s.menuState&&e!==(null==c?void 0:c.activeElement)&&e.focus({preventScroll:!0})},[s.menuState,s.itemsRef,c]),function(e){let{container:t,accept:n,walk:r,enabled:i=!0}=e,a=(0,R.useRef)(n),o=(0,R.useRef)(r);(0,R.useEffect)(()=>{a.current=n,o.current=r},[n,r]),(0,rF.e)(()=>{if(!t||!i)return;let e=(0,iw.r)(t);if(!e)return;let n=a.current,r=o.current,s=Object.assign(e=>n(e),{acceptNode:n}),l=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)r(l.currentNode)},[t,i,a,o])}({container:s.itemsRef.current,enabled:0===s.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let p=(0,rZ.z)(e=>{var t,n;switch(d.dispose(),e.key){case ik.R.Space:if(""!==s.searchQuery)return e.preventDefault(),e.stopPropagation(),l({type:3,value:e.key});case ik.R.Enter:if(e.preventDefault(),e.stopPropagation(),l({type:1}),null!==s.activeItemIndex){let{dataRef:e}=s.items[s.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}(0,io.wI)(s.buttonRef.current);break;case ik.R.ArrowDown:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Next});case ik.R.ArrowUp:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Previous});case ik.R.Home:case ik.R.PageUp:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.First});case ik.R.End:case ik.R.PageDown:return e.preventDefault(),e.stopPropagation(),l({type:2,focus:iv.Last});case ik.R.Escape:e.preventDefault(),e.stopPropagation(),l({type:1}),(0,rP.k)().nextFrame(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})});break;case ik.R.Tab:e.preventDefault(),e.stopPropagation(),l({type:1}),(0,rP.k)().nextFrame(()=>{(0,io.EO)(s.buttonRef.current,e.shiftKey?io.TO.Previous:io.TO.Next)});break;default:1===e.key.length&&(l({type:3,value:e.key}),d.setTimeout(()=>l({type:4}),350))}}),m=(0,rZ.z)(e=>{e.key===ik.R.Space&&e.preventDefault()}),x=(0,R.useMemo)(()=>({open:0===s.menuState}),[s]),g={"aria-activedescendant":null===s.activeItemIndex||null==(n=s.items[s.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=s.buttonRef.current)?void 0:r.id,id:a,onKeyDown:p,onKeyUp:m,role:"menu",tabIndex:0,ref:u};return(0,rQ.sY)({ourProps:g,theirProps:o,slot:x,defaultTag:"div",features:i5,visible:h,name:"Menu.Items"})}),Item:(0,rQ.yV)(function(e,t){let n=(0,ia.M)(),{id:r="headlessui-menu-item-".concat(n),disabled:i=!1,...a}=e,[o,s]=i1("Menu.Item"),l=null!==o.activeItemIndex&&o.items[o.activeItemIndex].id===r,u=(0,R.useRef)(null),c=(0,rU.T)(t,u);(0,rF.e)(()=>{if(o.__demoMode||0!==o.menuState||!l||0===o.activationTrigger)return;let e=(0,rP.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[o.__demoMode,u,l,o.menuState,o.activationTrigger,o.activeItemIndex]);let d=ih(u),f=(0,R.useRef)({disabled:i,domRef:u,get textValue(){return d()}});(0,rF.e)(()=>{f.current.disabled=i},[f,i]),(0,rF.e)(()=>(s({type:5,id:r,dataRef:f}),()=>s({type:6,id:r})),[f,r]);let h=(0,rZ.z)(()=>{s({type:1})}),p=(0,rZ.z)(e=>{if(i)return e.preventDefault();s({type:1}),(0,io.wI)(o.buttonRef.current)}),m=(0,rZ.z)(()=>{if(i)return s({type:2,focus:iv.Nothing});s({type:2,focus:iv.Specific,id:r})}),x=im(),g=(0,rZ.z)(e=>x.update(e)),v=(0,rZ.z)(e=>{x.wasMoved(e)&&(i||l||s({type:2,focus:iv.Specific,id:r,trigger:0}))}),y=(0,rZ.z)(e=>{x.wasMoved(e)&&(i||l&&s({type:2,focus:iv.Nothing}))}),b=(0,R.useMemo)(()=>({active:l,disabled:i,close:h}),[l,i,h]);return(0,rQ.sY)({ourProps:{id:r,ref:c,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,disabled:void 0,onClick:p,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:v,onMouseMove:v,onPointerLeave:y,onMouseLeave:y},theirProps:a,slot:b,defaultTag:i3,name:"Menu.Item"})})}),i7=e=>"object"==typeof e&&null!=e&&1===e.nodeType,i9=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,i8=(e,t)=>{if(e.clientHeight{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightat||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0,at=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},an=(e,t)=>{var n,r,i,a;if("undefined"==typeof document)return[];let{scrollMode:o,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!i7(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,h=[],p=e;for(;i7(p)&&d(p);){if((p=at(p))===f){h.push(p);break}null!=p&&p===document.body&&i8(p)&&!i8(document.documentElement)||null!=p&&i8(p,c)&&h.push(p)}let m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,x=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:g,scrollY:v}=window,{height:y,width:b,top:w,right:k,bottom:_,left:j}=e.getBoundingClientRect(),{top:E,right:O,bottom:T,left:C}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),S="start"===s||"nearest"===s?w-E:"end"===s?_+T:w+y/2-E+T,N="center"===l?j+b/2-C+O:"end"===l?k+O:j-C,R=[];for(let e=0;e=0&&j>=0&&_<=x&&k<=m&&w>=i&&_<=u&&j>=c&&k<=a)break;let d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),E=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10),C=0,I=0,A="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-O:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-E-T:0,P="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,M="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)C="start"===s?S:"end"===s?S-x:"nearest"===s?ae(v,v+x,x,E,T,v+S,v+S+y,y):S-x/2,I="start"===l?N:"center"===l?N-m/2:"end"===l?N-m:ae(g,g+m,m,p,O,g+N,g+N+b,b),C=Math.max(0,C+v),I=Math.max(0,I+g);else{C="start"===s?S-i-E:"end"===s?S-u+T+L:"nearest"===s?ae(i,u,n,E,T+L,S,S+y,y):S-(i+n/2)+L/2,I="start"===l?N-c-p:"center"===l?N-(c+r/2)+A/2:"end"===l?N-a+O+A:ae(c,a,r,p,O+A,N,N+b,b);let{scrollLeft:e,scrollTop:o}=t;C=0===M?0:Math.max(0,Math.min(o+C/M,t.scrollHeight-n/M+L)),I=0===P?0:Math.max(0,Math.min(e+I/P,t.scrollWidth-r/P+A)),S+=o-C,N+=e-I}R.push({el:t,top:C,left:I})}return R},ar=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};function ai(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(an(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:a,left:o}of an(e,ar(t))){let e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var aa=n(6826),ao=n.n(aa);/** * @name match-sorter * @license MIT license. * @copyright (c) 2020 Kent C. Dodds diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index 9009965..dc4599c 100644 --- a/_next/static/chunks/nextra-data-en-US.json +++ b/_next/static/chunks/nextra-data-en-US.json @@ -1 +1 @@ -{"/developer/advance":{"title":"Creating the Core","data":{"":"The index.ts file is the heart of your bot. It serves as the entry point for your application, initializing and configuring the bot to connect to Discord and start responding to events and commands.","project-structure#Project Structure":"Now, inside the src directory, add a file named index.ts.","creating-indexts#Creating index.ts":"This is the main file, or we can say the core file, of the bot.\nimport { Client, Collection, GatewayIntentBits } from 'discord.js'\nimport { ExtendedClient } from './interfaces/ExtendedClient'\nimport { logBrightPink } from 'nstypocolors'\nimport config from './configs/botConfig'\nimport { commandHandler } from './handlers/commandHandler'\nimport { eventHandlers } from './events/eventIndex'\nconst client = new Client({\n intents: [\n GatewayIntentBits.Guilds,\n GatewayIntentBits.GuildMessages,\n GatewayIntentBits.MessageContent,\n ],\n}) as ExtendedClient\nclient.slashCommands = new Collection()\nclient.messageCommands = new Collection()\nclient.events = new Collection()\ncommandHandler(client)\neventHandlers(client)\nclient\n .login(config.BOT_TOKEN)\n .then(() => logBrightPink('Successfully connected all the commands and the bot is online'))\n .catch((err: string) => console.error('Failed to login: ' + err))\nFeel free to customize this setup to suit your needs. You can add additional intents,\nconfigurations, or other settings to enhance the functionality of your bot.","verification#Verification":"Ensure that you have imported everything correctly and that you have defined your client properly.","run#Run":"Now open your terminal and enter:\nnpm run execute\nCongratualations, finally your app (bot) is online.","thank-you#Thank You":"Dont forget to give a star in github."}},"/developer/advance/introduction":{"title":"Getting Ended","data":{"":"So yeah, this is the last part — just a little more work, and we're done. Let's get started!","project-structure#Project Structure":"Our final structure should look like this:","before-clicking-the-run-button#Before Clicking the Run Button":"Guys, we're finally done! Now, you just need to add the main entry file, index.ts, and you're ready to click the run button.I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!"}},"/developer/advance/scripts":{"title":"Scripts","data":{"":"Before moving to the index.ts file, ensure that you have configured your scripts properly in the package.json file.","creating-scripts#Creating scripts":"Now, in the package.json file, add these scripts:\n\"scripts\": {\n \"test\": \"npx jest\",\n \"clean\": \"rimraf dist types\",\n \"build\": \"npx tsc\",\n \"format:check\": \"npx prettier . --check\",\n \"format:write\": \"npx prettier . --write\",\n \"deploy\": \"node dist/utils/deployCommands.js\",\n \"start\": \"node dist/index.js\",\n \"execute\": \"npm run clean && npm run build && npm run format:write && npm run start\",\n \"cleanStart\": \"npm run clean && npm run build && npm run start\",\n \"noCleanStart\": \"npm run build && npm run start\",\n \"lint\": \"eslint 'src/**/*.{ts,tsx}'\",\n \"lint:fix\": \"eslint 'src/**/*.{ts,tsx}' --fix\"\n },\nYou can add more scripts as needed.\nAlright, let's move to the last part."}},"/developer/codeFormatters":{"title":"Codeformatters","data":{"code-formatting#Code Formatting":"Now let's set up our code formatting styles by using some popular libraries!","installing-prettier#Installing Prettier":"This is a very popular code formatting library. Here are the required configurations for our Discord app project!\nnpm install --save-dev --save-exact prettier\nThen, create an empty config file to let editors and other tools know you are using Prettier:\nnode --eval \"fs.writeFileSync('.prettierrc','{}\\n')\"\nNow, add this configurations:\n{\n \"printWidth\": 100,\n \"semi\": false,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"tabWidth\": 2,\n \"useTabs\": false,\n \"arrowParens\": \"avoid\"\n}\nYou can add more formatting configurations like this!","installing-eslint#Installing Eslint":"ESLint is also a very good library, so we will use this library too! Here are the ESLint configurations as per Discord.js!\nnpm install --save-dev eslint\nNow, create .eslintrc and add your rules:\nnsCore config.\n{\n \"env\": {\n \"browser\": false,\n \"node\": true,\n \"es2021\": true\n },\n \"parser\": \"@typescript-eslint/parser\",\n \"parserOptions\": {\n \"ecmaVersion\": 12,\n \"sourceType\": \"module\"\n },\n \"plugins\": [\"@typescript-eslint\"],\n \"extends\": [\n \"eslint:recommended\",\n ],\n \"rules\": {\n \"no-console\": \"off\"\n }\n }\ndiscord.js config.\n{\n\"extends\": \"eslint:recommended\",\n\"env\": {\n \"node\": true,\n \"es6\": true\n},\n\"parserOptions\": {\n \"ecmaVersion\": 2021\n},\n\"rules\": {\n \"arrow-spacing\": [\"warn\", { \"before\": true, \"after\": true }],\n \"brace-style\": [\"error\", \"stroustrup\", { \"allowSingleLine\": true }],\n \"comma-dangle\": [\"error\", \"always-multiline\"],\n \"comma-spacing\": \"error\",\n \"comma-style\": \"error\",\n \"curly\": [\"error\", \"multi-line\", \"consistent\"],\n \"dot-location\": [\"error\", \"property\"],\n \"handle-callback-err\": \"off\",\n \"indent\": [\"error\", \"tab\"],\n \"keyword-spacing\": \"error\",\n \"max-nested-callbacks\": [\"error\", { \"max\": 4 }],\n \"max-statements-per-line\": [\"error\", { \"max\": 2 }],\n \"no-console\": \"off\",\n \"no-empty-function\": \"error\",\n \"no-floating-decimal\": \"error\",\n \"no-inline-comments\": \"error\",\n \"no-lonely-if\": \"error\",\n \"no-multi-spaces\": \"error\",\n \"no-multiple-empty-lines\": [\"error\", { \"max\": 2, \"maxEOF\": 1, \"maxBOF\": 0 }],\n \"no-shadow\": [\"error\", { \"allow\": [\"err\", \"resolve\", \"reject\"] }],\n \"no-trailing-spaces\": [\"error\"],\n \"no-var\": \"error\",\n \"object-curly-spacing\": [\"error\", \"always\"],\n \"prefer-const\": \"error\",\n \"quotes\": [\"error\", \"single\"],\n \"semi\": [\"error\", \"always\"],\n \"space-before-blocks\": \"error\",\n \"space-before-function-paren\": [\"error\", {\n \t\"anonymous\": \"never\",\n \t\"named\": \"never\",\n \t\"asyncArrow\": \"always\"\n }],\n \"space-in-parens\": \"error\",\n \"space-infix-ops\": \"error\",\n \"space-unary-ops\": \"error\",\n \"spaced-comment\": \"error\",\n \"yoda\": \"error\"\n}\n}","plugings#Plugings":"Since we are using ESLint with Prettier, it's beneficial to use a plugin for better integration. To set up plugins, install the necessary dependencies first:\nnpm i eslint-plugin-prettier\nAdd the Prettier plugin to your ESLint configuration in .eslintrc:\n{\n \"env\": {\n \"browser\": false,\n \"node\": true,\n \"es2021\": true\n },\n \"parser\": \"@typescript-eslint/parser\",\n \"parserOptions\": {\n \"ecmaVersion\": 12,\n \"sourceType\": \"module\"\n },\n \"plugins\": [\"@typescript-eslint\"],\n \"extends\": [\n \"eslint:recommended\",\n \"plugin:@typescript-eslint/recommended\",\n \"plugin:node/recommended\",\n \"prettier\"\n ],\n \"rules\": {\n \"no-console\": \"off\",\n \"node/no-unsupported-features/es-syntax\": [\n \"error\",\n {\n \"ignores\": [\"modules\"]\n }\n ],\n \"@typescript-eslint/no-unused-vars\": [\"error\", { \"argsIgnorePattern\": \"^_\" }],\n \"@typescript-eslint/explicit-module-boundary-types\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/ban-ts-comment\": \"off\"\n }\n}\nYou can find a list of all of ESLint's rules on their\nwebsite.\nThis configuration extends the core vitals for the app and includes the recommended settings for Prettier, ensuring that ESLint and Prettier work together seamlessly.Alright, we're all set! Now we can proceed further."}},"/developer/commandSetup":{"title":"Getting Started","data":{"":"In a Discord bot, commands are instructions given by users to the bot to perform specific actions or tasks. These commands can be typed directly into the chat by users, triggering the bot to execute a predefined function. Commands are a fundamental part of bot interaction, enabling users to control the bot and retrieve information or perform actions within a server. There are primarily two types of commands: message commands and slash commands.","project-structure#Project Structure":"To organize your commands efficiently, we'll set up a structured project directory. This helps in maintaining a clean codebase and makes it easier to manage different types of commands.","command-types#Command Types":"Our app supports both types of commands:\nMessage Commands: These are traditional commands that users type in chat, usually prefixed with a character like ! or ?. For example, !help or !ping.\nSlash Commands: These are the newer type of commands introduced by Discord. Users can type / followed by the command name, and Discord will present an interface to help users complete the command. Its also known as Interaction Command\nNow let's move ahead!"}},"/developer/commandSetup/messageCommands":{"title":"Message Commands","data":{"":"Message commands are traditional commands in Discord bots that users type directly into the chat. These commands are typically prefixed with a specific character (like !, ?, or any custom prefix you choose). When the bot detects a message starting with this prefix, it processes the command and executes the corresponding function. Message commands are straightforward and easy to use, making them a popular choice for many bot functionalities.","project-structure#Project Structure":"First, create a folder named commands inside the src folder. Then, inside the commands folder, create another folder named messageCommands. Inside this messageCommands folder, create a folder named general. Finally, inside the general folder, add a file named ping.ts\nOur message command structure is organized into subdirectories, allowing for better code\nmanagement and customization.","create-ping-command#Create Ping Command":"Let's create a basic ping command to demonstrate how message commands work. This command will respond with \"Pong!\" when a user types !ping.\nimport { EmbedBuilder, Message } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { MessageCommand } from '../../../interfaces/Command'\nconst ping: MessageCommand = {\n name: 'ping',\n description: 'Replies with Ping!',\n async executeMessage(message: Message) {\n const pingEmbed = new EmbedBuilder()\n .setColor(COLORS.green)\n .setTitle('ping Command')\n .setDescription(`${EMOJIS.success} Ping pong ping`)\n await message.channel.send({ embeds: [pingEmbed] })\n },\n userPermissions: ['SendMessages'],\n botPermissions: ['SendMessages'],\n devOnly: false,\n}\nexport default ping\nFor example purposes, I have used this ! prefix. However, in reality, this configuration comes\ninto effect whenever the prefix is enabled. Remember, we have already set up our prefix inside\nthe messageCreate event file inside the events\nfolder, so now all these components are interconnected. We have imported constants from the\nconstants folder and interfaces from the interfaces folder. Ensure that all the imports are\ncorrect and properly configured.","message-command-structure#Message Command Structure":"Now here are the example of the command structure make sure all of your message command will follow this structure.\nimport { EmbedBuilder, Message } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { MessageCommand } from '../../../interfaces/Command'\nconst string: MessageCommand = {\n name: string,\n description: string,\n async executeMessage(message: Message) {\n const stringEmbed = new EmbedBuilder()\n .setColor(COLORS.name)\n .setTitle(string)\n .setDescription(string)\n await message.channel.send({ embeds: [string] })\n },\n userPermissions: [''],\n botPermissions: [''],\n devOnly: false / true,\n}\nexport default string\nNow, in the blank spaces, you can add whatever you want. Feel free to modify this command\nstructure to suit your needs.","developer-command#Developer Command":"The Developer Command is a type of command that is restricted to developers only. To enable a command as a Developer Command, you simply need to set the devOnly property to true.\nAlright, now let's go further!"}},"/developer/commandSetup/slashCommands":{"title":"Slash Commands","data":{"":"Slash commands, also known as interaction commands, are a newer feature introduced by Discord that provide a more streamlined and user-friendly way for users to interact with bots. Unlike message commands, slash commands are invoked by typing / followed by the command name directly into the chat input box.","project-structure#Project Structure":"Now that we've already created the commands folder, let's add a folder named slashCommands inside it. Then, within the slashCommands folder, add another folder named general. Finally, inside the general folder, add ping.ts.\nOur slash command structure is organized similarly to message commands, allowing for efficient\ncode management and customization.","create-ping-command#Create Ping Command":"Let's create a basic ping slash command to demonstrate how slash commands work. This command will respond with \"Pong!\" when invoked by the user.\nimport { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { SlashCommand } from '../../../interfaces/Command'\nconst Ping: SlashCommand = {\n name: 'ping',\n description: 'Replies with pong!',\n data: new SlashCommandBuilder().setName('pong').setDescription('Replies with pong!'),\n async executeSlash(interaction: CommandInteraction) {\n const pEmbed = new EmbedBuilder()\n .setColor(COLORS.green)\n .setTitle('ping Command')\n .setDescription(`${EMOJIS.success} pong there, I am Ping`)\n await interaction.reply({ embeds: [PingEmbed] })\n },\n userPermissions: ['SendMessages'],\n botPermissions: ['SendMessages'],\n devOnly: false,\n}\nexport default Ping\nSlash command with 100% potential is under development this structure is come with 90% potential\nonly. We are trying our best to acquire the 10% potential also.","slash-command-structure#Slash Command Structure":"Here is an example of the structure of a slash command:\nimport { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { SlashCommand } from '../../../interfaces/Command'\nconst string: SlashCommand = {\n name: string,\n description: string',\n data: new SlashCommandBuilder().setName(string).setDescription(string),\n async executeSlash(interaction: CommandInteraction) {\n const stringEmbed = new EmbedBuilder()\n .setColor(COLORS.name)\n .setTitle(string)\n .setDescription(string)\n await interaction.reply({ embeds: [string] })\n },\n userPermissions: [''],\n botPermissions: [''],\n devOnly: false/true,\n}\nexport default string\nWe did not include any type of developer commands in Slash Commands. However, our command\nhandler and event handler are well-structured and capable of handling both regular and\ndeveloper commands. If you want to include a developer command in Slash Commands, you simply\nneed to set the devOnly property to true. There's no need to add anything extra because our\nhandlers are perfectly equipped to handle it.\nAlright! Go go ahead."}},"/developer/config&const":{"title":"Getting Started","data":{"":"So, we've mostly completed all our work outside the src directory. Now it's time to enter the src directory, where things will get a bit more complex. It's better to begin with the blueprint of the project structure!","project-structure#Project Structure":"Here is the basic project structure that nsCore will look like:\nnsCore/\n├── node_modules/\n├── src/\n├── .env\n├── .eslintrc\n├── .eslintignore\n├── .prettierrc\n├── .prettierignore\n├── .gitignore\n├── package.json\n├── package-lock.json\n├── tsconfig.json\nNow we have to create each folder and component separately, so let's begin!"}},"/developer/eventSetup/centralize":{"title":"Centralize Handler","data":{"":"Now, we have to create a entralized function, to export and import our events, this makes a better and easier way to export events.","project-structure#Project Structure":"Add an eventIndex.ts file inside the event folder.","add-eventindexts#Add eventIndex.ts":"This is our centralize handler code:\nimport { registerReadyEvent } from './client/ready'\nimport { eventHandlerInteraction } from './client/interactionCreate'\nimport { eventHandlerMessage } from './client/messageCreate'\nimport { ExtendedClient } from '../interfaces/ExtendedClient'\nexport function eventHandlers(client: ExtendedClient) {\n registerReadyEvent(client)\n eventHandlerInteraction(client)\n eventHandlerMessage(client)\n}\nYou can add more functions like this to centralize event handling.","verification#Verification":"Ensure you have imported everything correctly.\nAlright, lets move ahead,"}},"/developer/eventSetup":{"title":"Introduction","data":{"":"This section will cover the event handling part, which is a fundamental concept of a Discord bot.","project-structure#Project Structure":"To efficiently handle events in our Discord bot, we'll structure our project in a way that separates different responsibilities. Below is an example project structure focusing on event handling:","type-of-events#Type of events":"Discord has various types of events; however, the main three events required to run an app are:\nready event\nmessageCreate event\ninteractionCreate event\nYou can learn about more events from discord.js\nevents.\nNow let's understand these events one by one! So, let's go!"}},"/developer/gettingStarted":{"title":"Getting Started","data":{"":"Lets dive into the ocean of discord app development.","installation#Installation":"To install Node.js, visit the official Node.js website and download the installer for your operating system. Follow the installation instructions provided by the installer.Once Node.js is installed, you'll have access to npm, which is used to install packages and manage dependencies for your Node.js projects.","initiating-a-project-folder#Initiating a Project Folder":"To initiate a new project folder, open your terminal or command prompt and navigate to the directory where you want to create your project. Then, run the following command:\nmkdir nscore\ncd nscore\nI am not including the steps to create a Discord app (bot) or setting up Node.js. If you are\nunfamiliar with these processes, please refer to the Discord.js\ndocumentation.","installation-1#Installation":"Now, let's install Discord.js, which is a powerful library for interacting with the Discord API.\nnpm install discord.js\nThis command will download and install Discord.js and all its dependencies into your project folder. Once the installation is complete, you're ready to start building your Discord bot using Discord.js!All set! Now we are ready to go further!"}},"/developer/handlerSetup/error":{"title":"Error Handler","data":{"":"An error handler in a Discord bot is essential for managing and responding to errors that occur during the bot's operation. This includes handling exceptions that may arise from command execution, API calls, or other unexpected events. An effective error handler helps in maintaining the stability and reliability of the bot by gracefully managing errors and providing useful feedback to users and developers.","project-structure#Project Structure":"Add errorHandler.ts inside the handlers folder.","create-errorhandlerts#Create errorHandler.ts":"This file will contain the logic of the error handler, ensuring that any errors encountered during the bot's execution are properly managed and logged.\nDocs for this part is under construction.\nAlright, we have completed more than half now let's go further!"}},"/developer/handlerSetup":{"title":"Introduction","data":{"":"Handlers in a Discord bot are essential components that manage different aspects of the bot's functionality. They are responsible for organizing and processing specific types of events or actions, such as commands, errors, and other interactions. By using handlers, you can keep your code modular, clean, and maintainable. Handlers help in separating different concerns, making the bot easier to debug, extend, and manage.","project-structure#Project Structure":"An overview of our project structure","types#Types":"For this project, we are going to use:\ncommandHandler for handling commands\nerrorHandler for handling errors\nSo, let's go!"}},"/developer/ignoringFiles":{"title":"Ignoring Files","data":{"":"It's time to create the necessary ignore files to prevent certain files from being uploaded to GitHub!","git-ignore#Git Ignore":"Let's create a .gitignore file:\n# Node.js\nnode_modules/\ndist/\n# TypeScript\n*.tsbuildinfo\n# Logs\n*.log\n# Testing and coverage\ncoverage/\n*.test.js\n# IDE-specific files\n.vscode/\n.idea/\n*.sublime-project\n*.sublime-workspace\n# OS-specific files\n.DS_Store\nThumbs.db\nehthumbs.db\ndesktop.ini\n# Environment variables\n.env\n# Miscellaneous\n!.gitignore\nDon't forget to include your .env file.","prettier-ignore#Prettier Ignore":"Let's create a .prettierignore file:\n# Ignore artifacts:\nbuild\ncoverage\nnode_modules\n.next","eslint-ignore#Eslint Ignore":"Also, its better to keep an .eslintignore file:\n# Ignore artifacts:\nbuild/\ncoverage/\nnode_modules/\n# Ignore specific files:\ndist/\nAlright, we have successfully created our ignore files. Now we can go ahead!"}},"/developer/interfaceSetup/command":{"title":"Command Interface","data":{"":"The Command Interface is a structure that defines how commands should be organized and managed within your Discord bot. By creating a command interface, you ensure that each command follows a consistent format, making it easier to manage and execute commands. This can include defining properties like the command name, description, execute function, and any required permissions.","project-structure#Project Structure":"As you know we already have created the interfaces folder so now just add Command.ts inside the interfaces folder.","create-commandinterfacets#Create CommandInterface.ts":"Defining a command interface helps ensure consistency and ease of management for all commands.\nimport {\n ChatInputCommandInteraction,\n Message,\n PermissionResolvable,\n SlashCommandSubcommandsOnlyBuilder,\n} from 'discord.js'\nimport { SlashCommandBuilder } from '@discordjs/builders'\nimport { ExtendedClient } from './ExtendedClient'\nexport interface SlashCommand {\n name: string\n description?: string\n data:\n | SlashCommandBuilder\n | Omit\n | SlashCommandSubcommandsOnlyBuilder\n executeSlash: (interaction: ChatInputCommandInteraction, client: ExtendedClient) => Promise\n userPermissions?: PermissionResolvable[]\n botPermissions?: PermissionResolvable[]\n devOnly?: boolean\n}\nexport interface MessageCommand {\n name: string\n description?: string\n executeMessage: (message: Message, args: string[], client: ExtendedClient) => Promise\n userPermissions?: PermissionResolvable[]\n botPermissions?: PermissionResolvable[]\n devOnly?: boolean\n}\nexport interface Command extends SlashCommand, MessageCommand {}\nEnsure that all commands adhere to the defined interface for smooth operation.\nAlright, now let's move ahead!"}},"/developer/interfaceSetup/extendedClient":{"title":"Extended Client","data":{"":"The Extended Client refers to an enhanced version of the standard Discord client provided by the discord.js library. By extending the base client, we can add custom properties and methods that are specific to our bot's needs. This could include additional configurations, utility functions, or other custom features that the standard client does not provide.","project-structure#Project Structure":"First, create a folder named interfaces inside the src directory. Inside this interfaces folder, create a file named ExtendedClient.ts. This files will hold the constants for your project.","create-extendedclientts#Create ExtendedClient.ts":"You can extend your client as you want!\nimport { Client, Collection } from 'discord.js'\nimport { Command } from './Command'\nexport interface ExtendedClient extends Client {\n events: Collection void>\n messageCommands: Collection\n slashCommands: Collection\n}\nAlright, now let's move ahead!"}},"/developer/interfaceSetup":{"title":"Getting Started","data":{"":"Let's start creating our interfaces!Interfaces in TypeScript define the structure of an object. They specify the types and the properties that an object should have. For a Discord bot, interfaces can help ensure that the objects we use, such as configurations, commands, and clients, adhere to the expected structure, which can prevent errors and improve code quality.","project-structure#Project Structure":"","necessary-interfaces#Necessary Interfaces":"For this project we will use only:\nExtendedClient interface\nCommand interface\nYou can setup more interfaces as of your need.\nNow we can go ahead!"}},"/developer/settings":{"title":"Settings","data":{"":"In this part, we will add our environmental variables and TypeScript configurations!","setting-up-tsconfigjson#Setting up tsconfig.json":"Now we have to set up the TypeScript configuration for compiling our TypeScript code into JavaScript!\n{\n \"compilerOptions\": {\n \"target\": \"es2017\",\n \"module\": \"commonjs\",\n \"strict\": true,\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"outDir\": \"./dist\",\n \"rootDir\": \"./src\",\n \"sourceMap\": true,\n \"declaration\": true,\n \"declarationDir\": \"./types\"\n },\n \"include\": [\"src/**/*\"],\n \"exclude\": [\"node_modules\", \"dist\"]\n}\nYou can add more compiler options from here","setting-up-env#Setting up .env":"Now, this part is very crucial. Here we will set up our environmental variables, such as the app ID, client ID, etc.\nNever include your .env variables to public, Make sure you have put this on your git ignore\nfile.\nSo here is the setup needed for our Discord app project!Fisrt install dotenv\nnpm i dotenv\nThen add an .env file out of your src directory!\n AUTH_TOKEN=YOUR-DISCORD-BOT-TOKEN\n CLIENT_ID=YOUR-DISCORD-BOT-ID\n DEVELOPER_IDS=YOUR-DISCORD-ID\n SERVER_ID=YOUR-DEV-SERVER-ID\n ERROR_CHANNEL_ID=YOUR-ERROR-CHANNEL-ID\nOkay, now our basic configuration setup is done!"}},"/developer/utilSetup/deployCommand":{"title":"Deploy Function","data":{"":"The deploy function in a Discord bot is crucial for registering and updating slash commands with Discord's API. This function ensures that the bot's commands are correctly deployed to either a specific server (guild) or globally across all servers. By using a deploy function, you can dynamically manage and update the bot's commands without manually configuring each command.","project-structure#Project Structure":"Now, simply add a deploy.ts file inside the utils folder.","creating-deployts#Creating deploy.ts":"Here is the logic for the deploy function:\nimport { REST, Routes, SlashCommandBuilder } from 'discord.js'\nimport { readdirSync, statSync } from 'fs'\nimport { join, extname } from 'path'\nimport { logger } from './logger'\nimport config from '../configs/botConfig'\ninterface SlashCommandJSON {\n name: string\n description: string\n options?: Array\n}\nconst includeDirectories = ['commands/slashCommands/general', 'commands/slashCommands/info']\nconst loadSlashCommands = (dirs: string[]): Promise => {\n return new Promise((resolve, reject) => {\n const commands: SlashCommandJSON[] = []\n const loadCommandsFromDir = async (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n await loadCommandsFromDir(filePath)\n } else if (extname(file) === '.ts' || extname(file) === '.js') {\n const commandModule = await import(filePath)\n const command = commandModule.default\n if (command && command.data instanceof SlashCommandBuilder) {\n commands.push(command.data.toJSON())\n }\n }\n }\n }\n Promise.all(dirs.map(dir => loadCommandsFromDir(dir)))\n .then(() => resolve(commands))\n .catch(reject)\n })\n}\nconst absoluteIncludeDirectories = includeDirectories.map(dir => join(__dirname, '../', dir))\nloadSlashCommands(absoluteIncludeDirectories)\n .then(commands => {\n const rest = new REST({ version: '10' }).setToken(config.BOT_TOKEN!)\n logger.log('Started refreshing application (/) commands.')\n return rest.put(Routes.applicationCommands(config.BOT_ID!), { body: commands })\n })\n .then(() => {\n logger.log('Successfully reloaded application (/) commands.')\n })\n .catch(error => {\n if (error instanceof Error) {\n logger.error(`Error registering commands: ${error.message}`)\n } else {\n logger.error('Unknown error occurred while registering commands.')\n }\n })\nIn case of any error, please contact with me in my discord server","ensuring-env#Ensuring .env":"Ensure that your CLIENT_ID and SERVER_ID are correctly set in your .env file.Finally, we have successfully completed our utility functions."}},"/developer/utilSetup":{"title":"Getting Started","data":{"":"Utilities, or utils, are helper functions and reusable code snippets that make development easier by providing common functionality that can be used throughout the project. These can include functions for logging, data processing, formatting, and other repetitive tasks.","project-structure#Project Structure":"An overview of our project structure\nAlright, let's begin!"}},"/":{"title":"Introducing","data":{"":"Hey there, fellow creative developers! Welcome to the developer section of the nsCore app! I hope this guide will enhance your Discord app (bot) knowledge. So let's begin.","before-we-begin#Before We Begin":"If you don't know about TypeScript or JavaScript basics, please learn them first! At least, watch a one-shot video about them. Here I am leaving some links to some good YouTube channels. This is not sponsored by them!","best-for-learning-typescript#Best for learning TypeScript":"Complete Typescript in under 5 hours - Hitesh Choudhary\nTypeScript Tutorial for Beginners - Programming with Mosh\nLearn TypeScript in 50 Minutes - Academind\nTypeScript for Beginners - freeCodeCamp.org","best-for-learning-javascript#Best for learning JavaScript":"Javascript for beginners | chai aur #javascript - Chai aur Code\nIntroduction to JavaScript + Setup | JavaScript Tutorial in Hindi #1 - CodeWithHarry\nLearn JavaScript - Full Course for Beginners - freeCodeCamp.org\nJavaScript Full Course (2024) - Beginners to Pro - Shradha Khapra\nPlease note, now in\nDiscord\nbots are now referred to as apps. In this documentation, I have mentioned \"app\" (also referred to\nas \"bot\" in parentheses) so readers can understand.","quick-links#Quick links":"","thank-you#Thank You":"Thank you for believing in us and using our guide! I hope this will help you in your coding journey. Happy coding!"}},"/developer/config&const/configSetup":{"title":"Setting up Configurations","data":{"":"In this section we will configure our necessary configurations. so lets begin.","project-structure#Project Structure":"First, create a folder named configs inside the src directory. Inside this configs folder, create a file named botConfig.ts and metadata.ts. This files will hold the configuration settings for your project.","adding-env-configurations#Adding .env Configurations":"Now, remember that we have created an .env file. We cannot implement this .env file directly into our project. Instead, we will use a configuration system to integrate these environment variables via our config file.\nYou can directly import your .env variables into your project, but it is a better approach to\nuse a configuration file. This provides a more reliable way to manage configurations and allows\nyou to define types, which is a main advantage of TypeScript.\nIn the botConfig.ts file, we will add our configurations:\nimport dotenv from 'dotenv'\ndotenv.config()\ninterface BotConfig {\n BOT_TOKEN: string\n BOT_ID: string\n SERVER_ID: string\n DEVELOPER_IDS: string[]\n ERROR_CHANNEL: string\n GATE_CHANNEL: string\n}\nconst config: BotConfig = {\n BOT_TOKEN: process.env.AUTH_TOKEN as string,\n BOT_ID: process.env.CLIENT_ID as string,\n SERVER_ID: process.env.SERVER_ID as string,\n DEVELOPER_IDS: (process.env.DEVELOPER_IDS || '').split(','),\n ERROR_CHANNEL: process.env.ERROR_CHANNEL_ID as string,\n GATE_CHANNEL: process.env.JOIN_GATE_CHANNEL_ID as string,\n}\nexport default config\nThis setup will load the environment variables from the .env file and make them available throughout your project.","adding-metadata#Adding Metadata":"In the metadata.ts file, we will add our prefix and name:\nAdd your app name and app prefix.\nexport const BOT = {\n PREFIX: 'ns.',\n NAME: 'nsCore',\n}\nThis file will help us to store our metadatas, which will be required in future also, you can more\nmetadatas as of your need.\nDone, successfully we have setted our configurations, lets move ahead."}},"/developer/config&const/constSetup":{"title":"Setting up Constants","data":{"":"In this section we will set our necessary const. so lets begin.","project-structure#Project Structure":"First, create a folder named constants inside the src directory. Inside this constants folder, create a file named botConst.ts. This files will hold the constants for your project.","adding-colors#Adding Colors":"Now we will add our colors for our app, this are the default colors for our app.In the botConst.ts file, we will add our colors:\nimport { ColorResolvable } from 'discord.js'\nexport const COLORS: { [key: string]: ColorResolvable } = {\n red: '#ff3b30',\n orange: '#ff9500',\n yellow: '#ffcc00',\n green: '#34c759',\n mint: '#00c7be',\n teal: '#30b0c7',\n cyan: '#32ade6',\n blue: '#007aff',\n indigo: '#5856d6',\n purple: '#af52de',\n pink: '#ff2d55',\n brown: '#a2845e',\n lightGray: '#aeaeb2',\n lightGrayMid: '#3a3a3c',\n grayMid: '#2c2c2e',\n darkGray: '#1c1c1e',\n} as const\nDone, now lets add emojis.","adding-emojis#Adding Emojis":"Now we will add our emojis, in the same file i.e botConst.ts add the emoji constants also:\nListen carefully: These emojis are specially created by nsCore Developers for the nsCore\napp. These emojis follow the color theme of the above colors. We highly suggest you use the same\nemojis that nsCore uses.\nexport const EMOJIS = {\n success: '<:success:1242828455964315750>',\n failed: '<:failed:1242828548297719898>',\n caution: '<:caution:1242828667718209637>',\n info: '<:info:1242828626311774320>',\n seen: '<:seen:1242828705768935575>',\n slash: '<:slash:1242828744171982900>',\n ts: '<:ts:1244152291364176002>',\n js: '<:js:1244152318207856672>',\n apps: '<:apps:1244153325075697724>',\n link: '<:links:1244153412199649300>',\n devlopers: '<:developers:1244271269701091480>',\n github: '<:github:1244270608754278463>',\n leaf: '<:leaf:1244270440701100093>',\n sparkles: '<:pearls:1244270698080501770>',\n sparklesd: '<:pearlsd:1244270768599339028>',\n vscode: '<:vscode:1244270888757629111>',\n bugs: '<:bugs:1244270990620627034>',\n message: '<:message:1244271071511838801>',\n id: '<:id:1244271770618564740>',\n inbox: '<:inbox:1244271719003193424>',\n colors: '<:colors:1244271646278422649>',\n members: '<:members:1244271591785758801>',\n home: '<:home:1244271538849579058>',\n globe: '<:globe:1244271487112970291>',\n creators: '<:creators:1244271212582928404>',\n heat: '<:heat:1244316740330979360>',\n permissions: '<:permissions:1244316852562427934>',\n tips: '<:tips:1244316790922678414>',\n username: '<:username:1244531006711664712>',\n server: '<:serverd:1244600141835403345>',\n channel: '<:channel:1244649126788988929>',\n badges: '<:badges:1244649060015673356>',\n seo: '<:seo:1244532163484057700>',\n crown: '<:crown:1244600088492507218>',\n fun: '<:fun:1244650971389235293>',\n roles: '<:roles:1244994437071896714>',\n al: '<:al:1245751475532070922>',\n ar: '<:ar:1245751409014472735>',\n} as const\nYou can use your own emojis, and if you wanted to use nsCore emojis, then contact with them in\ntheir server, here is the link.\nsuccessfully completed our constant section also, Now we can move ahead."}},"/developer/eventSetup/interactionCreate":{"title":"Interaction Create Event","data":{"":"The interactionCreate event in Discord.js is triggered whenever an interaction is created. This event is useful for handling various types of interactions such as slash commands, button clicks, and select menu selections. By listening to this event, you can execute specific code whenever a user interacts with your bot in these ways.","project-structure#Project Structure":"Now inside the client folder add our interactionCreate.ts file.","create-interactioncreatets#Create interactionCreate.ts":"Now, we have to write the logic for our interactionCreate event. This file will contain the logic that should be executed whenever a new interaction is created. Typically, you will check the type of interaction and then execute the corresponding action.\nThis interaction event handler comes with developer commands, bot permissions, and user permission\nchecks built-in.\nimport {\n ChatInputCommandInteraction,\n PermissionsBitField,\n Interaction,\n EmbedBuilder,\n GuildMember,\n} from 'discord.js'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { logger } from '../../utils/logger'\nimport config from '../../configs/botConfig'\nimport { COLORS, EMOJIS } from '../../constants/botConst'\nexport const eventHandlerInteraction = (client: ExtendedClient) => {\n client.on('interactionCreate', async (interaction: Interaction) => {\n if (!interaction.isCommand() || !interaction.guildId) return\n const commandName = interaction.commandName\n const command = client.slashCommands.get(commandName) // Use slashCommands collection\n if (!command) {\n logger.warn(`Command not found: ${commandName}`)\n return\n }\n if (\n command.userPermissions &&\n !(interaction.member?.permissions as Readonly)?.has(\n PermissionsBitField.resolve(command.userPermissions),\n )\n ) {\n const userPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('You cannot use this command!')\n .setDescription(\n `${EMOJIS.caution} You don't have the required permissions to use this commandz`,\n )\n .setTimestamp()\n await interaction.reply({ embeds: [userPermEmbed], ephemeral: true })\n return\n }\n const botMember = interaction.guild?.members.cache.get(client.user?.id || '') as GuildMember\n if (\n command.botPermissions &&\n !botMember.permissions.has(PermissionsBitField.resolve(command.botPermissions))\n ) {\n const botPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('I cannot use this command!')\n .setDescription(\n `${EMOJIS.caution} I don't have the required permissions to run this command`,\n )\n .setTimestamp()\n await interaction.reply({ embeds: [botPermEmbed], ephemeral: true })\n return\n }\n if (command.devOnly && !config.DEVELOPER_IDS.includes(interaction.user.id)) {\n const devOnlyEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('You cannot use this command!')\n .setDescription(`${EMOJIS.caution} This command is only for developers.`)\n .setTimestamp()\n await interaction.reply({ embeds: [devOnlyEmbed], ephemeral: true })\n return\n }\n try {\n await command.executeSlash(interaction as ChatInputCommandInteraction, client)\n } catch (error) {\n logger.error(`Error executing command: ${commandName} - ${error}`)\n console.log(error)\n const errorEmbed = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle('Oops!')\n .setDescription(`${EMOJIS.failed} There was an error trying to execute that command!`)\n .setTimestamp()\n await interaction.reply({ embeds: [errorEmbed], ephemeral: true })\n }\n })\n}\nYou can add more interactions, for example, context interactions and other Discord.js\ninteractions.\nDone, now let's go ahead!"}},"/developer/eventSetup/messageCreate":{"title":"Message Create Event","data":{"":"The messageCreate event in Discord.js is triggered whenever a new message is created in a text channel. This event is useful for building features such as command handling, automated responses, and various message-based interactions. By listening to this event, you can execute specific code whenever a user sends a message in your Discord server.","project-structure#Project Structure":"Now inside the client folder add our messageCreate.ts file","create-messagecreatets#Create messageCreate.ts":"Now, we have to write the logic for our message create event. This file will contain the logic that should be executed whenever a new message is created. Typically, you will check if the message starts with a command prefix and then execute the corresponding command.\nThis message event handler comes with developer commands, bot permissions, and user permission\nchecks built-in.\nimport { EmbedBuilder, Message, PermissionsBitField } from 'discord.js'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { logger } from '../../utils/logger'\nimport { BOT } from '../../configs/metadata'\nimport config from '../../configs/botConfig'\nimport { COLORS } from '../../constants/botConst'\nimport { EMOJIS } from '../../constants/botConst'\nexport const eventHandlerMessage = (client: ExtendedClient) => {\n client.on('messageCreate', async (message: Message) => {\n if (message.author.bot || !message.guild) return\n if (!message.content.startsWith(BOT.PREFIX)) return\n const args = message.content.slice(BOT.PREFIX.length).trim().split(/ +/g)\n const commandName = args.shift()?.toLowerCase()\n if (!commandName) return\n const command = client.messageCommands.get(commandName)\n if (!command) {\n logger.warn(`Command not found: ${commandName}`)\n const unknownCommand = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle(`You cannot use this command!`)\n .setDescription(`${EMOJIS.failed} There is no command like this`)\n .setTimestamp()\n return message.reply({ embeds: [unknownCommand] })\n }\n if (\n command.userPermissions &&\n !message.member?.permissions.has(PermissionsBitField.resolve(command.userPermissions))\n ) {\n const userPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`You cannot use this command!`)\n .setDescription(\n `${EMOJIS.caution} You don't have the required permissions to use this command`,\n )\n .setTimestamp()\n return message.reply({ embeds: [userPermEmbed] })\n }\n if (!client.user) {\n logger.error('Client user is null')\n return\n }\n if (\n command.botPermissions &&\n !message.guild.members.cache\n .get(client.user.id)\n ?.permissions.has(PermissionsBitField.resolve(command.botPermissions))\n ) {\n const botPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`I cannot use this command!`)\n .setDescription(\n `${EMOJIS.caution} I don't have the required permissions to run this command`,\n )\n .setTimestamp()\n return message.reply({ embeds: [botPermEmbed] })\n }\n if (command.devOnly && !config.DEVELOPER_IDS.includes(message.author.id)) {\n const devOnlyEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`You cannot use this command!`)\n .setDescription(`${EMOJIS.caution} This command is only for developers`)\n .setTimestamp()\n return message.reply({ embeds: [devOnlyEmbed] })\n }\n try {\n await command.executeMessage(message, args, client)\n } catch (error) {\n logger.error(`Error executing command: ${commandName}` + error)\n console.log(error)\n const eE = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle('Opps!')\n .setDescription(`${EMOJIS.failed} There was an error trying to run that command!`)\n await message.reply({ embeds: [eE] })\n }\n })\n}\nAt this moment, you may get some errors because we haven't created our logger function yet! For\nthe logger function, please refer to the logging guide.\nAlright we have done, now let's go further!"}},"/developer/eventSetup/ready":{"title":"Ready Event","data":{"":"The ready event in Discord.js is a crucial event that signifies when the bot has successfully connected to Discord and is ready to start receiving and responding to events. This event is triggered once, immediately after the bot logs in and establishes a connection with Discord's servers.","project-structure#Project Structure":"First, create a folder named events inside the src folder. Then create a client folder inside the events folder and add a file named ready.ts.","create-readyts#Create ready.ts":"Now we will write the logic for the ready event.\nimport { logPastelPink } from 'nstypocolors'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { ActivityType } from 'discord.js'\nimport { BOT } from '../../configs/metadata'\nexport const registerReadyEvent = (client: ExtendedClient) => {\n client.once('ready', () => {\n logPastelPink(`Successfully connected both Message & Slash clients ${client.user?.tag}!`)\n client.user?.setPresence({\n activities: [\n {\n name: `${BOT.PREFIX}help • ${client.user?.username}`,\n type: ActivityType.Custom,\n },\n ],\n status: 'online',\n })\n })\n}\nYou can customize this as you want. For more information, please visit the\nDiscord.js official\ndocumentation about the ready event and its types.","required-dependencies#Required Dependencies":"For this, you may have noticed that we have used the color library nstypocolors. Install nstypocolors via npm\nnpm i nstypocolors\nWe are highly suggested you to use nstypocolors only, dont use any other color libraries.\nAlright, we have done it! Now let's move ahead."}},"/developer/handlerSetup/cmd":{"title":"Command Handler","data":{"":"A command handler in a Discord bot is responsible for processing and executing commands received from users. It helps in organizing the command logic, making it easier to manage and extend. By using a command handler, you can separate the command definitions from the execution logic, ensuring that each command is handled appropriately based on the user's input.","project-structure#Project Structure":"Create a folder named handlers inside the src folder, and then create a file named commandHandler.ts.","create-commandhandlerts#Create commandHandler.ts":"This file will contain the logic of the command handler. It supports both message and interaction commands.\nimport { Collection } from 'discord.js'\nimport { readdirSync, statSync } from 'fs'\nimport { join } from 'path'\nimport { Command } from '../interfaces/Command'\nimport { ExtendedClient } from '../interfaces/ExtendedClient'\nimport { logger } from '../utils/logger'\nexport const commandHandler = (client: ExtendedClient) => {\n client.slashCommands = new Collection()\n client.messageCommands = new Collection()\n const loadSlashCommands = (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n loadSlashCommands(filePath)\n } else if (file.endsWith('.js') || file.endsWith('.ts')) {\n const command: Command = require(filePath).default\n if (typeof command.executeSlash === 'function') {\n client.slashCommands.set(command.name, command)\n logger.log(`Slash command loaded: ${command.name} from ${filePath}`)\n }\n }\n }\n }\n const loadMessageCommands = (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n loadMessageCommands(filePath)\n } else if (file.endsWith('.js') || file.endsWith('.ts')) {\n const command: Command = require(filePath).default\n if (typeof command.executeMessage === 'function') {\n client.messageCommands.set(command.name, command)\n logger.log(`Message command loaded: ${command.name} from ${filePath}`)\n } else {\n logger.error(\n `Message command ${command.name} does not have executeMessage function defined`,\n )\n }\n }\n }\n }\n loadSlashCommands(join(__dirname, '../commands/slashCommands'))\n loadMessageCommands(join(__dirname, '../commands/messageCommands'))\n logger.sLog('All commands loaded')\n client.slashCommands.forEach((command, name) => logger.log(`Loaded slash command: ${name}`))\n client.messageCommands.forEach((command, name) => logger.log(`Loaded message command: ${name}`))\n}","verification#Verification":"Ensure that your commands are correctly imported from your command interface.\nAlright, now let's go further!"}},"/developer/utilSetup/logger":{"title":"Logger Function","data":{"":"A logger function is used to record various types of messages and events that occur during the execution of an application. This can include error messages, informational messages, warnings, and debugging information. The primary advantage of using a logger function is to provide an easy way to track and monitor the application's behavior and performance. It helps in debugging, analyzing issues, and maintaining the application more effectively.","project-structure#Project Structure":"First, create a folder named utils, and inside this folder, create a file named logger.ts.","creating-loggerts#Creating logger.ts":"Now, here is the logic for logger.ts:\nHighly suggested to use nstypocolors only!\nimport { logPastelGreen, logPastelLavender, logPastelRed, logPastelYellow } from 'nstypocolors'\nexport const logger = {\n log: (message: string) => logPastelGreen(`[LOG] ${message}`),\n sLog: (message: string) => logPastelLavender(`[SUCCESS] ${message}`),\n warn: (message: string) => logPastelYellow(`[WARN] ${message}`),\n error: (message: string) => logPastelRed(`[ERROR] ${message}`),\n}\nYou can add more logging functions like this to enhance your application's functionality.\nThat's it! Now go ahead."}}} \ No newline at end of file +{"/developer/advance":{"title":"Creating the Core","data":{"":"The index.ts file is the heart of your bot. It serves as the entry point for your application, initializing and configuring the bot to connect to Discord and start responding to events and commands.","project-structure#Project Structure":"Now, inside the src directory, add a file named index.ts.","creating-indexts#Creating index.ts":"This is the main file, or we can say the core file, of the bot.\nimport { Client, Collection, GatewayIntentBits } from 'discord.js'\nimport { ExtendedClient } from './interfaces/ExtendedClient'\nimport { logBrightPink } from 'nstypocolors'\nimport config from './configs/botConfig'\nimport { commandHandler } from './handlers/commandHandler'\nimport { eventHandlers } from './events/eventIndex'\nconst client = new Client({\n intents: [\n GatewayIntentBits.Guilds,\n GatewayIntentBits.GuildMessages,\n GatewayIntentBits.MessageContent,\n ],\n}) as ExtendedClient\nclient.slashCommands = new Collection()\nclient.messageCommands = new Collection()\nclient.events = new Collection()\ncommandHandler(client)\neventHandlers(client)\nclient\n .login(config.BOT_TOKEN)\n .then(() => logBrightPink('Successfully connected all the commands and the bot is online'))\n .catch((err: string) => console.error('Failed to login: ' + err))\nFeel free to customize this setup to suit your needs. You can add additional intents,\nconfigurations, or other settings to enhance the functionality of your bot.","verification#Verification":"Ensure that you have imported everything correctly and that you have defined your client properly.","run#Run":"Now open your terminal and enter:\nnpm run execute\nCongratualations, finally your app (bot) is online.","thank-you#Thank You":"Dont forget to give a star in github."}},"/developer/advance/introduction":{"title":"Getting Ended","data":{"":"So yeah, this is the last part — just a little more work, and we're done. Let's get started!","project-structure#Project Structure":"Our final structure should look like this:","before-clicking-the-run-button#Before Clicking the Run Button":"Guys, we're finally done! Now, you just need to add the main entry file, index.ts, and you're ready to click the run button.I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!"}},"/developer/advance/scripts":{"title":"Scripts","data":{"":"Before moving to the index.ts file, ensure that you have configured your scripts properly in the package.json file.","creating-scripts#Creating scripts":"Now, in the package.json file, add these scripts:\n\"scripts\": {\n \"test\": \"npx jest\",\n \"clean\": \"rimraf dist types\",\n \"build\": \"npx tsc\",\n \"format:check\": \"npx prettier . --check\",\n \"format:write\": \"npx prettier . --write\",\n \"deploy\": \"node dist/utils/deployCommands.js\",\n \"start\": \"node dist/index.js\",\n \"execute\": \"npm run clean && npm run build && npm run format:write && npm run start\",\n \"cleanStart\": \"npm run clean && npm run build && npm run start\",\n \"noCleanStart\": \"npm run build && npm run start\",\n \"lint\": \"eslint 'src/**/*.{ts,tsx}'\",\n \"lint:fix\": \"eslint 'src/**/*.{ts,tsx}' --fix\"\n },\nYou can add more scripts as needed.\nAlright, let's move to the last part."}},"/developer/codeFormatters":{"title":"Codeformatters","data":{"code-formatting#Code Formatting":"Now let's set up our code formatting styles by using some popular libraries!","installing-prettier#Installing Prettier":"This is a very popular code formatting library. Here are the required configurations for our Discord app project!\nnpm install --save-dev --save-exact prettier\nThen, create an empty config file to let editors and other tools know you are using Prettier:\nnode --eval \"fs.writeFileSync('.prettierrc','{}\\n')\"\nNow, add this configurations:\n{\n \"printWidth\": 100,\n \"semi\": false,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"tabWidth\": 2,\n \"useTabs\": false,\n \"arrowParens\": \"avoid\"\n}\nYou can add more formatting configurations like this!","installing-eslint#Installing Eslint":"ESLint is also a very good library, so we will use this library too! Here are the ESLint configurations as per Discord.js!\nnpm install --save-dev eslint\nNow, create .eslintrc and add your rules:\nnsCore config.\n{\n \"env\": {\n \"browser\": false,\n \"node\": true,\n \"es2021\": true\n },\n \"parser\": \"@typescript-eslint/parser\",\n \"parserOptions\": {\n \"ecmaVersion\": 12,\n \"sourceType\": \"module\"\n },\n \"plugins\": [\"@typescript-eslint\"],\n \"extends\": [\n \"eslint:recommended\",\n ],\n \"rules\": {\n \"no-console\": \"off\"\n }\n }\ndiscord.js config.\n{\n\"extends\": \"eslint:recommended\",\n\"env\": {\n \"node\": true,\n \"es6\": true\n},\n\"parserOptions\": {\n \"ecmaVersion\": 2021\n},\n\"rules\": {\n \"arrow-spacing\": [\"warn\", { \"before\": true, \"after\": true }],\n \"brace-style\": [\"error\", \"stroustrup\", { \"allowSingleLine\": true }],\n \"comma-dangle\": [\"error\", \"always-multiline\"],\n \"comma-spacing\": \"error\",\n \"comma-style\": \"error\",\n \"curly\": [\"error\", \"multi-line\", \"consistent\"],\n \"dot-location\": [\"error\", \"property\"],\n \"handle-callback-err\": \"off\",\n \"indent\": [\"error\", \"tab\"],\n \"keyword-spacing\": \"error\",\n \"max-nested-callbacks\": [\"error\", { \"max\": 4 }],\n \"max-statements-per-line\": [\"error\", { \"max\": 2 }],\n \"no-console\": \"off\",\n \"no-empty-function\": \"error\",\n \"no-floating-decimal\": \"error\",\n \"no-inline-comments\": \"error\",\n \"no-lonely-if\": \"error\",\n \"no-multi-spaces\": \"error\",\n \"no-multiple-empty-lines\": [\"error\", { \"max\": 2, \"maxEOF\": 1, \"maxBOF\": 0 }],\n \"no-shadow\": [\"error\", { \"allow\": [\"err\", \"resolve\", \"reject\"] }],\n \"no-trailing-spaces\": [\"error\"],\n \"no-var\": \"error\",\n \"object-curly-spacing\": [\"error\", \"always\"],\n \"prefer-const\": \"error\",\n \"quotes\": [\"error\", \"single\"],\n \"semi\": [\"error\", \"always\"],\n \"space-before-blocks\": \"error\",\n \"space-before-function-paren\": [\"error\", {\n \t\"anonymous\": \"never\",\n \t\"named\": \"never\",\n \t\"asyncArrow\": \"always\"\n }],\n \"space-in-parens\": \"error\",\n \"space-infix-ops\": \"error\",\n \"space-unary-ops\": \"error\",\n \"spaced-comment\": \"error\",\n \"yoda\": \"error\"\n}\n}","plugings#Plugings":"Since we are using ESLint with Prettier, it's beneficial to use a plugin for better integration. To set up plugins, install the necessary dependencies first:\nnpm i eslint-plugin-prettier\nAdd the Prettier plugin to your ESLint configuration in .eslintrc:\n{\n \"env\": {\n \"browser\": false,\n \"node\": true,\n \"es2021\": true\n },\n \"parser\": \"@typescript-eslint/parser\",\n \"parserOptions\": {\n \"ecmaVersion\": 12,\n \"sourceType\": \"module\"\n },\n \"plugins\": [\"@typescript-eslint\"],\n \"extends\": [\n \"eslint:recommended\",\n \"plugin:@typescript-eslint/recommended\",\n \"plugin:node/recommended\",\n \"prettier\"\n ],\n \"rules\": {\n \"no-console\": \"off\",\n \"node/no-unsupported-features/es-syntax\": [\n \"error\",\n {\n \"ignores\": [\"modules\"]\n }\n ],\n \"@typescript-eslint/no-unused-vars\": [\"error\", { \"argsIgnorePattern\": \"^_\" }],\n \"@typescript-eslint/explicit-module-boundary-types\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/ban-ts-comment\": \"off\"\n }\n}\nYou can find a list of all of ESLint's rules on their\nwebsite.\nThis configuration extends the core vitals for the app and includes the recommended settings for Prettier, ensuring that ESLint and Prettier work together seamlessly.Alright, we're all set! Now we can proceed further."}},"/developer/commandSetup":{"title":"Getting Started","data":{"":"In a Discord bot, commands are instructions given by users to the bot to perform specific actions or tasks. These commands can be typed directly into the chat by users, triggering the bot to execute a predefined function. Commands are a fundamental part of bot interaction, enabling users to control the bot and retrieve information or perform actions within a server. There are primarily two types of commands: message commands and slash commands.","project-structure#Project Structure":"To organize your commands efficiently, we'll set up a structured project directory. This helps in maintaining a clean codebase and makes it easier to manage different types of commands.","command-types#Command Types":"Our app supports both types of commands:\nMessage Commands: These are traditional commands that users type in chat, usually prefixed with a character like ! or ?. For example, !help or !ping.\nSlash Commands: These are the newer type of commands introduced by Discord. Users can type / followed by the command name, and Discord will present an interface to help users complete the command. Its also known as Interaction Command\nNow let's move ahead!"}},"/developer/commandSetup/messageCommands":{"title":"Message Commands","data":{"":"Message commands are traditional commands in Discord bots that users type directly into the chat. These commands are typically prefixed with a specific character (like !, ?, or any custom prefix you choose). When the bot detects a message starting with this prefix, it processes the command and executes the corresponding function. Message commands are straightforward and easy to use, making them a popular choice for many bot functionalities.","project-structure#Project Structure":"First, create a folder named commands inside the src folder. Then, inside the commands folder, create another folder named messageCommands. Inside this messageCommands folder, create a folder named general. Finally, inside the general folder, add a file named ping.ts\nOur message command structure is organized into subdirectories, allowing for better code\nmanagement and customization.","create-ping-command#Create Ping Command":"Let's create a basic ping command to demonstrate how message commands work. This command will respond with \"Pong!\" when a user types !ping.\nimport { EmbedBuilder, Message } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { MessageCommand } from '../../../interfaces/Command'\nconst ping: MessageCommand = {\n name: 'ping',\n description: 'Replies with Ping!',\n async executeMessage(message: Message) {\n const pingEmbed = new EmbedBuilder()\n .setColor(COLORS.green)\n .setTitle('ping Command')\n .setDescription(`${EMOJIS.success} Ping pong ping`)\n await message.channel.send({ embeds: [pingEmbed] })\n },\n userPermissions: ['SendMessages'],\n botPermissions: ['SendMessages'],\n devOnly: false,\n}\nexport default ping\nFor example purposes, I have used this ! prefix. However, in reality, this configuration comes\ninto effect whenever the prefix is enabled. Remember, we have already set up our prefix inside\nthe messageCreate event file inside the events\nfolder, so now all these components are interconnected. We have imported constants from the\nconstants folder and interfaces from the interfaces folder. Ensure that all the imports are\ncorrect and properly configured.","message-command-structure#Message Command Structure":"Now here are the example of the command structure make sure all of your message command will follow this structure.\nimport { EmbedBuilder, Message } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { MessageCommand } from '../../../interfaces/Command'\nconst string: MessageCommand = {\n name: string,\n description: string,\n async executeMessage(message: Message) {\n const stringEmbed = new EmbedBuilder()\n .setColor(COLORS.name)\n .setTitle(string)\n .setDescription(string)\n await message.channel.send({ embeds: [string] })\n },\n userPermissions: [''],\n botPermissions: [''],\n devOnly: false / true,\n}\nexport default string\nNow, in the blank spaces, you can add whatever you want. Feel free to modify this command\nstructure to suit your needs.","developer-command#Developer Command":"The Developer Command is a type of command that is restricted to developers only. To enable a command as a Developer Command, you simply need to set the devOnly property to true.\nAlright, now let's go further!"}},"/developer/commandSetup/slashCommands":{"title":"Slash Commands","data":{"":"Slash commands, also known as interaction commands, are a newer feature introduced by Discord that provide a more streamlined and user-friendly way for users to interact with bots. Unlike message commands, slash commands are invoked by typing / followed by the command name directly into the chat input box.","project-structure#Project Structure":"Now that we've already created the commands folder, let's add a folder named slashCommands inside it. Then, within the slashCommands folder, add another folder named general. Finally, inside the general folder, add ping.ts.\nOur slash command structure is organized similarly to message commands, allowing for efficient\ncode management and customization.","create-ping-command#Create Ping Command":"Let's create a basic ping slash command to demonstrate how slash commands work. This command will respond with \"Pong!\" when invoked by the user.\nimport { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { SlashCommand } from '../../../interfaces/Command'\nconst Ping: SlashCommand = {\n name: 'ping',\n description: 'Replies with pong!',\n data: new SlashCommandBuilder().setName('pong').setDescription('Replies with pong!'),\n async executeSlash(interaction: CommandInteraction) {\n const pEmbed = new EmbedBuilder()\n .setColor(COLORS.green)\n .setTitle('ping Command')\n .setDescription(`${EMOJIS.success} pong there, I am Ping`)\n await interaction.reply({ embeds: [PingEmbed] })\n },\n userPermissions: ['SendMessages'],\n botPermissions: ['SendMessages'],\n devOnly: false,\n}\nexport default Ping\nSlash command with 100% potential is under development this structure is come with 90% potential\nonly. We are trying our best to acquire the 10% potential also.","slash-command-structure#Slash Command Structure":"Here is an example of the structure of a slash command:\nimport { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js'\nimport { COLORS, EMOJIS } from '../../../constants/botConst'\nimport { SlashCommand } from '../../../interfaces/Command'\nconst string: SlashCommand = {\n name: string,\n description: string',\n data: new SlashCommandBuilder().setName(string).setDescription(string),\n async executeSlash(interaction: CommandInteraction) {\n const stringEmbed = new EmbedBuilder()\n .setColor(COLORS.name)\n .setTitle(string)\n .setDescription(string)\n await interaction.reply({ embeds: [string] })\n },\n userPermissions: [''],\n botPermissions: [''],\n devOnly: false/true,\n}\nexport default string\nWe did not include any type of developer commands in Slash Commands. However, our command\nhandler and event handler are well-structured and capable of handling both regular and\ndeveloper commands. If you want to include a developer command in Slash Commands, you simply\nneed to set the devOnly property to true. There's no need to add anything extra because our\nhandlers are perfectly equipped to handle it.\nAlright! Go go ahead."}},"/developer/config&const":{"title":"Getting Started","data":{"":"So, we've mostly completed all our work outside the src directory. Now it's time to enter the src directory, where things will get a bit more complex. It's better to begin with the blueprint of the project structure!","project-structure#Project Structure":"Here is the basic project structure that nsCore will look like:\nnsCore/\n├── node_modules/\n├── src/\n├── .env\n├── .eslintrc\n├── .eslintignore\n├── .prettierrc\n├── .prettierignore\n├── .gitignore\n├── package.json\n├── package-lock.json\n├── tsconfig.json\nNow we have to create each folder and component separately, so let's begin!"}},"/developer/eventSetup/centralize":{"title":"Centralize Handler","data":{"":"Now, we have to create a entralized function, to export and import our events, this makes a better and easier way to export events.","project-structure#Project Structure":"Add an eventIndex.ts file inside the event folder.","add-eventindexts#Add eventIndex.ts":"This is our centralize handler code:\nimport { registerReadyEvent } from './client/ready'\nimport { eventHandlerInteraction } from './client/interactionCreate'\nimport { eventHandlerMessage } from './client/messageCreate'\nimport { ExtendedClient } from '../interfaces/ExtendedClient'\nexport function eventHandlers(client: ExtendedClient) {\n registerReadyEvent(client)\n eventHandlerInteraction(client)\n eventHandlerMessage(client)\n}\nYou can add more functions like this to centralize event handling.","verification#Verification":"Ensure you have imported everything correctly.\nAlright, lets move ahead,"}},"/developer/eventSetup":{"title":"Introduction","data":{"":"This section will cover the event handling part, which is a fundamental concept of a Discord bot.","project-structure#Project Structure":"To efficiently handle events in our Discord bot, we'll structure our project in a way that separates different responsibilities. Below is an example project structure focusing on event handling:","type-of-events#Type of events":"Discord has various types of events; however, the main three events required to run an app are:\nready event\nmessageCreate event\ninteractionCreate event\nYou can learn about more events from discord.js\nevents.\nNow let's understand these events one by one! So, let's go!"}},"/developer/gettingStarted":{"title":"Getting Started","data":{"":"Lets dive into the ocean of discord app development.","installation#Installation":"To install Node.js, visit the official Node.js website and download the installer for your operating system. Follow the installation instructions provided by the installer.Once Node.js is installed, you'll have access to npm, which is used to install packages and manage dependencies for your Node.js projects.","initiating-a-project-folder#Initiating a Project Folder":"To initiate a new project folder, open your terminal or command prompt and navigate to the directory where you want to create your project. Then, run the following command:\nmkdir nscore\ncd nscore\nI am not including the steps to create a Discord app (bot) or setting up Node.js. If you are\nunfamiliar with these processes, please refer to the Discord.js\ndocumentation.","installation-1#Installation":"Now, let's install Discord.js, which is a powerful library for interacting with the Discord API.\nnpm install discord.js\nThis command will download and install Discord.js and all its dependencies into your project folder. Once the installation is complete, you're ready to start building your Discord bot using Discord.js!All set! Now we are ready to go further!"}},"/developer/handlerSetup/error":{"title":"Error Handler","data":{"":"An error handler in a Discord bot is essential for managing and responding to errors that occur during the bot's operation. This includes handling exceptions that may arise from command execution, API calls, or other unexpected events. An effective error handler helps in maintaining the stability and reliability of the bot by gracefully managing errors and providing useful feedback to users and developers.","project-structure#Project Structure":"Add errorHandler.ts inside the handlers folder.","create-errorhandlerts#Create errorHandler.ts":"This file will contain the logic of the error handler, ensuring that any errors encountered during the bot's execution are properly managed and logged.\nDocs for this part is under construction.\nAlright, we have completed more than half now let's go further!"}},"/developer/handlerSetup":{"title":"Introduction","data":{"":"Handlers in a Discord bot are essential components that manage different aspects of the bot's functionality. They are responsible for organizing and processing specific types of events or actions, such as commands, errors, and other interactions. By using handlers, you can keep your code modular, clean, and maintainable. Handlers help in separating different concerns, making the bot easier to debug, extend, and manage.","project-structure#Project Structure":"An overview of our project structure","types#Types":"For this project, we are going to use:\ncommandHandler for handling commands\nerrorHandler for handling errors\nSo, let's go!"}},"/developer/ignoringFiles":{"title":"Ignoring Files","data":{"":"It's time to create the necessary ignore files to prevent certain files from being uploaded to GitHub!","git-ignore#Git Ignore":"Let's create a .gitignore file:\n# Node.js\nnode_modules/\ndist/\n# TypeScript\n*.tsbuildinfo\n# Logs\n*.log\n# Testing and coverage\ncoverage/\n*.test.js\n# IDE-specific files\n.vscode/\n.idea/\n*.sublime-project\n*.sublime-workspace\n# OS-specific files\n.DS_Store\nThumbs.db\nehthumbs.db\ndesktop.ini\n# Environment variables\n.env\n# Miscellaneous\n!.gitignore\nDon't forget to include your .env file.","prettier-ignore#Prettier Ignore":"Let's create a .prettierignore file:\n# Ignore artifacts:\nbuild\ncoverage\nnode_modules\n.next","eslint-ignore#Eslint Ignore":"Also, its better to keep an .eslintignore file:\n# Ignore artifacts:\nbuild/\ncoverage/\nnode_modules/\n# Ignore specific files:\ndist/\nAlright, we have successfully created our ignore files. Now we can go ahead!"}},"/developer/interfaceSetup/command":{"title":"Command Interface","data":{"":"The Command Interface is a structure that defines how commands should be organized and managed within your Discord bot. By creating a command interface, you ensure that each command follows a consistent format, making it easier to manage and execute commands. This can include defining properties like the command name, description, execute function, and any required permissions.","project-structure#Project Structure":"As you know we already have created the interfaces folder so now just add Command.ts inside the interfaces folder.","create-commandinterfacets#Create CommandInterface.ts":"Defining a command interface helps ensure consistency and ease of management for all commands.\nimport {\n ChatInputCommandInteraction,\n Message,\n PermissionResolvable,\n SlashCommandSubcommandsOnlyBuilder,\n} from 'discord.js'\nimport { SlashCommandBuilder } from '@discordjs/builders'\nimport { ExtendedClient } from './ExtendedClient'\nexport interface SlashCommand {\n name: string\n description?: string\n data:\n | SlashCommandBuilder\n | Omit\n | SlashCommandSubcommandsOnlyBuilder\n executeSlash: (interaction: ChatInputCommandInteraction, client: ExtendedClient) => Promise\n userPermissions?: PermissionResolvable[]\n botPermissions?: PermissionResolvable[]\n devOnly?: boolean\n}\nexport interface MessageCommand {\n name: string\n description?: string\n executeMessage: (message: Message, args: string[], client: ExtendedClient) => Promise\n userPermissions?: PermissionResolvable[]\n botPermissions?: PermissionResolvable[]\n devOnly?: boolean\n}\nexport interface Command extends SlashCommand, MessageCommand {}\nEnsure that all commands adhere to the defined interface for smooth operation.\nAlright, now let's move ahead!"}},"/developer/interfaceSetup/extendedClient":{"title":"Extended Client","data":{"":"The Extended Client refers to an enhanced version of the standard Discord client provided by the discord.js library. By extending the base client, we can add custom properties and methods that are specific to our bot's needs. This could include additional configurations, utility functions, or other custom features that the standard client does not provide.","project-structure#Project Structure":"First, create a folder named interfaces inside the src directory. Inside this interfaces folder, create a file named ExtendedClient.ts. This files will hold the constants for your project.","create-extendedclientts#Create ExtendedClient.ts":"You can extend your client as you want!\nimport { Client, Collection } from 'discord.js'\nimport { Command } from './Command'\nexport interface ExtendedClient extends Client {\n events: Collection void>\n messageCommands: Collection\n slashCommands: Collection\n}\nAlright, now let's move ahead!"}},"/developer/interfaceSetup":{"title":"Getting Started","data":{"":"Let's start creating our interfaces!Interfaces in TypeScript define the structure of an object. They specify the types and the properties that an object should have. For a Discord bot, interfaces can help ensure that the objects we use, such as configurations, commands, and clients, adhere to the expected structure, which can prevent errors and improve code quality.","project-structure#Project Structure":"","necessary-interfaces#Necessary Interfaces":"For this project we will use only:\nExtendedClient interface\nCommand interface\nYou can setup more interfaces as of your need.\nNow we can go ahead!"}},"/developer/settings":{"title":"Settings","data":{"":"In this part, we will add our environmental variables and TypeScript configurations!","setting-up-tsconfigjson#Setting up tsconfig.json":"Now we have to set up the TypeScript configuration for compiling our TypeScript code into JavaScript!\n{\n \"compilerOptions\": {\n \"target\": \"es2017\",\n \"module\": \"commonjs\",\n \"strict\": true,\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"outDir\": \"./dist\",\n \"rootDir\": \"./src\",\n \"sourceMap\": true,\n \"declaration\": true,\n \"declarationDir\": \"./types\"\n },\n \"include\": [\"src/**/*\"],\n \"exclude\": [\"node_modules\", \"dist\"]\n}\nYou can add more compiler options from here","setting-up-env#Setting up .env":"Now, this part is very crucial. Here we will set up our environmental variables, such as the app ID, client ID, etc.\nNever include your .env variables to public, Make sure you have put this on your git ignore\nfile.\nSo here is the setup needed for our Discord app project!Fisrt install dotenv\nnpm i dotenv\nThen add an .env file out of your src directory!\n AUTH_TOKEN=YOUR-DISCORD-BOT-TOKEN\n CLIENT_ID=YOUR-DISCORD-BOT-ID\n DEVELOPER_IDS=YOUR-DISCORD-ID\n SERVER_ID=YOUR-DEV-SERVER-ID\n ERROR_CHANNEL_ID=YOUR-ERROR-CHANNEL-ID\nOkay, now our basic configuration setup is done!"}},"/developer/utilSetup/deployCommand":{"title":"Deploy Function","data":{"":"The deploy function in a Discord bot is crucial for registering and updating slash commands with Discord's API. This function ensures that the bot's commands are correctly deployed to either a specific server (guild) or globally across all servers. By using a deploy function, you can dynamically manage and update the bot's commands without manually configuring each command.","project-structure#Project Structure":"Now, simply add a deploy.ts file inside the utils folder.","creating-deployts#Creating deploy.ts":"Here is the logic for the deploy function:\nimport { REST, Routes, SlashCommandBuilder } from 'discord.js'\nimport { readdirSync, statSync } from 'fs'\nimport { join, extname } from 'path'\nimport { logger } from './logger'\nimport config from '../configs/botConfig'\ninterface SlashCommandJSON {\n name: string\n description: string\n options?: Array\n}\nconst includeDirectories = ['commands/slashCommands/general', 'commands/slashCommands/info']\nconst loadSlashCommands = (dirs: string[]): Promise => {\n return new Promise((resolve, reject) => {\n const commands: SlashCommandJSON[] = []\n const loadCommandsFromDir = async (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n await loadCommandsFromDir(filePath)\n } else if (extname(file) === '.ts' || extname(file) === '.js') {\n const commandModule = await import(filePath)\n const command = commandModule.default\n if (command && command.data instanceof SlashCommandBuilder) {\n commands.push(command.data.toJSON())\n }\n }\n }\n }\n Promise.all(dirs.map(dir => loadCommandsFromDir(dir)))\n .then(() => resolve(commands))\n .catch(reject)\n })\n}\nconst absoluteIncludeDirectories = includeDirectories.map(dir => join(__dirname, '../', dir))\nloadSlashCommands(absoluteIncludeDirectories)\n .then(commands => {\n const rest = new REST({ version: '10' }).setToken(config.BOT_TOKEN!)\n logger.log('Started refreshing application (/) commands.')\n return rest.put(Routes.applicationCommands(config.BOT_ID!), { body: commands })\n })\n .then(() => {\n logger.log('Successfully reloaded application (/) commands.')\n })\n .catch(error => {\n if (error instanceof Error) {\n logger.error(`Error registering commands: ${error.message}`)\n } else {\n logger.error('Unknown error occurred while registering commands.')\n }\n })\nIn case of any error, please contact with me in my discord server","ensuring-env#Ensuring .env":"Ensure that your CLIENT_ID and SERVER_ID are correctly set in your .env file.Finally, we have successfully completed our utility functions."}},"/developer/utilSetup":{"title":"Getting Started","data":{"":"Utilities, or utils, are helper functions and reusable code snippets that make development easier by providing common functionality that can be used throughout the project. These can include functions for logging, data processing, formatting, and other repetitive tasks.","project-structure#Project Structure":"An overview of our project structure\nAlright, let's begin!"}},"/":{"title":"Introducing","data":{"":"Hey there, fellow creative developers! Welcome to the developer section of the nsCore app! I hope this guide will enhance your Discord app (bot) knowledge. So let's begin.","before-we-begin#Before We Begin":"If you don't know about TypeScript or JavaScript basics, please learn them first! At least, watch a one-shot video about them. Here I am leaving some links to some good YouTube channels. This is not sponsored by them!","best-for-learning-typescript#Best for learning TypeScript":"Complete Typescript in under 5 hours - Hitesh Choudhary\nTypeScript Tutorial for Beginners - Programming with Mosh\nLearn TypeScript in 50 Minutes - Academind\nTypeScript for Beginners - freeCodeCamp.org","best-for-learning-javascript#Best for learning JavaScript":"Javascript for beginners | chai aur #javascript - Chai aur Code\nIntroduction to JavaScript + Setup | JavaScript Tutorial in Hindi #1 - CodeWithHarry\nLearn JavaScript - Full Course for Beginners - freeCodeCamp.org\nJavaScript Full Course (2024) - Beginners to Pro - Shradha Khapra\nPlease note, now in\nDiscord\nbots are now referred to as apps. In this documentation, I have mentioned \"app\" (also referred to\nas \"bot\" in parentheses) so readers can understand.","quick-links#Quick links":"","thank-you#Thank You":"Thank you for believing in us and using our guide! I hope this will help you in your coding journey. Happy coding!"}},"/developer/config&const/configSetup":{"title":"Setting up Configurations","data":{"":"In this section we will configure our necessary configurations. so lets begin.","project-structure#Project Structure":"First, create a folder named configs inside the src directory. Inside this configs folder, create a file named botConfig.ts and metadata.ts. This files will hold the configuration settings for your project.","adding-env-configurations#Adding .env Configurations":"Now, remember that we have created an .env file. We cannot implement this .env file directly into our project. Instead, we will use a configuration system to integrate these environment variables via our config file.\nYou can directly import your .env variables into your project, but it is a better approach to\nuse a configuration file. This provides a more reliable way to manage configurations and allows\nyou to define types, which is a main advantage of TypeScript.\nIn the botConfig.ts file, we will add our configurations:\nimport dotenv from 'dotenv'\ndotenv.config()\ninterface BotConfig {\n BOT_TOKEN: string\n BOT_ID: string\n SERVER_ID: string\n DEVELOPER_IDS: string[]\n ERROR_CHANNEL: string\n GATE_CHANNEL: string\n}\nconst config: BotConfig = {\n BOT_TOKEN: process.env.AUTH_TOKEN as string,\n BOT_ID: process.env.CLIENT_ID as string,\n SERVER_ID: process.env.SERVER_ID as string,\n DEVELOPER_IDS: (process.env.DEVELOPER_IDS || '').split(','),\n ERROR_CHANNEL: process.env.ERROR_CHANNEL_ID as string,\n GATE_CHANNEL: process.env.JOIN_GATE_CHANNEL_ID as string,\n}\nexport default config\nThis setup will load the environment variables from the .env file and make them available throughout your project.","adding-metadata#Adding Metadata":"In the metadata.ts file, we will add our prefix and name:\nAdd your app name and app prefix.\nexport const BOT = {\n PREFIX: 'ns.',\n NAME: 'nsCore',\n}\nThis file will help us to store our metadatas, which will be required in future also, you can more\nmetadatas as of your need.\nDone, successfully we have setted our configurations, lets move ahead."}},"/developer/config&const/constSetup":{"title":"Setting up Constants","data":{"":"In this section we will set our necessary const. so lets begin.","project-structure#Project Structure":"First, create a folder named constants inside the src directory. Inside this constants folder, create a file named botConst.ts. This files will hold the constants for your project.","adding-colors#Adding Colors":"Now we will add our colors for our app, this are the default colors for our app.In the botConst.ts file, we will add our colors:\nimport { ColorResolvable } from 'discord.js'\nexport const COLORS: { [key: string]: ColorResolvable } = {\n red: '#ff3b30',\n orange: '#ff9500',\n yellow: '#ffcc00',\n green: '#34c759',\n mint: '#00c7be',\n teal: '#30b0c7',\n cyan: '#32ade6',\n blue: '#007aff',\n indigo: '#5856d6',\n purple: '#af52de',\n pink: '#ff2d55',\n brown: '#a2845e',\n lightGray: '#aeaeb2',\n lightGrayMid: '#3a3a3c',\n grayMid: '#2c2c2e',\n darkGray: '#1c1c1e',\n} as const\nDone, now lets add emojis.","adding-emojis#Adding Emojis":"Now we will add our emojis, in the same file i.e botConst.ts add the emoji constants also:\nListen carefully: These emojis are specially created by nsCore Developers for the nsCore\napp. These emojis follow the color theme of the above colors. We highly suggest you use the same\nemojis that nsCore uses.\nexport const EMOJIS = {\n success: '<:success:1242828455964315750>',\n failed: '<:failed:1242828548297719898>',\n caution: '<:caution:1242828667718209637>',\n info: '<:info:1242828626311774320>',\n seen: '<:seen:1242828705768935575>',\n slash: '<:slash:1242828744171982900>',\n ts: '<:ts:1244152291364176002>',\n js: '<:js:1244152318207856672>',\n apps: '<:apps:1244153325075697724>',\n link: '<:links:1244153412199649300>',\n devlopers: '<:developers:1244271269701091480>',\n github: '<:github:1244270608754278463>',\n leaf: '<:leaf:1244270440701100093>',\n sparkles: '<:pearls:1244270698080501770>',\n sparklesd: '<:pearlsd:1244270768599339028>',\n vscode: '<:vscode:1244270888757629111>',\n bugs: '<:bugs:1244270990620627034>',\n message: '<:message:1244271071511838801>',\n id: '<:id:1244271770618564740>',\n inbox: '<:inbox:1244271719003193424>',\n colors: '<:colors:1244271646278422649>',\n members: '<:members:1244271591785758801>',\n home: '<:home:1244271538849579058>',\n globe: '<:globe:1244271487112970291>',\n creators: '<:creators:1244271212582928404>',\n heat: '<:heat:1244316740330979360>',\n permissions: '<:permissions:1244316852562427934>',\n tips: '<:tips:1244316790922678414>',\n username: '<:username:1244531006711664712>',\n server: '<:serverd:1244600141835403345>',\n channel: '<:channel:1244649126788988929>',\n badges: '<:badges:1244649060015673356>',\n seo: '<:seo:1244532163484057700>',\n crown: '<:crown:1244600088492507218>',\n fun: '<:fun:1244650971389235293>',\n roles: '<:roles:1244994437071896714>',\n al: '<:al:1245751475532070922>',\n ar: '<:ar:1245751409014472735>',\n} as const\nYou can use your own emojis, and if you wanted to use nsCore emojis, then contact with them in\ntheir server, here is the link.\nsuccessfully completed our constant section also, Now we can move ahead."}},"/developer/eventSetup/messageCreate":{"title":"Message Create Event","data":{"":"The messageCreate event in Discord.js is triggered whenever a new message is created in a text channel. This event is useful for building features such as command handling, automated responses, and various message-based interactions. By listening to this event, you can execute specific code whenever a user sends a message in your Discord server.","project-structure#Project Structure":"Now inside the client folder add our messageCreate.ts file","create-messagecreatets#Create messageCreate.ts":"Now, we have to write the logic for our message create event. This file will contain the logic that should be executed whenever a new message is created. Typically, you will check if the message starts with a command prefix and then execute the corresponding command.\nThis message event handler comes with developer commands, bot permissions, and user permission\nchecks built-in.\nimport { EmbedBuilder, Message, PermissionsBitField } from 'discord.js'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { logger } from '../../utils/logger'\nimport { BOT } from '../../configs/metadata'\nimport config from '../../configs/botConfig'\nimport { COLORS } from '../../constants/botConst'\nimport { EMOJIS } from '../../constants/botConst'\nexport const eventHandlerMessage = (client: ExtendedClient) => {\n client.on('messageCreate', async (message: Message) => {\n if (message.author.bot || !message.guild) return\n if (!message.content.startsWith(BOT.PREFIX)) return\n const args = message.content.slice(BOT.PREFIX.length).trim().split(/ +/g)\n const commandName = args.shift()?.toLowerCase()\n if (!commandName) return\n const command = client.messageCommands.get(commandName)\n if (!command) {\n logger.warn(`Command not found: ${commandName}`)\n const unknownCommand = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle(`You cannot use this command!`)\n .setDescription(`${EMOJIS.failed} There is no command like this`)\n .setTimestamp()\n return message.reply({ embeds: [unknownCommand] })\n }\n if (\n command.userPermissions &&\n !message.member?.permissions.has(PermissionsBitField.resolve(command.userPermissions))\n ) {\n const userPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`You cannot use this command!`)\n .setDescription(\n `${EMOJIS.caution} You don't have the required permissions to use this command`,\n )\n .setTimestamp()\n return message.reply({ embeds: [userPermEmbed] })\n }\n if (!client.user) {\n logger.error('Client user is null')\n return\n }\n if (\n command.botPermissions &&\n !message.guild.members.cache\n .get(client.user.id)\n ?.permissions.has(PermissionsBitField.resolve(command.botPermissions))\n ) {\n const botPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`I cannot use this command!`)\n .setDescription(\n `${EMOJIS.caution} I don't have the required permissions to run this command`,\n )\n .setTimestamp()\n return message.reply({ embeds: [botPermEmbed] })\n }\n if (command.devOnly && !config.DEVELOPER_IDS.includes(message.author.id)) {\n const devOnlyEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle(`You cannot use this command!`)\n .setDescription(`${EMOJIS.caution} This command is only for developers`)\n .setTimestamp()\n return message.reply({ embeds: [devOnlyEmbed] })\n }\n try {\n await command.executeMessage(message, args, client)\n } catch (error) {\n logger.error(`Error executing command: ${commandName}` + error)\n console.log(error)\n const eE = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle('Opps!')\n .setDescription(`${EMOJIS.failed} There was an error trying to run that command!`)\n await message.reply({ embeds: [eE] })\n }\n })\n}\nAt this moment, you may get some errors because we haven't created our logger function yet! For\nthe logger function, please refer to the logging guide.\nAlright we have done, now let's go further!"}},"/developer/eventSetup/interactionCreate":{"title":"Interaction Create Event","data":{"":"The interactionCreate event in Discord.js is triggered whenever an interaction is created. This event is useful for handling various types of interactions such as slash commands, button clicks, and select menu selections. By listening to this event, you can execute specific code whenever a user interacts with your bot in these ways.","project-structure#Project Structure":"Now inside the client folder add our interactionCreate.ts file.","create-interactioncreatets#Create interactionCreate.ts":"Now, we have to write the logic for our interactionCreate event. This file will contain the logic that should be executed whenever a new interaction is created. Typically, you will check the type of interaction and then execute the corresponding action.\nThis interaction event handler comes with developer commands, bot permissions, and user permission\nchecks built-in.\nimport {\n ChatInputCommandInteraction,\n PermissionsBitField,\n Interaction,\n EmbedBuilder,\n GuildMember,\n} from 'discord.js'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { logger } from '../../utils/logger'\nimport config from '../../configs/botConfig'\nimport { COLORS, EMOJIS } from '../../constants/botConst'\nexport const eventHandlerInteraction = (client: ExtendedClient) => {\n client.on('interactionCreate', async (interaction: Interaction) => {\n if (!interaction.isCommand() || !interaction.guildId) return\n const commandName = interaction.commandName\n const command = client.slashCommands.get(commandName) // Use slashCommands collection\n if (!command) {\n logger.warn(`Command not found: ${commandName}`)\n return\n }\n if (\n command.userPermissions &&\n !(interaction.member?.permissions as Readonly)?.has(\n PermissionsBitField.resolve(command.userPermissions),\n )\n ) {\n const userPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('You cannot use this command!')\n .setDescription(\n `${EMOJIS.caution} You don't have the required permissions to use this commandz`,\n )\n .setTimestamp()\n await interaction.reply({ embeds: [userPermEmbed], ephemeral: true })\n return\n }\n const botMember = interaction.guild?.members.cache.get(client.user?.id || '') as GuildMember\n if (\n command.botPermissions &&\n !botMember.permissions.has(PermissionsBitField.resolve(command.botPermissions))\n ) {\n const botPermEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('I cannot use this command!')\n .setDescription(\n `${EMOJIS.caution} I don't have the required permissions to run this command`,\n )\n .setTimestamp()\n await interaction.reply({ embeds: [botPermEmbed], ephemeral: true })\n return\n }\n if (command.devOnly && !config.DEVELOPER_IDS.includes(interaction.user.id)) {\n const devOnlyEmbed = new EmbedBuilder()\n .setColor(COLORS.yellow)\n .setTitle('You cannot use this command!')\n .setDescription(`${EMOJIS.caution} This command is only for developers.`)\n .setTimestamp()\n await interaction.reply({ embeds: [devOnlyEmbed], ephemeral: true })\n return\n }\n try {\n await command.executeSlash(interaction as ChatInputCommandInteraction, client)\n } catch (error) {\n logger.error(`Error executing command: ${commandName} - ${error}`)\n console.log(error)\n const errorEmbed = new EmbedBuilder()\n .setColor(COLORS.red)\n .setTitle('Oops!')\n .setDescription(`${EMOJIS.failed} There was an error trying to execute that command!`)\n .setTimestamp()\n await interaction.reply({ embeds: [errorEmbed], ephemeral: true })\n }\n })\n}\nYou can add more interactions, for example, context interactions and other Discord.js\ninteractions.\nDone, now let's go ahead!"}},"/developer/eventSetup/ready":{"title":"Ready Event","data":{"":"The ready event in Discord.js is a crucial event that signifies when the bot has successfully connected to Discord and is ready to start receiving and responding to events. This event is triggered once, immediately after the bot logs in and establishes a connection with Discord's servers.","project-structure#Project Structure":"First, create a folder named events inside the src folder. Then create a client folder inside the events folder and add a file named ready.ts.","create-readyts#Create ready.ts":"Now we will write the logic for the ready event.\nimport { logPastelPink } from 'nstypocolors'\nimport { ExtendedClient } from '../../interfaces/ExtendedClient'\nimport { ActivityType } from 'discord.js'\nimport { BOT } from '../../configs/metadata'\nexport const registerReadyEvent = (client: ExtendedClient) => {\n client.once('ready', () => {\n logPastelPink(`Successfully connected both Message & Slash clients ${client.user?.tag}!`)\n client.user?.setPresence({\n activities: [\n {\n name: `${BOT.PREFIX}help • ${client.user?.username}`,\n type: ActivityType.Custom,\n },\n ],\n status: 'online',\n })\n })\n}\nYou can customize this as you want. For more information, please visit the\nDiscord.js official\ndocumentation about the ready event and its types.","required-dependencies#Required Dependencies":"For this, you may have noticed that we have used the color library nstypocolors. Install nstypocolors via npm\nnpm i nstypocolors\nWe are highly suggested you to use nstypocolors only, dont use any other color libraries.\nAlright, we have done it! Now let's move ahead."}},"/developer/handlerSetup/cmd":{"title":"Command Handler","data":{"":"A command handler in a Discord bot is responsible for processing and executing commands received from users. It helps in organizing the command logic, making it easier to manage and extend. By using a command handler, you can separate the command definitions from the execution logic, ensuring that each command is handled appropriately based on the user's input.","project-structure#Project Structure":"Create a folder named handlers inside the src folder, and then create a file named commandHandler.ts.","create-commandhandlerts#Create commandHandler.ts":"This file will contain the logic of the command handler. It supports both message and interaction commands.\nimport { Collection } from 'discord.js'\nimport { readdirSync, statSync } from 'fs'\nimport { join } from 'path'\nimport { Command } from '../interfaces/Command'\nimport { ExtendedClient } from '../interfaces/ExtendedClient'\nimport { logger } from '../utils/logger'\nexport const commandHandler = (client: ExtendedClient) => {\n client.slashCommands = new Collection()\n client.messageCommands = new Collection()\n const loadSlashCommands = (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n loadSlashCommands(filePath)\n } else if (file.endsWith('.js') || file.endsWith('.ts')) {\n const command: Command = require(filePath).default\n if (typeof command.executeSlash === 'function') {\n client.slashCommands.set(command.name, command)\n logger.log(`Slash command loaded: ${command.name} from ${filePath}`)\n }\n }\n }\n }\n const loadMessageCommands = (dir: string) => {\n const files = readdirSync(dir)\n for (const file of files) {\n const filePath = join(dir, file)\n const fileStat = statSync(filePath)\n if (fileStat.isDirectory()) {\n loadMessageCommands(filePath)\n } else if (file.endsWith('.js') || file.endsWith('.ts')) {\n const command: Command = require(filePath).default\n if (typeof command.executeMessage === 'function') {\n client.messageCommands.set(command.name, command)\n logger.log(`Message command loaded: ${command.name} from ${filePath}`)\n } else {\n logger.error(\n `Message command ${command.name} does not have executeMessage function defined`,\n )\n }\n }\n }\n }\n loadSlashCommands(join(__dirname, '../commands/slashCommands'))\n loadMessageCommands(join(__dirname, '../commands/messageCommands'))\n logger.sLog('All commands loaded')\n client.slashCommands.forEach((command, name) => logger.log(`Loaded slash command: ${name}`))\n client.messageCommands.forEach((command, name) => logger.log(`Loaded message command: ${name}`))\n}","verification#Verification":"Ensure that your commands are correctly imported from your command interface.\nAlright, now let's go further!"}},"/developer/utilSetup/logger":{"title":"Logger Function","data":{"":"A logger function is used to record various types of messages and events that occur during the execution of an application. This can include error messages, informational messages, warnings, and debugging information. The primary advantage of using a logger function is to provide an easy way to track and monitor the application's behavior and performance. It helps in debugging, analyzing issues, and maintaining the application more effectively.","project-structure#Project Structure":"First, create a folder named utils, and inside this folder, create a file named logger.ts.","creating-loggerts#Creating logger.ts":"Now, here is the logic for logger.ts:\nHighly suggested to use nstypocolors only!\nimport { logPastelGreen, logPastelLavender, logPastelRed, logPastelYellow } from 'nstypocolors'\nexport const logger = {\n log: (message: string) => logPastelGreen(`[LOG] ${message}`),\n sLog: (message: string) => logPastelLavender(`[SUCCESS] ${message}`),\n warn: (message: string) => logPastelYellow(`[WARN] ${message}`),\n error: (message: string) => logPastelRed(`[ERROR] ${message}`),\n}\nYou can add more logging functions like this to enhance your application's functionality.\nThat's it! Now go ahead."}}} \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/advance-0e2323b0a2f47de2.js b/_next/static/chunks/pages/developer/advance-0e2323b0a2f47de2.js new file mode 100644 index 0000000..3fc535d --- /dev/null +++ b/_next/static/chunks/pages/developer/advance-0e2323b0a2f47de2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[749],{7685:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance",function(){return s(6e3)}])},6e3:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var t=s(5893),o=s(2673),r=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating index.ts",id:"creating-indexts"},{depth:3,value:"Verification",id:"verification"},{depth:3,value:"Run",id:"run"},{depth:2,value:"Thank You",id:"thank-you"}];function d(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",h2:"h2"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Creating the Core"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"index.ts"})," file is the heart of your bot. It serves as the entry point for your application, initializing and configuring the bot to connect to Discord and start responding to ",(0,t.jsx)(n.code,{children:"events"})," and ",(0,t.jsx)(n.code,{children:"commands"}),"."]}),"\n",(0,t.jsxs)(a.Rg,{children:[(0,t.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,t.jsxs)(n.p,{children:["Now, inside the ",(0,t.jsx)(n.code,{children:"src"})," directory, add a file named ",(0,t.jsx)(n.code,{children:"index.ts"}),"."]}),(0,t.jsx)(a.zH,{children:(0,t.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,t.jsx)(a.zH.File,{name:"index.ts"})})}),(0,t.jsxs)(n.h3,{id:"creating-indexts",children:["Creating ",(0,t.jsx)(n.code,{children:"index.ts"})]}),(0,t.jsx)(n.p,{children:"This is the main file, or we can say the core file, of the bot."}),(0,t.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/index.ts",hasCopyCode:!0,children:(0,t.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Collection"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GatewayIntentBits } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./interfaces/ExtendedClient'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logBrightPink } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./configs/botConfig'"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { commandHandler } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./handlers/commandHandler'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlers } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./events/eventIndex'"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" intents"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".Guilds"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".GuildMessages"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".MessageContent"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".slashCommands "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".messageCommands "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".events "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"commandHandler"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlers"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"client"})}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".login"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_TOKEN"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logBrightPink"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Successfully connected all the commands and the bot is online'"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"((err"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Failed to login: '"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" err))"})]})]})}),(0,t.jsx)(a.UW,{children:(0,t.jsx)(n.p,{children:"Feel free to customize this setup to suit your needs. You can add additional intents,\nconfigurations, or other settings to enhance the functionality of your bot."})}),(0,t.jsx)(n.h3,{id:"verification",children:"Verification"}),(0,t.jsxs)(n.p,{children:["Ensure that you have imported everything correctly and that you have defined your ",(0,t.jsx)(n.code,{children:"client"})," properly."]}),(0,t.jsx)(n.h3,{id:"run",children:"Run"}),(0,t.jsx)(n.p,{children:"Now open your terminal and enter:"}),(0,t.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,t.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"run"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"execute"})]})})}),(0,t.jsx)(n.p,{children:"Congratualations, finally your app (bot) is online."})]}),"\n",(0,t.jsx)(n.h2,{id:"thank-you",children:"Thank You"}),"\n",(0,t.jsxs)(n.p,{children:["Dont forget to give a ",(0,t.jsx)(n.code,{children:"star"})," in github."]})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/advance/index.mdx",route:"/developer/advance",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Creating the Core",headings:c},pageNextRoute:"/developer/advance",nextraLayout:r.ZP,themeConfig:i.Z};n.default=(0,o.j)(p)},2069:function(e,n,s){"use strict";var t=s(5893);s(7294);var o=s(1163),r=s(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,t.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,o.useRouter)(),{frontMatter:i}=(0,r.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("meta",{property:"og:url",content:l}),(0,t.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,t.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7685)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/advance-33df118444bafe33.js b/_next/static/chunks/pages/developer/advance-33df118444bafe33.js deleted file mode 100644 index 76d3744..0000000 --- a/_next/static/chunks/pages/developer/advance-33df118444bafe33.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[749],{7685:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance",function(){return s(6e3)}])},6e3:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var r=s(5893),o=s(2673),t=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating index.ts",id:"creating-indexts"},{depth:3,value:"Verification",id:"verification"},{depth:3,value:"Run",id:"run"},{depth:2,value:"Thank You",id:"thank-you"}];function d(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",h2:"h2"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Creating the Core"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"index.ts"})," file is the heart of your bot. It serves as the entry point for your application, initializing and configuring the bot to connect to Discord and start responding to ",(0,r.jsx)(n.code,{children:"events"})," and ",(0,r.jsx)(n.code,{children:"commands"}),"."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["Now, inside the ",(0,r.jsx)(n.code,{children:"src"})," directory, add a file named ",(0,r.jsx)(n.code,{children:"index.ts"}),"."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"index.ts"})})}),(0,r.jsxs)(n.h3,{id:"creating-indexts",children:["Creating ",(0,r.jsx)(n.code,{children:"index.ts"})]}),(0,r.jsx)(n.p,{children:"This is the main file, or we can say the core file, of the bot."}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/index.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GatewayIntentBits } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logBrightPink } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./configs/botConfig'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { commandHandler } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./handlers/commandHandler'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlers } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./events/eventIndex'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" intents"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".Guilds"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".GuildMessages"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"GatewayIntentBits"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".MessageContent"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}) "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".slashCommands "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".messageCommands "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".events "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"commandHandler"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlers"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"client"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".login"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_TOKEN"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logBrightPink"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Successfully connected all the commands and the bot is online'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"((err"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Failed to login: '"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" err))"})]})]})}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(n.p,{children:"Feel free to customize this setup to suit your needs. You can add additional intents,\nconfigurations, or other settings to enhance the functionality of your bot."})}),(0,r.jsx)(n.h3,{id:"verification",children:"Verification"}),(0,r.jsxs)(n.p,{children:["Ensure that you have imported everything correctly and that you have defined your ",(0,r.jsx)(n.code,{children:"client"})," properly."]}),(0,r.jsx)(n.h3,{id:"run",children:"Run"}),(0,r.jsx)(n.p,{children:"Now open your terminal and enter:"}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"run"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"execute"})]})})}),(0,r.jsx)(n.p,{children:"Congratualations, finally your app (bot) is online."})]}),"\n",(0,r.jsx)(n.h2,{id:"thank-you",children:"Thank You"}),"\n",(0,r.jsxs)(n.p,{children:["Dont forget to give a ",(0,r.jsx)(n.code,{children:"star"})," in github."]})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/advance/index.mdx",route:"/developer/advance",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Creating the Core",headings:c},pageNextRoute:"/developer/advance",nextraLayout:t.ZP,themeConfig:i.Z};n.default=(0,o.j)(p)},2069:function(e,n,s){"use strict";var r=s(5893);s(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7685)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/advance/introduction-16f82a948829680b.js b/_next/static/chunks/pages/developer/advance/introduction-f1c64c6e68d909f5.js similarity index 80% rename from _next/static/chunks/pages/developer/advance/introduction-16f82a948829680b.js rename to _next/static/chunks/pages/developer/advance/introduction-f1c64c6e68d909f5.js index 4739716..f9cbd86 100644 --- a/_next/static/chunks/pages/developer/advance/introduction-16f82a948829680b.js +++ b/_next/static/chunks/pages/developer/advance/introduction-f1c64c6e68d909f5.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{7676:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance/introduction",function(){return t(4724)}])},4724:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),r=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Before Clicking the Run Button",id:"before-clicking-the-run-button"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code"},(0,i.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Getting Ended"}),"\n",(0,d.jsx)(n.p,{children:"So yeah, this is the last part — just a little more work, and we're done. Let's get started!"}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"Our final structure should look like this:"}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsxs)(s.zH.Folder,{name:"utils",children:[(0,d.jsx)(s.zH.File,{name:"logger.ts"}),(0,d.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"handlers",children:[(0,d.jsx)(s.zH.File,{name:"commandHandler.ts"}),(0,d.jsx)(s.zH.File,{name:"errorHandler.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"commands",children:[(0,d.jsx)(s.zH.Folder,{name:"messageCommands",children:(0,d.jsx)(s.zH.Folder,{name:"general",children:(0,d.jsx)(s.zH.File,{name:"ping.ts"})})}),(0,d.jsx)(s.zH.Folder,{name:"slashCommands",children:(0,d.jsx)(s.zH.Folder,{name:"general",children:(0,d.jsx)(s.zH.File,{name:"ping.ts"})})})]}),(0,d.jsx)(s.zH.File,{name:"index.ts"})]})})}),"\n",(0,d.jsxs)(n.h2,{id:"before-clicking-the-run-button",children:["Before Clicking the ",(0,d.jsx)(n.code,{children:"Run"})," Button"]}),"\n",(0,d.jsxs)(n.p,{children:["Guys, we're finally done! Now, you just need to add the main entry file, ",(0,d.jsx)(n.code,{children:"index.ts"}),", and you're ready to click the ",(0,d.jsx)(n.code,{children:"run"})," button."]}),"\n",(0,d.jsx)(n.p,{children:"I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let m={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/advance/introduction.mdx",route:"/developer/advance/introduction",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Ended",headings:l},pageNextRoute:"/developer/advance/introduction",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,r.j)(m)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7676)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{7676:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance/introduction",function(){return t(4724)}])},4724:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),r=t(2673),o=t(1334),i=t(2069);t(9488);var a=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Before Clicking the Run Button",id:"before-clicking-the-run-button"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code"},(0,a.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Getting Ended"}),"\n",(0,d.jsx)(n.p,{children:"So yeah, this is the last part — just a little more work, and we're done. Let's get started!"}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"Our final structure should look like this:"}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsxs)(s.zH.Folder,{name:"utils",children:[(0,d.jsx)(s.zH.File,{name:"logger.ts"}),(0,d.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"handlers",children:[(0,d.jsx)(s.zH.File,{name:"commandHandler.ts"}),(0,d.jsx)(s.zH.File,{name:"errorHandler.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"commands",children:[(0,d.jsx)(s.zH.Folder,{name:"messageCommands",children:(0,d.jsx)(s.zH.Folder,{name:"general",children:(0,d.jsx)(s.zH.File,{name:"ping.ts"})})}),(0,d.jsx)(s.zH.Folder,{name:"slashCommands",children:(0,d.jsx)(s.zH.Folder,{name:"general",children:(0,d.jsx)(s.zH.File,{name:"ping.ts"})})})]}),(0,d.jsx)(s.zH.File,{name:"index.ts"})]})})}),"\n",(0,d.jsxs)(n.h2,{id:"before-clicking-the-run-button",children:["Before Clicking the ",(0,d.jsx)(n.code,{children:"Run"})," Button"]}),"\n",(0,d.jsxs)(n.p,{children:["Guys, we're finally done! Now, you just need to add the main entry file, ",(0,d.jsx)(n.code,{children:"index.ts"}),", and you're ready to click the ",(0,d.jsx)(n.code,{children:"run"})," button."]}),"\n",(0,d.jsx)(n.p,{children:"I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let m={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/advance/introduction.mdx",route:"/developer/advance/introduction",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Ended",headings:l},pageNextRoute:"/developer/advance/introduction",nextraLayout:o.ZP,themeConfig:i.Z};n.default=(0,r.j)(m)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);var r=t(1163),o=t(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,r.useRouter)(),{frontMatter:i}=(0,o.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("meta",{property:"og:url",content:a}),(0,d.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,d.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7676)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/advance/scripts-55bea2f6274ea2eb.js b/_next/static/chunks/pages/developer/advance/scripts-55bea2f6274ea2eb.js new file mode 100644 index 0000000..d578e1d --- /dev/null +++ b/_next/static/chunks/pages/developer/advance/scripts-55bea2f6274ea2eb.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[506],{1908:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance/scripts",function(){return s(158)}])},158:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return d}});var t=s(5893),r=s(2673),i=s(1334),o=s(2069);s(9488);var a=s(2643),l=s(2154);let d=[{depth:2,value:"Creating scripts",id:"creating-scripts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,a.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Scripts"}),"\n",(0,t.jsxs)(n.p,{children:["Before moving to the ",(0,t.jsx)(n.code,{children:"index.ts"})," file, ensure that you have configured your scripts properly in the ",(0,t.jsx)(n.code,{children:"package.json"})," file."]}),"\n",(0,t.jsxs)(n.h2,{id:"creating-scripts",children:["Creating ",(0,t.jsx)(n.code,{children:"scripts"})]}),"\n",(0,t.jsxs)(n.p,{children:["Now, in the ",(0,t.jsx)(n.code,{children:"package.json"})," file, add these scripts:"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"/package.json",hasCopyCode:!0,children:(0,t.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"test"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx jest"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"clean"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rimraf dist types"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"build"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx tsc"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"format:check"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx prettier . --check"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"format:write"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx prettier . --write"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"deploy"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node dist/utils/deployCommands.js"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"start"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node dist/index.js"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"execute"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run clean && npm run build && npm run format:write && npm run start"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cleanStart"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run clean && npm run build && npm run start"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"noCleanStart"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run build && npm run start"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"lint"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"eslint 'src/**/*.{ts,tsx}'\""}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"lint:fix"'}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"eslint 'src/**/*.{ts,tsx}' --fix\""})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]})]})}),"\n",(0,t.jsx)(l.UW,{type:"info",children:"You can add more scripts as needed."}),"\n",(0,t.jsx)(n.p,{children:"Alright, let's move to the last part."})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/advance/scripts.mdx",route:"/developer/advance/scripts",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Scripts",headings:d},pageNextRoute:"/developer/advance/scripts",nextraLayout:i.ZP,themeConfig:o.Z};n.default=(0,r.j)(p)},2069:function(e,n,s){"use strict";var t=s(5893);s(7294);var r=s(1163),i=s(1334);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,t.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,r.useRouter)(),{frontMatter:o}=(0,i.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("meta",{property:"og:url",content:a}),(0,t.jsx)("meta",{property:"og:title",content:o.title||"nsDocs"}),(0,t.jsx)("meta",{property:"og:description",content:o.description||"A production level discord app guide"})]})}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1908)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/advance/scripts-a9b9f30b04b15e21.js b/_next/static/chunks/pages/developer/advance/scripts-a9b9f30b04b15e21.js deleted file mode 100644 index 28909aa..0000000 --- a/_next/static/chunks/pages/developer/advance/scripts-a9b9f30b04b15e21.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[506],{1908:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/advance/scripts",function(){return s(158)}])},158:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return d}});var r=s(5893),t=s(2673),i=s(1334),o=s(2069);s(9488);var a=s(2643),l=s(2154);let d=[{depth:2,value:"Creating scripts",id:"creating-scripts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Scripts"}),"\n",(0,r.jsxs)(n.p,{children:["Before moving to the ",(0,r.jsx)(n.code,{children:"index.ts"})," file, ensure that you have configured your scripts properly in the ",(0,r.jsx)(n.code,{children:"package.json"})," file."]}),"\n",(0,r.jsxs)(n.h2,{id:"creating-scripts",children:["Creating ",(0,r.jsx)(n.code,{children:"scripts"})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, in the ",(0,r.jsx)(n.code,{children:"package.json"})," file, add these scripts:"]}),"\n",(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"/package.json",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"scripts"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"test"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx jest"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"clean"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rimraf dist types"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"build"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx tsc"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"format:check"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx prettier . --check"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"format:write"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npx prettier . --write"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"deploy"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node dist/utils/deployCommands.js"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"start"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node dist/index.js"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"execute"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run clean && npm run build && npm run format:write && npm run start"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"cleanStart"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run clean && npm run build && npm run start"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"noCleanStart"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"npm run build && npm run start"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"lint"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"eslint 'src/**/*.{ts,tsx}'\""}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"lint:fix"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"eslint 'src/**/*.{ts,tsx}' --fix\""})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]})]})}),"\n",(0,r.jsx)(l.UW,{type:"info",children:"You can add more scripts as needed."}),"\n",(0,r.jsx)(n.p,{children:"Alright, let's move to the last part."})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/advance/scripts.mdx",route:"/developer/advance/scripts",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Scripts",headings:d},pageNextRoute:"/developer/advance/scripts",nextraLayout:i.ZP,themeConfig:o.Z};n.default=(0,t.j)(p)},2069:function(e,n,s){"use strict";var r=s(5893);s(7294);let t={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=t},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1908)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/codeFormatters-4fab7bf974665bfa.js b/_next/static/chunks/pages/developer/codeFormatters-aa47ad71f3419e2c.js similarity index 97% rename from _next/static/chunks/pages/developer/codeFormatters-4fab7bf974665bfa.js rename to _next/static/chunks/pages/developer/codeFormatters-aa47ad71f3419e2c.js index 97e2241..4d17f4a 100644 --- a/_next/static/chunks/pages/developer/codeFormatters-4fab7bf974665bfa.js +++ b/_next/static/chunks/pages/developer/codeFormatters-aa47ad71f3419e2c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[435],{6382:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/codeFormatters",function(){return n(6441)}])},6441:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var r=n(5893),i=n(2673),o=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:2,value:"Code Formatting",id:"code-formatting"},{depth:2,value:"Installing Prettier",id:"installing-prettier"},{depth:2,value:"Installing Eslint",id:"installing-eslint"},{depth:2,value:"Plugings",id:"plugings"}];function h(s){let e=Object.assign({h2:"h2",p:"p",code:"code",pre:"pre",span:"span",a:"a",strong:"strong"},(0,t.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h2,{id:"code-formatting",children:"Code Formatting"}),"\n",(0,r.jsx)(e.p,{children:"Now let's set up our code formatting styles by using some popular libraries!"}),"\n",(0,r.jsxs)(e.h2,{id:"installing-prettier",children:["Installing ",(0,r.jsx)(e.code,{children:"Prettier"})]}),"\n",(0,r.jsx)(e.p,{children:"This is a very popular code formatting library. Here are the required configurations for our Discord app project!"}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-dev"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-exact"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"prettier"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Then, create an empty config file to let editors and other tools know you are using ",(0,r.jsx)(e.a,{href:"https://prettier.io/docs/en/",children:"Prettier"}),":"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"node"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--eval"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"fs.writeFileSync('.prettierrc','{}\\n')\""})]})})}),"\n",(0,r.jsx)(e.p,{children:"Now, add this configurations:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".prettierrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"printWidth"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"semi"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"singleQuote"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"trailingComma"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"all"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tabWidth"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"useTabs"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"arrowParens"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"avoid"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsx)(a.UW,{type:"info",children:"You can add more formatting configurations like this!"}),"\n",(0,r.jsxs)(e.h2,{id:"installing-eslint",children:["Installing ",(0,r.jsx)(e.code,{children:"Eslint"})]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.a,{href:"https://eslint.org/",children:"ESLint"})," is also a very good library, so we will use this library too! Here are the ESLint configurations as per Discord.js!"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-dev"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"eslint"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Now, create ",(0,r.jsx)(e.code,{children:".eslintrc"})," and add your rules:"]}),"\n",(0,r.jsxs)(a.mQ,{items:["nsCore config.","discord.js config."],children:[(0,r.jsxs)(a.OK,{children:[(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"nsCore config."})}),(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"browser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2021"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"12"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceType"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugins"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})})]})})]}),(0,r.jsxs)(a.OK,{children:[(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"discord.js config."})}),(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es6"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2021"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"arrow-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"warn"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"before"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"after"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"brace-style"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"stroustrup"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"allowSingleLine"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-dangle"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always-multiline"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-style"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"curly"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"multi-line"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"consistent"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"dot-location"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"property"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"handle-callback-err"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"indent"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tab"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"keyword-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max-nested-callbacks"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max-statements-per-line"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-empty-function"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-floating-decimal"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-inline-comments"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-lonely-if"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-multi-spaces"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-multiple-empty-lines"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"maxEOF"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"maxBOF"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-shadow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"allow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"err"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"resolve"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"reject"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-trailing-spaces"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-var"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"object-curly-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prefer-const"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"quotes"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"single"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"semi"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-before-blocks"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-before-function-paren"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"anonymous"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"never"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"named"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"never"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"asyncArrow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-in-parens"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-infix-ops"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-unary-ops"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"spaced-comment"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"yoda"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})]}),"\n",(0,r.jsx)(e.h2,{id:"plugings",children:"Plugings"}),"\n",(0,r.jsx)(e.p,{children:"Since we are using ESLint with Prettier, it's beneficial to use a plugin for better integration. To set up plugins, install the necessary dependencies first:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"eslint-plugin-prettier"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Add the Prettier plugin to your ESLint configuration in ",(0,r.jsx)(e.code,{children:".eslintrc"}),":"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"browser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2021"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"12"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceType"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugins"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugin:@typescript-eslint/recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugin:node/recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node/no-unsupported-features/es-syntax"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ignores"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"modules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/no-unused-vars"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"argsIgnorePattern"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"^_"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/explicit-module-boundary-types"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/no-explicit-any"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/ban-ts-comment"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsxs)(e.p,{children:["You can find a list of all of ESLint's rules on their\n",(0,r.jsx)(e.a,{href:"https://eslint.org/docs/latest/rules/",children:"website"}),"."]})}),"\n",(0,r.jsx)(e.p,{children:"This configuration extends the core vitals for the app and includes the recommended settings for Prettier, ensuring that ESLint and Prettier work together seamlessly."}),"\n",(0,r.jsx)(e.p,{children:"Alright, we're all set! Now we can proceed further."})]})}let d={MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,t.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(h,{...s})}):h(s)},pageOpts:{filePath:"src/pages/developer/codeFormatters.mdx",route:"/developer/codeFormatters",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Codeformatters",headings:c},pageNextRoute:"/developer/codeFormatters",nextraLayout:o.ZP,themeConfig:l.Z};e.default=(0,i.j)(d)},2069:function(s,e,n){"use strict";var r=n(5893);n(7294);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};e.Z=i},5789:function(){}},function(s){s.O(0,[235,888,774,179],function(){return s(s.s=6382)}),_N_E=s.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[435],{6382:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/codeFormatters",function(){return n(6441)}])},6441:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return c}});var r=n(5893),i=n(2673),o=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:2,value:"Code Formatting",id:"code-formatting"},{depth:2,value:"Installing Prettier",id:"installing-prettier"},{depth:2,value:"Installing Eslint",id:"installing-eslint"},{depth:2,value:"Plugings",id:"plugings"}];function h(s){let e=Object.assign({h2:"h2",p:"p",code:"code",pre:"pre",span:"span",a:"a",strong:"strong"},(0,t.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h2,{id:"code-formatting",children:"Code Formatting"}),"\n",(0,r.jsx)(e.p,{children:"Now let's set up our code formatting styles by using some popular libraries!"}),"\n",(0,r.jsxs)(e.h2,{id:"installing-prettier",children:["Installing ",(0,r.jsx)(e.code,{children:"Prettier"})]}),"\n",(0,r.jsx)(e.p,{children:"This is a very popular code formatting library. Here are the required configurations for our Discord app project!"}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-dev"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-exact"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"prettier"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Then, create an empty config file to let editors and other tools know you are using ",(0,r.jsx)(e.a,{href:"https://prettier.io/docs/en/",children:"Prettier"}),":"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"node"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--eval"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"\"fs.writeFileSync('.prettierrc','{}\\n')\""})]})})}),"\n",(0,r.jsx)(e.p,{children:"Now, add this configurations:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".prettierrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"printWidth"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"100"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"semi"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"singleQuote"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"trailingComma"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"all"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tabWidth"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"useTabs"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"arrowParens"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"avoid"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsx)(a.UW,{type:"info",children:"You can add more formatting configurations like this!"}),"\n",(0,r.jsxs)(e.h2,{id:"installing-eslint",children:["Installing ",(0,r.jsx)(e.code,{children:"Eslint"})]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.a,{href:"https://eslint.org/",children:"ESLint"})," is also a very good library, so we will use this library too! Here are the ESLint configurations as per Discord.js!"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"--save-dev"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"eslint"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Now, create ",(0,r.jsx)(e.code,{children:".eslintrc"})," and add your rules:"]}),"\n",(0,r.jsxs)(a.mQ,{items:["nsCore config.","discord.js config."],children:[(0,r.jsxs)(a.OK,{children:[(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"nsCore config."})}),(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"browser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2021"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"12"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceType"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugins"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})})]})})]}),(0,r.jsxs)(a.OK,{children:[(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"discord.js config."})}),(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es6"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2021"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"arrow-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"warn"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"before"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"after"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"brace-style"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"stroustrup"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"allowSingleLine"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-dangle"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always-multiline"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"comma-style"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"curly"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"multi-line"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"consistent"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"dot-location"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"property"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"handle-callback-err"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"indent"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"tab"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"keyword-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max-nested-callbacks"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"4"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max-statements-per-line"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-empty-function"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-floating-decimal"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-inline-comments"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-lonely-if"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-multi-spaces"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-multiple-empty-lines"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"max"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"maxEOF"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"maxBOF"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-shadow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"allow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"err"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"resolve"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"reject"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"] }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-trailing-spaces"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-var"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"object-curly-spacing"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prefer-const"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"quotes"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"single"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"semi"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-before-blocks"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-before-function-paren"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"anonymous"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"never"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"named"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"never"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"asyncArrow"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"always"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-in-parens"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-infix-ops"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"space-unary-ops"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"spaced-comment"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line highlighted",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"yoda"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})]}),"\n",(0,r.jsx)(e.h2,{id:"plugings",children:"Plugings"}),"\n",(0,r.jsx)(e.p,{children:"Since we are using ESLint with Prettier, it's beneficial to use a plugin for better integration. To set up plugins, install the necessary dependencies first:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(e.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string)"},children:"eslint-plugin-prettier"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["Add the Prettier plugin to your ESLint configuration in ",(0,r.jsx)(e.code,{children:".eslintrc"}),":"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:".eslintrc",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"env"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"browser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2021"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"true"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/parser"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"parserOptions"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ecmaVersion"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"12"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceType"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugins"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"extends"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"eslint:recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugin:@typescript-eslint/recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"plugin:node/recommended"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"prettier"'})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"no-console"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node/no-unsupported-features/es-syntax"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ignores"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"modules"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/no-unused-vars"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"error"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"argsIgnorePattern"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"^_"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }]"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/explicit-module-boundary-types"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/no-explicit-any"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@typescript-eslint/ban-ts-comment"'}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"off"'})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsxs)(e.p,{children:["You can find a list of all of ESLint's rules on their\n",(0,r.jsx)(e.a,{href:"https://eslint.org/docs/latest/rules/",children:"website"}),"."]})}),"\n",(0,r.jsx)(e.p,{children:"This configuration extends the core vitals for the app and includes the recommended settings for Prettier, ensuring that ESLint and Prettier work together seamlessly."}),"\n",(0,r.jsx)(e.p,{children:"Alright, we're all set! Now we can proceed further."})]})}let d={MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,t.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(h,{...s})}):h(s)},pageOpts:{filePath:"src/pages/developer/codeFormatters.mdx",route:"/developer/codeFormatters",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Codeformatters",headings:c},pageNextRoute:"/developer/codeFormatters",nextraLayout:o.ZP,themeConfig:l.Z};e.default=(0,i.j)(d)},2069:function(s,e,n){"use strict";var r=n(5893);n(7294);var i=n(1163),o=n(1334);let l={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:s,defaultLocale:e,locale:n}=(0,i.useRouter)(),{frontMatter:l}=(0,o.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(e===n?s:"/".concat(n).concat(s));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:l.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:l.description||"A production level discord app guide"})]})}};e.Z=l},5789:function(){}},function(s){s.O(0,[235,888,774,179],function(){return s(s.s=6382)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/commandSetup-f41b90ad81169434.js b/_next/static/chunks/pages/developer/commandSetup-8d5f72f7341bcc62.js similarity index 85% rename from _next/static/chunks/pages/developer/commandSetup-f41b90ad81169434.js rename to _next/static/chunks/pages/developer/commandSetup-8d5f72f7341bcc62.js index 94679e7..eb16543 100644 --- a/_next/static/chunks/pages/developer/commandSetup-f41b90ad81169434.js +++ b/_next/static/chunks/pages/developer/commandSetup-8d5f72f7341bcc62.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[570],{7601:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup",function(){return t(9966)}])},9966:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),o=t(2673),r=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Command Types",id:"command-types"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||m("FileTree",!1),s.zH.File||m("FileTree.File",!0),s.zH.Folder||m("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,d.jsxs)(n.p,{children:["In a Discord bot, commands are instructions given by users to the bot to perform specific actions or tasks. These commands can be typed directly into the chat by users, triggering the bot to execute a predefined function. Commands are a fundamental part of bot interaction, enabling users to control the bot and retrieve information or perform actions within a server. There are primarily two types of commands: ",(0,d.jsx)(n.code,{children:"message"})," commands and ",(0,d.jsx)(n.code,{children:"slash"})," commands."]}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"To organize your commands efficiently, we'll set up a structured project directory. This helps in maintaining a clean codebase and makes it easier to manage different types of commands."}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsxs)(s.zH.Folder,{name:"utils",children:[(0,d.jsx)(s.zH.File,{name:"logger.ts"}),(0,d.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"handlers",children:[(0,d.jsx)(s.zH.File,{name:"commandHandler.ts"}),(0,d.jsx)(s.zH.File,{name:"errorHandler.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"commands",children:[(0,d.jsx)(s.zH.Folder,{name:"messageCommands"}),(0,d.jsx)(s.zH.Folder,{name:"slashCommands"})]})]})})}),"\n",(0,d.jsx)(n.h2,{id:"command-types",children:"Command Types"}),"\n",(0,d.jsx)(n.p,{children:"Our app supports both types of commands:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"Message Commands"}),": These are traditional commands that users type in chat, usually prefixed with a character like ",(0,d.jsx)(n.code,{children:"!"})," or ",(0,d.jsx)(n.code,{children:"?"}),". For example, ",(0,d.jsx)(n.code,{children:"!help"})," or ",(0,d.jsx)(n.code,{children:"!ping"}),"."]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"Slash Commands"}),": These are the newer type of commands introduced by Discord. Users can type ",(0,d.jsx)(n.code,{children:"/"})," followed by the command name, and Discord will present an interface to help users complete the command. Its also known as ",(0,d.jsx)(n.code,{children:"Interaction Command"})]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Now let's move ahead!"})]})}function m(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/index.mdx",route:"/developer/commandSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/commandSetup",nextraLayout:r.ZP,themeConfig:a.Z};n.default=(0,o.j)(p)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7601)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[570],{7601:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup",function(){return t(9966)}])},9966:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),o=t(2673),r=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Command Types",id:"command-types"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||m("FileTree",!1),s.zH.File||m("FileTree.File",!0),s.zH.Folder||m("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,d.jsxs)(n.p,{children:["In a Discord bot, commands are instructions given by users to the bot to perform specific actions or tasks. These commands can be typed directly into the chat by users, triggering the bot to execute a predefined function. Commands are a fundamental part of bot interaction, enabling users to control the bot and retrieve information or perform actions within a server. There are primarily two types of commands: ",(0,d.jsx)(n.code,{children:"message"})," commands and ",(0,d.jsx)(n.code,{children:"slash"})," commands."]}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"To organize your commands efficiently, we'll set up a structured project directory. This helps in maintaining a clean codebase and makes it easier to manage different types of commands."}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsxs)(s.zH.Folder,{name:"utils",children:[(0,d.jsx)(s.zH.File,{name:"logger.ts"}),(0,d.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"handlers",children:[(0,d.jsx)(s.zH.File,{name:"commandHandler.ts"}),(0,d.jsx)(s.zH.File,{name:"errorHandler.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"commands",children:[(0,d.jsx)(s.zH.Folder,{name:"messageCommands"}),(0,d.jsx)(s.zH.Folder,{name:"slashCommands"})]})]})})}),"\n",(0,d.jsx)(n.h2,{id:"command-types",children:"Command Types"}),"\n",(0,d.jsx)(n.p,{children:"Our app supports both types of commands:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"Message Commands"}),": These are traditional commands that users type in chat, usually prefixed with a character like ",(0,d.jsx)(n.code,{children:"!"})," or ",(0,d.jsx)(n.code,{children:"?"}),". For example, ",(0,d.jsx)(n.code,{children:"!help"})," or ",(0,d.jsx)(n.code,{children:"!ping"}),"."]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"Slash Commands"}),": These are the newer type of commands introduced by Discord. Users can type ",(0,d.jsx)(n.code,{children:"/"})," followed by the command name, and Discord will present an interface to help users complete the command. Its also known as ",(0,d.jsx)(n.code,{children:"Interaction Command"})]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"Now let's move ahead!"})]})}function m(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/index.mdx",route:"/developer/commandSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/commandSetup",nextraLayout:r.ZP,themeConfig:a.Z};n.default=(0,o.j)(p)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);var o=t(1163),r=t(1334);let a={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,o.useRouter)(),{frontMatter:a}=(0,r.ZR)(),i="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("meta",{property:"og:url",content:i}),(0,d.jsx)("meta",{property:"og:title",content:a.title||"nsDocs"}),(0,d.jsx)("meta",{property:"og:description",content:a.description||"A production level discord app guide"})]})}};n.Z=a},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7601)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/commandSetup/messageCommands-04b5419f41d4e83b.js b/_next/static/chunks/pages/developer/commandSetup/messageCommands-c99f7cdec5c967e9.js similarity index 95% rename from _next/static/chunks/pages/developer/commandSetup/messageCommands-04b5419f41d4e83b.js rename to _next/static/chunks/pages/developer/commandSetup/messageCommands-c99f7cdec5c967e9.js index fe795f2..7875e43 100644 --- a/_next/static/chunks/pages/developer/commandSetup/messageCommands-04b5419f41d4e83b.js +++ b/_next/static/chunks/pages/developer/commandSetup/messageCommands-c99f7cdec5c967e9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[879],{1449:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup/messageCommands",function(){return n(1195)}])},1195:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),t=n(2069);n(9488);var l=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create Ping Command",id:"create-ping-command"},{depth:3,value:"Message Command Structure",id:"message-command-structure"},{depth:3,value:"Developer Command",id:"developer-command"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Message Commands"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"Message"})," commands are traditional commands in Discord bots that users type directly into the chat. These commands are typically prefixed with a specific character (like ",(0,r.jsx)(s.code,{children:"!"}),", ",(0,r.jsx)(s.code,{children:"?"}),", or any custom prefix you choose). When the bot detects a message starting with this prefix, it processes the command and executes the corresponding function.",(0,r.jsx)(s.code,{children:" Message"})," commands are straightforward and easy to use, making them a popular choice for many bot functionalities."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["First, create a folder named commands inside the src folder. Then, inside the commands folder, create another folder named messageCommands. Inside this messageCommands folder, create a folder named general. Finally, inside the general folder, add a file named ",(0,r.jsx)(s.code,{children:"ping.ts"})]}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Our message command structure is organized into subdirectories, allowing for better code\nmanagement and customization."})}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"commands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"messageCommands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"general",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"ping.ts"})})})})})}),(0,r.jsx)(s.h3,{id:"create-ping-command",children:"Create Ping Command"}),(0,r.jsxs)(s.p,{children:["Let's create a basic ",(0,r.jsx)(s.code,{children:"ping"}),' command to demonstrate how message commands work. This command will respond with "Pong!" when a user types ',(0,r.jsx)(s.code,{children:"!ping"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/messageCommands/general/hello.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Message } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { MessageCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"ping"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with Ping!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"pingEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".green)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping Command'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" Ping pong ping`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".send"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [pingEmbed] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ping"})]})]})}),(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(s.p,{children:["For example purposes, I have used this ",(0,r.jsx)(s.code,{children:"!"})," prefix. However, in reality, this configuration comes\ninto effect whenever the ",(0,r.jsx)(s.code,{children:"prefix"})," is enabled. Remember, we have already set up our ",(0,r.jsx)(s.code,{children:"prefix"})," inside\nthe ",(0,r.jsx)(s.a,{href:"/developer/eventSetup/messageCreate",children:(0,r.jsx)(s.code,{children:"messageCreate"})})," event file inside the ",(0,r.jsx)(s.code,{children:"events"}),"\nfolder, so now all these components are interconnected. We have imported constants from the\n",(0,r.jsx)(s.code,{children:"constants"})," folder and interfaces from the ",(0,r.jsx)(s.code,{children:"interfaces"})," folder. Ensure that all the imports are\ncorrect and properly configured."]})}),(0,r.jsx)(s.h3,{id:"message-command-structure",children:"Message Command Structure"}),(0,r.jsx)(s.p,{children:"Now here are the example of the command structure make sure all of your message command will follow this structure."}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/messageCommands/",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Message } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { MessageCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"stringEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".send"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [string] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"})]})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsx)(s.p,{children:"Now, in the blank spaces, you can add whatever you want. Feel free to modify this command\nstructure to suit your needs."})}),(0,r.jsx)(s.h3,{id:"developer-command",children:"Developer Command"}),(0,r.jsxs)(s.p,{children:["The Developer Command is a type of command that is restricted to developers only. To enable a command as a Developer Command, you simply need to set the ",(0,r.jsx)(s.code,{children:"devOnly"})," property to ",(0,r.jsx)(s.code,{children:"true"}),"."]})]}),"\n",(0,r.jsx)(s.p,{children:"Alright, now let's go further!"})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/messageCommands.mdx",route:"/developer/commandSetup/messageCommands",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Message Commands",headings:c},pageNextRoute:"/developer/commandSetup/messageCommands",nextraLayout:i.ZP,themeConfig:t.Z};s.default=(0,o.j)(p)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1449)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[879],{1449:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup/messageCommands",function(){return n(1195)}])},1195:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),t=n(2069);n(9488);var l=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create Ping Command",id:"create-ping-command"},{depth:3,value:"Message Command Structure",id:"message-command-structure"},{depth:3,value:"Developer Command",id:"developer-command"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Message Commands"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"Message"})," commands are traditional commands in Discord bots that users type directly into the chat. These commands are typically prefixed with a specific character (like ",(0,r.jsx)(s.code,{children:"!"}),", ",(0,r.jsx)(s.code,{children:"?"}),", or any custom prefix you choose). When the bot detects a message starting with this prefix, it processes the command and executes the corresponding function.",(0,r.jsx)(s.code,{children:" Message"})," commands are straightforward and easy to use, making them a popular choice for many bot functionalities."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["First, create a folder named commands inside the src folder. Then, inside the commands folder, create another folder named messageCommands. Inside this messageCommands folder, create a folder named general. Finally, inside the general folder, add a file named ",(0,r.jsx)(s.code,{children:"ping.ts"})]}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Our message command structure is organized into subdirectories, allowing for better code\nmanagement and customization."})}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"commands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"messageCommands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"general",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"ping.ts"})})})})})}),(0,r.jsx)(s.h3,{id:"create-ping-command",children:"Create Ping Command"}),(0,r.jsxs)(s.p,{children:["Let's create a basic ",(0,r.jsx)(s.code,{children:"ping"}),' command to demonstrate how message commands work. This command will respond with "Pong!" when a user types ',(0,r.jsx)(s.code,{children:"!ping"}),"."]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/messageCommands/general/hello.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Message } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { MessageCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"ping"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with Ping!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"pingEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".green)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping Command'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" Ping pong ping`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".send"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [pingEmbed] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ping"})]})]})}),(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(s.p,{children:["For example purposes, I have used this ",(0,r.jsx)(s.code,{children:"!"})," prefix. However, in reality, this configuration comes\ninto effect whenever the ",(0,r.jsx)(s.code,{children:"prefix"})," is enabled. Remember, we have already set up our ",(0,r.jsx)(s.code,{children:"prefix"})," inside\nthe ",(0,r.jsx)(s.a,{href:"/developer/eventSetup/messageCreate",children:(0,r.jsx)(s.code,{children:"messageCreate"})})," event file inside the ",(0,r.jsx)(s.code,{children:"events"}),"\nfolder, so now all these components are interconnected. We have imported constants from the\n",(0,r.jsx)(s.code,{children:"constants"})," folder and interfaces from the ",(0,r.jsx)(s.code,{children:"interfaces"})," folder. Ensure that all the imports are\ncorrect and properly configured."]})}),(0,r.jsx)(s.h3,{id:"message-command-structure",children:"Message Command Structure"}),(0,r.jsx)(s.p,{children:"Now here are the example of the command structure make sure all of your message command will follow this structure."}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/messageCommands/",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Message } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { MessageCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"stringEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".send"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [string] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"})]})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsx)(s.p,{children:"Now, in the blank spaces, you can add whatever you want. Feel free to modify this command\nstructure to suit your needs."})}),(0,r.jsx)(s.h3,{id:"developer-command",children:"Developer Command"}),(0,r.jsxs)(s.p,{children:["The Developer Command is a type of command that is restricted to developers only. To enable a command as a Developer Command, you simply need to set the ",(0,r.jsx)(s.code,{children:"devOnly"})," property to ",(0,r.jsx)(s.code,{children:"true"}),"."]})]}),"\n",(0,r.jsx)(s.p,{children:"Alright, now let's go further!"})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/messageCommands.mdx",route:"/developer/commandSetup/messageCommands",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Message Commands",headings:c},pageNextRoute:"/developer/commandSetup/messageCommands",nextraLayout:i.ZP,themeConfig:t.Z};s.default=(0,o.j)(p)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);var o=n(1163),i=n(1334);let t={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:n}=(0,o.useRouter)(),{frontMatter:t}=(0,i.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(s===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:l}),(0,r.jsx)("meta",{property:"og:title",content:t.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:t.description||"A production level discord app guide"})]})}};s.Z=t},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1449)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/commandSetup/slashCommands-762bd84ae1913594.js b/_next/static/chunks/pages/developer/commandSetup/slashCommands-0415c2bea7288889.js similarity index 95% rename from _next/static/chunks/pages/developer/commandSetup/slashCommands-762bd84ae1913594.js rename to _next/static/chunks/pages/developer/commandSetup/slashCommands-0415c2bea7288889.js index 0714b65..ca51569 100644 --- a/_next/static/chunks/pages/developer/commandSetup/slashCommands-762bd84ae1913594.js +++ b/_next/static/chunks/pages/developer/commandSetup/slashCommands-0415c2bea7288889.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[460],{8538:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup/slashCommands",function(){return n(4879)}])},4879:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create Ping Command",id:"create-ping-command"},{depth:3,value:"Slash Command Structure",id:"slash-command-structure"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,t.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Slash Commands"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"Slash"})," commands, also known as ",(0,r.jsx)(s.code,{children:"interaction"})," commands, are a newer feature introduced by Discord that provide a more streamlined and user-friendly way for users to interact with bots. Unlike message commands, ",(0,r.jsx)(s.code,{children:"slash"})," commands are invoked by typing ",(0,r.jsx)(s.code,{children:"/"})," followed by the command name directly into the chat input box."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now that we've already created the ",(0,r.jsx)(s.code,{children:"commands"})," folder, let's add a folder named ",(0,r.jsx)(s.code,{children:"slashCommands"})," inside it. Then, within the ",(0,r.jsx)(s.code,{children:"slashCommands"})," folder, add another folder named ",(0,r.jsx)(s.code,{children:"general"}),". Finally, inside the ",(0,r.jsx)(s.code,{children:"general"})," folder, add ",(0,r.jsx)(s.code,{children:"ping.ts"}),"."]}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Our slash command structure is organized similarly to message commands, allowing for efficient\ncode management and customization."})}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"commands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"slashCommands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"general",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"ping.ts"})})})})})}),(0,r.jsx)(s.h3,{id:"create-ping-command",children:"Create Ping Command"}),(0,r.jsxs)(s.p,{children:["Let's create a basic ",(0,r.jsx)(s.code,{children:"ping"}),' slash command to demonstrate how slash commands work. This command will respond with "Pong!" when invoked by the user.']}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/slashCommands/general/ping.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Ping"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with pong!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pong'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with pong!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"pEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".green)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping Command'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" pong there, I am Ping`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [PingEmbed] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Ping"})]})]})}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Slash command with 100% potential is under development this structure is come with 90% potential\nonly. We are trying our best to acquire the 10% potential also."})}),(0,r.jsx)(s.h3,{id:"slash-command-structure",children:"Slash Command Structure"}),(0,r.jsx)(s.p,{children:"Here is an example of the structure of a slash command:"}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/slashCommands/",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"',"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"stringEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [string] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"})]})]})}),(0,r.jsx)(a.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["We did not include any type of ",(0,r.jsx)(s.code,{children:"developer"})," commands in ",(0,r.jsx)(s.code,{children:"Slash Commands"}),". However, our command\nhandler and ",(0,r.jsx)(s.code,{children:"event"})," handler are well-structured and capable of handling both regular and\n",(0,r.jsx)(s.code,{children:"developer"})," commands. If you want to include a ",(0,r.jsx)(s.code,{children:"developer"})," command in ",(0,r.jsx)(s.code,{children:"Slash Commands"}),", you simply\nneed to set the ",(0,r.jsx)(s.code,{children:"devOnly"})," property to ",(0,r.jsx)(s.code,{children:"true"}),". There's no need to add anything extra because our\nhandlers are perfectly equipped to handle it."]})})]}),"\n",(0,r.jsx)(s.p,{children:"Alright! Go go ahead."})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/slashCommands.mdx",route:"/developer/commandSetup/slashCommands",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Slash Commands",headings:c},pageNextRoute:"/developer/commandSetup/slashCommands",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(x)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=8538)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[460],{8538:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/commandSetup/slashCommands",function(){return n(4879)}])},4879:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create Ping Command",id:"create-ping-command"},{depth:3,value:"Slash Command Structure",id:"slash-command-structure"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,t.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Slash Commands"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"Slash"})," commands, also known as ",(0,r.jsx)(s.code,{children:"interaction"})," commands, are a newer feature introduced by Discord that provide a more streamlined and user-friendly way for users to interact with bots. Unlike message commands, ",(0,r.jsx)(s.code,{children:"slash"})," commands are invoked by typing ",(0,r.jsx)(s.code,{children:"/"})," followed by the command name directly into the chat input box."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now that we've already created the ",(0,r.jsx)(s.code,{children:"commands"})," folder, let's add a folder named ",(0,r.jsx)(s.code,{children:"slashCommands"})," inside it. Then, within the ",(0,r.jsx)(s.code,{children:"slashCommands"})," folder, add another folder named ",(0,r.jsx)(s.code,{children:"general"}),". Finally, inside the ",(0,r.jsx)(s.code,{children:"general"})," folder, add ",(0,r.jsx)(s.code,{children:"ping.ts"}),"."]}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Our slash command structure is organized similarly to message commands, allowing for efficient\ncode management and customization."})}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"commands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"slashCommands",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"general",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"ping.ts"})})})})})}),(0,r.jsx)(s.h3,{id:"create-ping-command",children:"Create Ping Command"}),(0,r.jsxs)(s.p,{children:["Let's create a basic ",(0,r.jsx)(s.code,{children:"ping"}),' slash command to demonstrate how slash commands work. This command will respond with "Pong!" when invoked by the user.']}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/slashCommands/general/ping.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Ping"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with pong!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'pong'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Replies with pong!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"pEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".green)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ping Command'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" pong there, I am Ping`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [PingEmbed] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'SendMessages'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Ping"})]})]})}),(0,r.jsx)(a.UW,{children:(0,r.jsx)(s.p,{children:"Slash command with 100% potential is under development this structure is come with 90% potential\nonly. We are trying our best to acquire the 10% potential also."})}),(0,r.jsx)(s.h3,{id:"slash-command-structure",children:"Slash Command Structure"}),(0,r.jsx)(s.p,{children:"Here is an example of the structure of a slash command:"}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/commands/slashCommands/",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommand } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../../interfaces/Command'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"',"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" data: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"CommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"stringEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(string)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [string] })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"/"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" string"})]})]})}),(0,r.jsx)(a.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["We did not include any type of ",(0,r.jsx)(s.code,{children:"developer"})," commands in ",(0,r.jsx)(s.code,{children:"Slash Commands"}),". However, our command\nhandler and ",(0,r.jsx)(s.code,{children:"event"})," handler are well-structured and capable of handling both regular and\n",(0,r.jsx)(s.code,{children:"developer"})," commands. If you want to include a ",(0,r.jsx)(s.code,{children:"developer"})," command in ",(0,r.jsx)(s.code,{children:"Slash Commands"}),", you simply\nneed to set the ",(0,r.jsx)(s.code,{children:"devOnly"})," property to ",(0,r.jsx)(s.code,{children:"true"}),". There's no need to add anything extra because our\nhandlers are perfectly equipped to handle it."]})})]}),"\n",(0,r.jsx)(s.p,{children:"Alright! Go go ahead."})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/commandSetup/slashCommands.mdx",route:"/developer/commandSetup/slashCommands",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Slash Commands",headings:c},pageNextRoute:"/developer/commandSetup/slashCommands",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(p)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);var o=n(1163),i=n(1334);let l={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:n}=(0,o.useRouter)(),{frontMatter:l}=(0,i.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:l.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:l.description||"A production level discord app guide"})]})}};s.Z=l},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=8538)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/config&const-97ca088f41dffa39.js b/_next/static/chunks/pages/developer/config&const-b1726100fc3dfc81.js similarity index 85% rename from _next/static/chunks/pages/developer/config&const-97ca088f41dffa39.js rename to _next/static/chunks/pages/developer/config&const-b1726100fc3dfc81.js index 795a866..ea1e2e9 100644 --- a/_next/static/chunks/pages/developer/config&const-97ca088f41dffa39.js +++ b/_next/static/chunks/pages/developer/config&const-b1726100fc3dfc81.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{6471:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const",function(){return t(4145)}])},4145:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return d}});var r=t(5893),o=t(2673),i=t(1334),s=t(2069);t(9488);var a=t(2643);let d=[{depth:2,value:"Project Structure",id:"project-structure"}];function l(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,r.jsxs)(n.p,{children:["So, we've mostly completed all our work outside the ",(0,r.jsx)(n.code,{children:"src"})," directory. Now it's time to enter the ",(0,r.jsx)(n.code,{children:"src"})," directory, where things will get a bit more complex. It's better to begin with the blueprint of the project structure!"]}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(n.p,{children:"Here is the basic project structure that nsCore will look like:"}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nsCore/"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"node_modules/"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"src/"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".env"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".eslintrc"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".eslintignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".prettierrc"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".prettierignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".gitignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"package.json"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"package-lock.json"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"tsconfig.json"})]})]})}),"\n",(0,r.jsx)(n.p,{children:"Now we have to create each folder and component separately, so let's begin!"})]})}let c={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)},pageOpts:{filePath:"src/pages/developer/config&const/index.mdx",route:"/developer/config&const",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:d},pageNextRoute:"/developer/config&const",nextraLayout:i.ZP,themeConfig:s.Z};n.default=(0,o.j)(c)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=6471)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{6471:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const",function(){return t(4145)}])},4145:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return d}});var r=t(5893),o=t(2673),s=t(1334),i=t(2069);t(9488);var a=t(2643);let d=[{depth:2,value:"Project Structure",id:"project-structure"}];function l(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",pre:"pre",span:"span"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,r.jsxs)(n.p,{children:["So, we've mostly completed all our work outside the ",(0,r.jsx)(n.code,{children:"src"})," directory. Now it's time to enter the ",(0,r.jsx)(n.code,{children:"src"})," directory, where things will get a bit more complex. It's better to begin with the blueprint of the project structure!"]}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(n.p,{children:"Here is the basic project structure that nsCore will look like:"}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"nsCore/"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"node_modules/"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"src/"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".env"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".eslintrc"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".eslintignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".prettierrc"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".prettierignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:".gitignore"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"package.json"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"package-lock.json"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"├──"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"tsconfig.json"})]})]})}),"\n",(0,r.jsx)(n.p,{children:"Now we have to create each folder and component separately, so let's begin!"})]})}let c={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)},pageOpts:{filePath:"src/pages/developer/config&const/index.mdx",route:"/developer/config&const",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:d},pageNextRoute:"/developer/config&const",nextraLayout:s.ZP,themeConfig:i.Z};n.default=(0,o.j)(c)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var o=t(1163),s=t(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,o.useRouter)(),{frontMatter:i}=(0,s.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=6471)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/config&const/configSetup-9880e1501054eba4.js b/_next/static/chunks/pages/developer/config&const/configSetup-9530531e8f7116b0.js similarity index 93% rename from _next/static/chunks/pages/developer/config&const/configSetup-9880e1501054eba4.js rename to _next/static/chunks/pages/developer/config&const/configSetup-9530531e8f7116b0.js index c60cdf2..29f9c44 100644 --- a/_next/static/chunks/pages/developer/config&const/configSetup-9880e1501054eba4.js +++ b/_next/static/chunks/pages/developer/config&const/configSetup-9530531e8f7116b0.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[703],{7086:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const/configSetup",function(){return s(2935)}])},2935:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var o=s(5893),r=s(2673),t=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Adding .env Configurations",id:"adding-env-configurations"},{depth:3,value:"Adding Metadata",id:"adding-metadata"}];function d(e){let n=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Setting up Configurations"}),"\n",(0,o.jsx)(n.p,{children:"In this section we will configure our necessary configurations. so lets begin."}),"\n",(0,o.jsxs)(a.Rg,{children:[(0,o.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,o.jsxs)(n.p,{children:["First, create a folder named ",(0,o.jsx)(n.code,{children:"configs"})," inside the ",(0,o.jsx)(n.code,{children:"src"})," directory. Inside this ",(0,o.jsx)(n.code,{children:"configs"})," folder, create a file named ",(0,o.jsx)(n.code,{children:"botConfig.ts"})," and ",(0,o.jsx)(n.code,{children:"metadata.ts"}),". This files will hold the configuration settings for your project."]}),(0,o.jsx)(a.zH,{children:(0,o.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,o.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,o.jsxs)(a.zH.Folder,{name:"configs",children:[(0,o.jsx)(a.zH.File,{name:"botConfig.ts"}),(0,o.jsx)(a.zH.File,{name:"metadata.ts"})]})})})}),(0,o.jsxs)(n.h3,{id:"adding-env-configurations",children:["Adding ",(0,o.jsx)(n.code,{children:".env"})," Configurations"]}),(0,o.jsxs)(n.p,{children:["Now, remember that we have created an ",(0,o.jsx)(n.code,{children:".env"})," file. We cannot implement this ",(0,o.jsx)(n.code,{children:".env"})," file directly into our project. Instead, we will use a configuration system to integrate these environment variables via our config file."]}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsxs)(n.p,{children:["You can directly import your ",(0,o.jsx)(n.code,{children:".env"})," variables into your project, but it is a better approach to\nuse a configuration file. This provides a more reliable way to manage configurations and allows\nyou to define types, which is a main advantage of TypeScript."]})}),(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.code,{children:"botConfig.ts"})," file, we will add our configurations:"]}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/configs/botConfig.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" dotenv "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dotenv'"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"dotenv"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".config"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"BotConfig"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GATE_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"BotConfig"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"AUTH_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"CLIENT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".split"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"','"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"ERROR_CHANNEL_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GATE_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"JOIN_GATE_CHANNEL_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" config"})]})]})}),(0,o.jsxs)(n.p,{children:["This setup will load the environment variables from the ",(0,o.jsx)(n.code,{children:".env"})," file and make them available throughout your project."]}),(0,o.jsx)(n.h3,{id:"adding-metadata",children:"Adding Metadata"}),(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.code,{children:"metadata.ts"})," file, we will add our prefix and name:"]}),(0,o.jsxs)(a.UW,{children:["Add your app ",(0,o.jsx)(n.code,{children:"name"})," and app ",(0,o.jsx)(n.code,{children:"prefix"}),"."]}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/configs/metadata.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line highlighted",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" PREFIX"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ns.'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line highlighted",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" NAME"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nsCore'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsx)(n.p,{children:"This file will help us to store our metadatas, which will be required in future also, you can more\nmetadatas as of your need."})})]}),"\n",(0,o.jsx)(n.p,{children:"Done, successfully we have setted our configurations, lets move ahead."})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/config&const/configSetup.mdx",route:"/developer/config&const/configSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Setting up Configurations",headings:c},pageNextRoute:"/developer/config&const/configSetup",nextraLayout:t.ZP,themeConfig:i.Z};n.default=(0,r.j)(p)},2069:function(e,n,s){"use strict";var o=s(5893);s(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,o.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7086)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[703],{7086:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const/configSetup",function(){return s(2935)}])},2935:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var o=s(5893),r=s(2673),t=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Adding .env Configurations",id:"adding-env-configurations"},{depth:3,value:"Adding Metadata",id:"adding-metadata"}];function d(e){let n=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Setting up Configurations"}),"\n",(0,o.jsx)(n.p,{children:"In this section we will configure our necessary configurations. so lets begin."}),"\n",(0,o.jsxs)(a.Rg,{children:[(0,o.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,o.jsxs)(n.p,{children:["First, create a folder named ",(0,o.jsx)(n.code,{children:"configs"})," inside the ",(0,o.jsx)(n.code,{children:"src"})," directory. Inside this ",(0,o.jsx)(n.code,{children:"configs"})," folder, create a file named ",(0,o.jsx)(n.code,{children:"botConfig.ts"})," and ",(0,o.jsx)(n.code,{children:"metadata.ts"}),". This files will hold the configuration settings for your project."]}),(0,o.jsx)(a.zH,{children:(0,o.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,o.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,o.jsxs)(a.zH.Folder,{name:"configs",children:[(0,o.jsx)(a.zH.File,{name:"botConfig.ts"}),(0,o.jsx)(a.zH.File,{name:"metadata.ts"})]})})})}),(0,o.jsxs)(n.h3,{id:"adding-env-configurations",children:["Adding ",(0,o.jsx)(n.code,{children:".env"})," Configurations"]}),(0,o.jsxs)(n.p,{children:["Now, remember that we have created an ",(0,o.jsx)(n.code,{children:".env"})," file. We cannot implement this ",(0,o.jsx)(n.code,{children:".env"})," file directly into our project. Instead, we will use a configuration system to integrate these environment variables via our config file."]}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsxs)(n.p,{children:["You can directly import your ",(0,o.jsx)(n.code,{children:".env"})," variables into your project, but it is a better approach to\nuse a configuration file. This provides a more reliable way to manage configurations and allows\nyou to define types, which is a main advantage of TypeScript."]})}),(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.code,{children:"botConfig.ts"})," file, we will add our configurations:"]}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/configs/botConfig.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" dotenv "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'dotenv'"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"dotenv"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".config"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"BotConfig"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GATE_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"BotConfig"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"AUTH_TOKEN"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" BOT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"CLIENT_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"SERVER_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".split"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"','"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"ERROR_CHANNEL_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" GATE_CHANNEL"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"process"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"env"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"JOIN_GATE_CHANNEL_ID"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" config"})]})]})}),(0,o.jsxs)(n.p,{children:["This setup will load the environment variables from the ",(0,o.jsx)(n.code,{children:".env"})," file and make them available throughout your project."]}),(0,o.jsx)(n.h3,{id:"adding-metadata",children:"Adding Metadata"}),(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.code,{children:"metadata.ts"})," file, we will add our prefix and name:"]}),(0,o.jsxs)(a.UW,{children:["Add your app ",(0,o.jsx)(n.code,{children:"name"})," and app ",(0,o.jsx)(n.code,{children:"prefix"}),"."]}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/configs/metadata.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line highlighted",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" PREFIX"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ns.'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line highlighted",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" NAME"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nsCore'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsx)(n.p,{children:"This file will help us to store our metadatas, which will be required in future also, you can more\nmetadatas as of your need."})})]}),"\n",(0,o.jsx)(n.p,{children:"Done, successfully we have setted our configurations, lets move ahead."})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/config&const/configSetup.mdx",route:"/developer/config&const/configSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Setting up Configurations",headings:c},pageNextRoute:"/developer/config&const/configSetup",nextraLayout:t.ZP,themeConfig:i.Z};n.default=(0,r.j)(p)},2069:function(e,n,s){"use strict";var o=s(5893);s(7294);var r=s(1163),t=s(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,o.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,r.useRouter)(),{frontMatter:i}=(0,t.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:url",content:l}),(0,o.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,o.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=7086)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/config&const/constSetup-bad1e1a5a7b9a3ec.js b/_next/static/chunks/pages/developer/config&const/constSetup-1320bcf40866438e.js similarity index 96% rename from _next/static/chunks/pages/developer/config&const/constSetup-bad1e1a5a7b9a3ec.js rename to _next/static/chunks/pages/developer/config&const/constSetup-1320bcf40866438e.js index afd4e8b..0b6ab20 100644 --- a/_next/static/chunks/pages/developer/config&const/constSetup-bad1e1a5a7b9a3ec.js +++ b/_next/static/chunks/pages/developer/config&const/constSetup-1320bcf40866438e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[218],{5236:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const/constSetup",function(){return n(2940)}])},2940:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Adding Colors",id:"adding-colors"},{depth:3,value:"Adding Emojis",id:"adding-emojis"}];function d(e){let s=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span",strong:"strong",a:"a"},(0,t.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Setting up Constants"}),"\n",(0,r.jsx)(s.p,{children:"In this section we will set our necessary const. so lets begin."}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["First, create a folder named ",(0,r.jsx)(s.code,{children:"constants"})," inside the ",(0,r.jsx)(s.code,{children:"src"})," directory. Inside this ",(0,r.jsx)(s.code,{children:"constants"})," folder, create a file named ",(0,r.jsx)(s.code,{children:"botConst.ts"}),". This files will hold the constants for your project."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(a.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(a.zH.Folder,{name:"configs",children:[(0,r.jsx)(a.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(a.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(a.zH.Folder,{name:"constants",children:(0,r.jsx)(a.zH.File,{name:"botConst.ts"})})]})})})]}),"\n",(0,r.jsx)(s.h3,{id:"adding-colors",children:"Adding Colors"}),"\n",(0,r.jsxs)(s.p,{children:["Now we will add our ",(0,r.jsx)(s.code,{children:"colors"})," for our app, this are the default colors for our app."]}),"\n",(0,r.jsxs)(s.p,{children:["In the ",(0,r.jsx)(s.code,{children:"botConst.ts"})," file, we will add our colors:"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/constants/botConst.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ColorResolvable } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { [key"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ColorResolvable"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" red"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff3b30'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" orange"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff9500'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" yellow"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ffcc00'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" green"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#34c759'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mint"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#00c7be'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" teal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#30b0c7'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cyan"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#32ade6'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#007aff'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" indigo"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#5856d6'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" purple"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#af52de'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pink"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff2d55'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" brown"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#a2845e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lightGray"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#aeaeb2'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lightGrayMid"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#3a3a3c'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" grayMid"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#2c2c2e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" darkGray"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#1c1c1e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"Done, now lets add emojis."}),"\n",(0,r.jsx)(s.h3,{id:"adding-emojis",children:"Adding Emojis"}),"\n",(0,r.jsxs)(s.p,{children:["Now we will add our ",(0,r.jsx)(s.code,{children:"emojis"}),", in the same file i.e ",(0,r.jsx)(s.code,{children:"botConst.ts"})," add the emoji constants also:"]}),"\n",(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(s.p,{children:["Listen carefully: These emojis are specially created by ",(0,r.jsx)(s.strong,{children:"nsCore"})," Developers for the ",(0,r.jsx)(s.strong,{children:"nsCore"}),"\napp. These emojis follow the color theme of the above colors. We highly suggest you use the same\nemojis that ",(0,r.jsx)(s.strong,{children:"nsCore"})," uses."]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/constants/botConst.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:success:1242828455964315750>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:failed:1242828548297719898>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:caution:1242828667718209637>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" info"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:info:1242828626311774320>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" seen"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:seen:1242828705768935575>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:slash:1242828744171982900>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:ts:1244152291364176002>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" js"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:js:1244152318207856672>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" apps"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:apps:1244153325075697724>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" link"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:links:1244153412199649300>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devlopers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:developers:1244271269701091480>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" github"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:github:1244270608754278463>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" leaf"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:leaf:1244270440701100093>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" sparkles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:pearls:1244270698080501770>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" sparklesd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:pearlsd:1244270768599339028>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vscode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:vscode:1244270888757629111>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bugs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:bugs:1244270990620627034>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:message:1244271071511838801>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:id:1244271770618564740>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inbox"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:inbox:1244271719003193424>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" colors"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:colors:1244271646278422649>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" members"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:members:1244271591785758801>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" home"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:home:1244271538849579058>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" globe"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:globe:1244271487112970291>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" creators"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:creators:1244271212582928404>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" heat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:heat:1244316740330979360>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:permissions:1244316852562427934>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tips"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:tips:1244316790922678414>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" username"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:username:1244531006711664712>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" server"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:serverd:1244600141835403345>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:channel:1244649126788988929>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" badges"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:badges:1244649060015673356>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" seo"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:seo:1244532163484057700>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" crown"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:crown:1244600088492507218>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fun"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:fun:1244650971389235293>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" roles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:roles:1244994437071896714>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" al"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:al:1245751475532070922>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ar"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:ar:1245751409014472735>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"})]})]})}),"\n",(0,r.jsx)(a.UW,{children:(0,r.jsxs)(s.p,{children:["You can use your own emojis, and if you wanted to use ",(0,r.jsx)(s.strong,{children:"nsCore"})," emojis, then contact with them in\ntheir server, here is the ",(0,r.jsx)(s.a,{href:"https://discord.gg/HvEjEpbDR6",children:"link"}),"."]})}),"\n",(0,r.jsx)(s.p,{children:"successfully completed our constant section also, Now we can move ahead."})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/config&const/constSetup.mdx",route:"/developer/config&const/constSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Setting up Constants",headings:c},pageNextRoute:"/developer/config&const/constSetup",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(p)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=5236)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[218],{5236:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/config&const/constSetup",function(){return n(2940)}])},2940:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),a=n(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Adding Colors",id:"adding-colors"},{depth:3,value:"Adding Emojis",id:"adding-emojis"}];function d(e){let s=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span",strong:"strong",a:"a"},(0,t.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Setting up Constants"}),"\n",(0,r.jsx)(s.p,{children:"In this section we will set our necessary const. so lets begin."}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["First, create a folder named ",(0,r.jsx)(s.code,{children:"constants"})," inside the ",(0,r.jsx)(s.code,{children:"src"})," directory. Inside this ",(0,r.jsx)(s.code,{children:"constants"})," folder, create a file named ",(0,r.jsx)(s.code,{children:"botConst.ts"}),". This files will hold the constants for your project."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(a.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(a.zH.Folder,{name:"configs",children:[(0,r.jsx)(a.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(a.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(a.zH.Folder,{name:"constants",children:(0,r.jsx)(a.zH.File,{name:"botConst.ts"})})]})})})]}),"\n",(0,r.jsx)(s.h3,{id:"adding-colors",children:"Adding Colors"}),"\n",(0,r.jsxs)(s.p,{children:["Now we will add our ",(0,r.jsx)(s.code,{children:"colors"})," for our app, this are the default colors for our app."]}),"\n",(0,r.jsxs)(s.p,{children:["In the ",(0,r.jsx)(s.code,{children:"botConst.ts"})," file, we will add our colors:"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/constants/botConst.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ColorResolvable } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { [key"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ColorResolvable"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" red"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff3b30'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" orange"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff9500'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" yellow"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ffcc00'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" green"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#34c759'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mint"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#00c7be'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" teal"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#30b0c7'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" cyan"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#32ade6'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blue"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#007aff'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" indigo"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#5856d6'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" purple"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#af52de'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" pink"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#ff2d55'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" brown"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#a2845e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lightGray"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#aeaeb2'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" lightGrayMid"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#3a3a3c'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" grayMid"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#2c2c2e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" darkGray"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'#1c1c1e'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"})]})]})}),"\n",(0,r.jsx)(s.p,{children:"Done, now lets add emojis."}),"\n",(0,r.jsx)(s.h3,{id:"adding-emojis",children:"Adding Emojis"}),"\n",(0,r.jsxs)(s.p,{children:["Now we will add our ",(0,r.jsx)(s.code,{children:"emojis"}),", in the same file i.e ",(0,r.jsx)(s.code,{children:"botConst.ts"})," add the emoji constants also:"]}),"\n",(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(s.p,{children:["Listen carefully: These emojis are specially created by ",(0,r.jsx)(s.strong,{children:"nsCore"})," Developers for the ",(0,r.jsx)(s.strong,{children:"nsCore"}),"\napp. These emojis follow the color theme of the above colors. We highly suggest you use the same\nemojis that ",(0,r.jsx)(s.strong,{children:"nsCore"})," uses."]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/constants/botConst.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" success"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:success:1242828455964315750>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:failed:1242828548297719898>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:caution:1242828667718209637>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" info"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:info:1242828626311774320>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" seen"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:seen:1242828705768935575>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" slash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:slash:1242828744171982900>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ts"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:ts:1244152291364176002>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" js"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:js:1244152318207856672>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" apps"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:apps:1244153325075697724>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" link"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:links:1244153412199649300>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" devlopers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:developers:1244271269701091480>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" github"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:github:1244270608754278463>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" leaf"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:leaf:1244270440701100093>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" sparkles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:pearls:1244270698080501770>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" sparklesd"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:pearlsd:1244270768599339028>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" vscode"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:vscode:1244270888757629111>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" bugs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:bugs:1244270990620627034>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:message:1244271071511838801>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:id:1244271770618564740>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" inbox"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:inbox:1244271719003193424>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" colors"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:colors:1244271646278422649>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" members"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:members:1244271591785758801>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" home"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:home:1244271538849579058>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" globe"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:globe:1244271487112970291>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" creators"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:creators:1244271212582928404>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" heat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:heat:1244316740330979360>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:permissions:1244316852562427934>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" tips"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:tips:1244316790922678414>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" username"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:username:1244531006711664712>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" server"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:serverd:1244600141835403345>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" channel"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:channel:1244649126788988929>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" badges"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:badges:1244649060015673356>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" seo"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:seo:1244532163484057700>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" crown"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:crown:1244600088492507218>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" fun"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:fun:1244650971389235293>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" roles"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:roles:1244994437071896714>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" al"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:al:1245751475532070922>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ar"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'<:ar:1245751409014472735>'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"})]})]})}),"\n",(0,r.jsx)(a.UW,{children:(0,r.jsxs)(s.p,{children:["You can use your own emojis, and if you wanted to use ",(0,r.jsx)(s.strong,{children:"nsCore"})," emojis, then contact with them in\ntheir server, here is the ",(0,r.jsx)(s.a,{href:"https://discord.gg/HvEjEpbDR6",children:"link"}),"."]})}),"\n",(0,r.jsx)(s.p,{children:"successfully completed our constant section also, Now we can move ahead."})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/config&const/constSetup.mdx",route:"/developer/config&const/constSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Setting up Constants",headings:c},pageNextRoute:"/developer/config&const/constSetup",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(p)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);var o=n(1163),i=n(1334);let l={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:n}=(0,o.useRouter)(),{frontMatter:l}=(0,i.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:l.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:l.description||"A production level discord app guide"})]})}};s.Z=l},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=5236)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup-e7ff0c708ff4f78f.js b/_next/static/chunks/pages/developer/eventSetup-ffac683ee9646672.js similarity index 60% rename from _next/static/chunks/pages/developer/eventSetup-e7ff0c708ff4f78f.js rename to _next/static/chunks/pages/developer/eventSetup-ffac683ee9646672.js index 4be3529..578f7e5 100644 --- a/_next/static/chunks/pages/developer/eventSetup-e7ff0c708ff4f78f.js +++ b/_next/static/chunks/pages/developer/eventSetup-ffac683ee9646672.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{9835:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup",function(){return t(4647)}])},4647:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),r=t(2673),o=t(1334),i=t(2069);t(9488);var a=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Type of events",id:"type-of-events"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",ul:"ul",li:"li",a:"a"},(0,a.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Introduction"}),"\n",(0,d.jsx)(n.p,{children:"This section will cover the event handling part, which is a fundamental concept of a Discord bot."}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"To efficiently handle events in our Discord bot, we'll structure our project in a way that separates different responsibilities. Below is an example project structure focusing on event handling:"}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"events"})]})})}),"\n",(0,d.jsxs)(n.h2,{id:"type-of-events",children:["Type of ",(0,d.jsx)(n.code,{children:"events"})]}),"\n",(0,d.jsx)(n.p,{children:"Discord has various types of events; however, the main three events required to run an app are:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"ready"})," event"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"messageCreate"})," event"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"interactionCreate"})," event"]}),"\n"]}),"\n",(0,d.jsx)(s.UW,{type:"info",children:(0,d.jsxs)(n.p,{children:["You can learn about more events from discord.js\n",(0,d.jsx)(n.a,{href:"https://discordjs.guide/creating-your-bot/event-handling.html",children:"events"}),"."]})}),"\n",(0,d.jsx)(n.p,{children:"Now let's understand these events one by one! So, let's go!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/index.mdx",route:"/developer/eventSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introduction",headings:l},pageNextRoute:"/developer/eventSetup",nextraLayout:o.ZP,themeConfig:i.Z};n.default=(0,r.j)(p)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=9835)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{9835:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup",function(){return t(4647)}])},4647:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),d=t(2673),o=t(1334),i=t(2069);t(9488);var a=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Type of events",id:"type-of-events"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",ul:"ul",li:"li",a:"a"},(0,a.a)(),e.components);return s.zH||p("FileTree",!1),s.zH.File||p("FileTree.File",!0),s.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Introduction"}),"\n",(0,r.jsx)(n.p,{children:"This section will cover the event handling part, which is a fundamental concept of a Discord bot."}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(n.p,{children:"To efficiently handle events in our Discord bot, we'll structure our project in a way that separates different responsibilities. Below is an example project structure focusing on event handling:"}),"\n",(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(s.zH.Folder,{name:"configs",children:[(0,r.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"constants",children:(0,r.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,r.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,r.jsx)(s.zH.File,{name:"Command.ts"}),(0,r.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"events"})]})})}),"\n",(0,r.jsxs)(n.h2,{id:"type-of-events",children:["Type of ",(0,r.jsx)(n.code,{children:"events"})]}),"\n",(0,r.jsx)(n.p,{children:"Discord has various types of events; however, the main three events required to run an app are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ready"})," event"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"messageCreate"})," event"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"interactionCreate"})," event"]}),"\n"]}),"\n",(0,r.jsx)(s.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["You can learn about more events from discord.js\n",(0,r.jsx)(n.a,{href:"https://discordjs.guide/creating-your-bot/event-handling.html",children:"events"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"Now let's understand these events one by one! So, let's go!"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let u={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/index.mdx",route:"/developer/eventSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introduction",headings:l},pageNextRoute:"/developer/eventSetup",nextraLayout:o.ZP,themeConfig:i.Z};n.default=(0,d.j)(u)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var d=t(1163),o=t(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,d.useRouter)(),{frontMatter:i}=(0,o.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=9835)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/centralize-e03e160a5e53cd24.js b/_next/static/chunks/pages/developer/eventSetup/centralize-0bbb2c3c0bcb9f58.js similarity index 88% rename from _next/static/chunks/pages/developer/eventSetup/centralize-e03e160a5e53cd24.js rename to _next/static/chunks/pages/developer/eventSetup/centralize-0bbb2c3c0bcb9f58.js index d4dd46c..a2b010e 100644 --- a/_next/static/chunks/pages/developer/eventSetup/centralize-e03e160a5e53cd24.js +++ b/_next/static/chunks/pages/developer/eventSetup/centralize-0bbb2c3c0bcb9f58.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31],{9136:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/centralize",function(){return t(1263)}])},1263:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),i=t(2673),o=t(1334),s=t(2069);t(9488);var a=t(2643),d=t(2154);let l=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Add eventIndex.ts",id:"add-eventindexts"},{depth:3,value:"Verification",id:"verification"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span"},(0,a.a)(),e.components);return d.zH||p("FileTree",!1),d.zH.File||p("FileTree.File",!0),d.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Centralize Handler"}),"\n",(0,r.jsx)(n.p,{children:"Now, we have to create a entralized function, to export and import our events, this makes a better and easier way to export events."}),"\n",(0,r.jsxs)(d.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.code,{children:"eventIndex.ts"})," file inside the ",(0,r.jsx)(n.code,{children:"event"})," folder."]}),(0,r.jsx)(d.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(d.zH.Folder,{name:"events",defaultOpen:!0,children:[(0,r.jsx)(d.zH.File,{name:"eventIndex.ts"}),(0,r.jsxs)(d.zH.Folder,{name:"client",children:[(0,r.jsx)(d.zH.File,{name:"ready.ts"}),(0,r.jsx)(d.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(d.zH.File,{name:"interactionCreate.ts"})]})]})}),(0,r.jsxs)(n.h3,{id:"add-eventindexts",children:["Add ",(0,r.jsx)(n.code,{children:"eventIndex.ts"})]}),(0,r.jsxs)(n.p,{children:["This is our ",(0,r.jsx)(n.code,{children:"centralize"})," handler code:"]}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/eventIndex.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { registerReadyEvent } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/ready'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlerInteraction } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/interactionCreate'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlerMessage } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/messageCreate'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlers"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"registerReadyEvent"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerInteraction"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerMessage"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(d.UW,{children:"You can add more functions like this to centralize event handling."}),(0,r.jsx)(n.h3,{id:"verification",children:"Verification"}),(0,r.jsx)(n.p,{children:"Ensure you have imported everything correctly."})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, lets move ahead,"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/centralize.mdx",route:"/developer/eventSetup/centralize",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Centralize Handler",headings:l},pageNextRoute:"/developer/eventSetup/centralize",nextraLayout:o.ZP,themeConfig:s.Z};n.default=(0,i.j)(h)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=9136)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31],{9136:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/centralize",function(){return t(1263)}])},1263:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),i=t(2673),o=t(1334),s=t(2069);t(9488);var a=t(2643),d=t(2154);let l=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Add eventIndex.ts",id:"add-eventindexts"},{depth:3,value:"Verification",id:"verification"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h3:"h3",code:"code",pre:"pre",span:"span"},(0,a.a)(),e.components);return d.zH||p("FileTree",!1),d.zH.File||p("FileTree.File",!0),d.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Centralize Handler"}),"\n",(0,r.jsx)(n.p,{children:"Now, we have to create a entralized function, to export and import our events, this makes a better and easier way to export events."}),"\n",(0,r.jsxs)(d.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.code,{children:"eventIndex.ts"})," file inside the ",(0,r.jsx)(n.code,{children:"event"})," folder."]}),(0,r.jsx)(d.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(d.zH.Folder,{name:"events",defaultOpen:!0,children:[(0,r.jsx)(d.zH.File,{name:"eventIndex.ts"}),(0,r.jsxs)(d.zH.Folder,{name:"client",children:[(0,r.jsx)(d.zH.File,{name:"ready.ts"}),(0,r.jsx)(d.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(d.zH.File,{name:"interactionCreate.ts"})]})]})}),(0,r.jsxs)(n.h3,{id:"add-eventindexts",children:["Add ",(0,r.jsx)(n.code,{children:"eventIndex.ts"})]}),(0,r.jsxs)(n.p,{children:["This is our ",(0,r.jsx)(n.code,{children:"centralize"})," handler code:"]}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/eventIndex.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { registerReadyEvent } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/ready'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlerInteraction } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/interactionCreate'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { eventHandlerMessage } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./client/messageCreate'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlers"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"registerReadyEvent"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerInteraction"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerMessage"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(client)"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(d.UW,{children:"You can add more functions like this to centralize event handling."}),(0,r.jsx)(n.h3,{id:"verification",children:"Verification"}),(0,r.jsx)(n.p,{children:"Ensure you have imported everything correctly."})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, lets move ahead,"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/centralize.mdx",route:"/developer/eventSetup/centralize",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Centralize Handler",headings:l},pageNextRoute:"/developer/eventSetup/centralize",nextraLayout:o.ZP,themeConfig:s.Z};n.default=(0,i.j)(h)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var i=t(1163),o=t(1334);let s={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,i.useRouter)(),{frontMatter:s}=(0,o.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:s.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:s.description||"A production level discord app guide"})]})}};n.Z=s},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=9136)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/interactionCreate-d929851e2222802c.js b/_next/static/chunks/pages/developer/eventSetup/interactionCreate-b92759c4157335e3.js similarity index 97% rename from _next/static/chunks/pages/developer/eventSetup/interactionCreate-d929851e2222802c.js rename to _next/static/chunks/pages/developer/eventSetup/interactionCreate-b92759c4157335e3.js index 3d794d3..0391115 100644 --- a/_next/static/chunks/pages/developer/eventSetup/interactionCreate-d929851e2222802c.js +++ b/_next/static/chunks/pages/developer/eventSetup/interactionCreate-b92759c4157335e3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{1073:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/interactionCreate",function(){return n(1424)}])},1424:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),c=n(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create interactionCreate.ts",id:"create-interactioncreatets"}];function h(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,t.a)(),e.components);return c.zH||d("FileTree",!1),c.zH.File||d("FileTree.File",!0),c.zH.Folder||d("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Interaction Create Event"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"interactionCreate"})," event in Discord.js is triggered whenever an interaction is created. This event is useful for handling various types of interactions such as slash commands, button clicks, and select menu selections. By listening to this event, you can execute specific code whenever a user interacts with your bot in these ways."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now inside the ",(0,r.jsx)(s.code,{children:"client"})," folder add our ",(0,r.jsx)(s.code,{children:"interactionCreate.ts"})," file."]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(c.zH.Folder,{name:"events",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"client",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"ready.ts"}),(0,r.jsx)(c.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(c.zH.File,{name:"interactionCreate.ts"})]})})})}),(0,r.jsxs)(s.h3,{id:"create-interactioncreatets",children:["Create ",(0,r.jsx)(s.code,{children:"interactionCreate.ts"})]}),(0,r.jsxs)(s.p,{children:["Now, we have to write the logic for our ",(0,r.jsx)(s.code,{children:"interactionCreate"})," event. This file will contain the logic that should be executed whenever a new interaction is created. Typically, you will check the type of interaction and then execute the corresponding action."]}),(0,r.jsx)(c.UW,{type:"info",children:(0,r.jsx)(s.p,{children:"This interaction event handler comes with developer commands, bot permissions, and user permission\nchecks built-in."})}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/interactionCreate.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ChatInputCommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" GuildMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../utils/logger'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/botConfig'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".on"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'interactionCreate'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".guildId) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".commandName"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Use slashCommands collection"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"command) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".warn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Command not found: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"member"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.permissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Readonly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?.has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"userPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" You don't have the required permissions to use this commandz`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [userPermEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"guild"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"members"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.id "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GuildMember"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'I cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" I don't have the required permissions to run this command`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [botPermEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".devOnly "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".includes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id)) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"devOnlyEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" This command is only for developers.`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [devOnlyEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"try"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ChatInputCommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" client)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (error) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error executing command: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" - "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(error)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"errorEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Oops!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There was an error trying to execute that command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [errorEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(c.UW,{children:(0,r.jsx)(s.p,{children:"You can add more interactions, for example, context interactions and other Discord.js\ninteractions."})})]}),"\n",(0,r.jsx)(s.p,{children:"Done, now let's go ahead!"})]})}function d(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/interactionCreate.mdx",route:"/developer/eventSetup/interactionCreate",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Interaction Create Event",headings:a},pageNextRoute:"/developer/eventSetup/interactionCreate",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(x)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1073)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{1073:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/interactionCreate",function(){return n(1424)}])},1424:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(5893),o=n(2673),i=n(1334),l=n(2069);n(9488);var t=n(2643),c=n(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create interactionCreate.ts",id:"create-interactioncreatets"}];function h(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,t.a)(),e.components);return c.zH||d("FileTree",!1),c.zH.File||d("FileTree.File",!0),c.zH.Folder||d("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Interaction Create Event"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"interactionCreate"})," event in Discord.js is triggered whenever an interaction is created. This event is useful for handling various types of interactions such as slash commands, button clicks, and select menu selections. By listening to this event, you can execute specific code whenever a user interacts with your bot in these ways."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now inside the ",(0,r.jsx)(s.code,{children:"client"})," folder add our ",(0,r.jsx)(s.code,{children:"interactionCreate.ts"})," file."]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(c.zH.Folder,{name:"events",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"client",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"ready.ts"}),(0,r.jsx)(c.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(c.zH.File,{name:"interactionCreate.ts"})]})})})}),(0,r.jsxs)(s.h3,{id:"create-interactioncreatets",children:["Create ",(0,r.jsx)(s.code,{children:"interactionCreate.ts"})]}),(0,r.jsxs)(s.p,{children:["Now, we have to write the logic for our ",(0,r.jsx)(s.code,{children:"interactionCreate"})," event. This file will contain the logic that should be executed whenever a new interaction is created. Typically, you will check the type of interaction and then execute the corresponding action."]}),(0,r.jsx)(c.UW,{type:"info",children:(0,r.jsx)(s.p,{children:"This interaction event handler comes with developer commands, bot permissions, and user permission\nchecks built-in."})}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/interactionCreate.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ChatInputCommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" GuildMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../utils/logger'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/botConfig'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".on"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'interactionCreate'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".guildId) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".commandName"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Use slashCommands collection"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"command) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".warn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Command not found: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"member"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.permissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Readonly"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?.has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"userPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" You don't have the required permissions to use this commandz`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [userPermEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"guild"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"members"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"cache"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.id "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"''"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"GuildMember"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botMember"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'I cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" I don't have the required permissions to run this command`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [botPermEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".devOnly "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".includes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id)) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"devOnlyEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'You cannot use this command!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" This command is only for developers.`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [devOnlyEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"try"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".executeSlash"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(interaction "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"as"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ChatInputCommandInteraction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" client)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (error) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error executing command: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" - "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(error)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"errorEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Oops!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There was an error trying to execute that command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"interaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [errorEmbed]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ephemeral"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(c.UW,{children:(0,r.jsx)(s.p,{children:"You can add more interactions, for example, context interactions and other Discord.js\ninteractions."})})]}),"\n",(0,r.jsx)(s.p,{children:"Done, now let's go ahead!"})]})}function d(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/interactionCreate.mdx",route:"/developer/eventSetup/interactionCreate",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Interaction Create Event",headings:a},pageNextRoute:"/developer/eventSetup/interactionCreate",nextraLayout:i.ZP,themeConfig:l.Z};s.default=(0,o.j)(x)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);var o=n(1163),i=n(1334);let l={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:n}=(0,o.useRouter)(),{frontMatter:l}=(0,i.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:l.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:l.description||"A production level discord app guide"})]})}};s.Z=l},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1073)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/messageCreate-24dc8ba6c5554e86.js b/_next/static/chunks/pages/developer/eventSetup/messageCreate-24dc8ba6c5554e86.js deleted file mode 100644 index a2888c4..0000000 --- a/_next/static/chunks/pages/developer/eventSetup/messageCreate-24dc8ba6c5554e86.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[759],{9560:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/messageCreate",function(){return n(9568)}])},9568:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return a}});var r=n(5893),o=n(2673),l=n(1334),i=n(2069);n(9488);var t=n(2643),c=n(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create messageCreate.ts",id:"create-messagecreatets"}];function h(s){let e=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),s.components);return c.zH||d("FileTree",!1),c.zH.File||d("FileTree.File",!0),c.zH.Folder||d("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"Message Create Event"}),"\n",(0,r.jsxs)(e.p,{children:["The ",(0,r.jsx)(e.code,{children:"messageCreate"})," event in Discord.js is triggered whenever a new message is created in a text channel. This event is useful for building features such as command handling, automated responses, and various message-based interactions. By listening to this event, you can execute specific code whenever a user sends a message in your Discord server."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(e.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(e.p,{children:["Now inside the ",(0,r.jsx)(e.code,{children:"client"})," folder add our ",(0,r.jsx)(e.code,{children:"messageCreate.ts"})," file"]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(c.zH.Folder,{name:"events",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"client",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"ready.ts"}),(0,r.jsx)(c.zH.File,{name:"messageCreate.ts"})]})})})}),(0,r.jsxs)(e.h3,{id:"create-messagecreatets",children:["Create ",(0,r.jsx)(e.code,{children:"messageCreate.ts"})]}),(0,r.jsxs)(e.p,{children:["Now, we have to write the logic for our ",(0,r.jsx)(e.code,{children:"message create"})," event. This file will contain the logic that should be executed whenever a new message is created. Typically, you will check if the message starts with a command prefix and then execute the corresponding command."]}),(0,r.jsx)(c.UW,{type:"info",children:(0,r.jsx)(e.p,{children:"This message event handler comes with developer commands, bot permissions, and user permission\nchecks built-in."})}),(0,r.jsx)(e.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/messageCreate.ts",hasCopyCode:!0,children:(0,r.jsxs)(e.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" Message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionsBitField } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../utils/logger'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { BOT } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/metadata'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/botConfig'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" { EMOJIS } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerMessage"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".on"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'messageCreate'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"author"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".bot "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".guild) "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"content"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".startsWith"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"content"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".slice"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"length"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".trim"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".split"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/ "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"g"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"commandName"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".shift"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"?.toLowerCase"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"commandName) "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName)"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"command) {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".warn"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Command not found: "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"unknownCommand"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There is no command like this`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [unknownCommand] })"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"member"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"?."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions))"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"userPermEmbed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" You don't have the required permissions to use this command`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [userPermEmbed] })"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".user) {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Client user is null'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"guild"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"members"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".cache"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ?."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions))"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"botPermEmbed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`I cannot use this command!`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" I don't have the required permissions to run this command`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [botPermEmbed] })"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".devOnly "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".includes"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"author"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".id)) {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"devOnlyEmbed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" This command is only for developers`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [devOnlyEmbed] })"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"try"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".executeMessage"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" client)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"catch"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (error) {"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error executing command: "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" error)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"(error)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"eE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Opps!'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There was an error trying to run that command!`"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" [eE] })"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(c.UW,{type:"error",children:(0,r.jsxs)(e.p,{children:["At this moment, you may get some errors because we haven't created our ",(0,r.jsx)(e.code,{children:"logger"})," function yet! For\nthe ",(0,r.jsx)(e.code,{children:"logger"})," function, please refer to the ",(0,r.jsx)(e.a,{href:"/developer/utilSetup/logger",children:"logging guide"}),"."]})})]}),"\n",(0,r.jsx)(e.p,{children:"Alright we have done, now let's go further!"})]})}function d(s,e){throw Error("Expected "+(e?"component":"object")+" `"+s+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,t.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(h,{...s})}):h(s)},pageOpts:{filePath:"src/pages/developer/eventSetup/messageCreate.mdx",route:"/developer/eventSetup/messageCreate",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Message Create Event",headings:a},pageNextRoute:"/developer/eventSetup/messageCreate",nextraLayout:l.ZP,themeConfig:i.Z};e.default=(0,o.j)(x)},2069:function(s,e,n){"use strict";var r=n(5893);n(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};e.Z=o},5789:function(){}},function(s){s.O(0,[235,888,774,179],function(){return s(s.s=9560)}),_N_E=s.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/messageCreate-c1fd62772587de6a.js b/_next/static/chunks/pages/developer/eventSetup/messageCreate-c1fd62772587de6a.js new file mode 100644 index 0000000..83fd77a --- /dev/null +++ b/_next/static/chunks/pages/developer/eventSetup/messageCreate-c1fd62772587de6a.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[759],{9560:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/messageCreate",function(){return n(9568)}])},9568:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return a}});var r=n(5893),o=n(2673),l=n(1334),i=n(2069);n(9488);var t=n(2643),c=n(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create messageCreate.ts",id:"create-messagecreatets"}];function h(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),e.components);return c.zH||d("FileTree",!1),c.zH.File||d("FileTree.File",!0),c.zH.Folder||d("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Message Create Event"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"messageCreate"})," event in Discord.js is triggered whenever a new message is created in a text channel. This event is useful for building features such as command handling, automated responses, and various message-based interactions. By listening to this event, you can execute specific code whenever a user sends a message in your Discord server."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now inside the ",(0,r.jsx)(s.code,{children:"client"})," folder add our ",(0,r.jsx)(s.code,{children:"messageCreate.ts"})," file"]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(c.zH.Folder,{name:"events",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"client",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"ready.ts"}),(0,r.jsx)(c.zH.File,{name:"messageCreate.ts"})]})})})}),(0,r.jsxs)(s.h3,{id:"create-messagecreatets",children:["Create ",(0,r.jsx)(s.code,{children:"messageCreate.ts"})]}),(0,r.jsxs)(s.p,{children:["Now, we have to write the logic for our ",(0,r.jsx)(s.code,{children:"message create"})," event. This file will contain the logic that should be executed whenever a new message is created. Typically, you will check if the message starts with a command prefix and then execute the corresponding command."]}),(0,r.jsx)(c.UW,{type:"info",children:(0,r.jsx)(s.p,{children:"This message event handler comes with developer commands, bot permissions, and user permission\nchecks built-in."})}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/messageCreate.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionsBitField } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../utils/logger'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { BOT } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/metadata'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/botConfig'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { COLORS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { EMOJIS } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../constants/botConst'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"eventHandlerMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".on"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'messageCreate'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"author"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".bot "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".guild) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"content"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".startsWith"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"content"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".slice"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"length"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".trim"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".split"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/ "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"/"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"g"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".shift"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?.toLowerCase"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commandName)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"command) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".warn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Command not found: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"unknownCommand"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There is no command like this`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [unknownCommand] })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"member"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"?."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".userPermissions))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"userPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" You don't have the required permissions to use this command`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [userPermEmbed] })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".user) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Client user is null'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"guild"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"members"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".cache"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".get"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ?."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"permissions"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".has"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"PermissionsBitField"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".botPermissions))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ) {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"botPermEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`I cannot use this command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" I don't have the required permissions to run this command`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [botPermEmbed] })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".devOnly "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"DEVELOPER_IDS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".includes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"author"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id)) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"devOnlyEmbed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".yellow)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`You cannot use this command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".caution"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" This command is only for developers`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTimestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [devOnlyEmbed] })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"try"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".executeMessage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" client)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (error) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error executing command: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"commandName"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"+"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" error)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(error)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"eE"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"EmbedBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setColor"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"COLORS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".red)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setTitle"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Opps!'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setDescription"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"EMOJIS"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".failed"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" There was an error trying to run that command!`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".reply"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ embeds"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [eE] })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(c.UW,{type:"error",children:(0,r.jsxs)(s.p,{children:["At this moment, you may get some errors because we haven't created our ",(0,r.jsx)(s.code,{children:"logger"})," function yet! For\nthe ",(0,r.jsx)(s.code,{children:"logger"})," function, please refer to the ",(0,r.jsx)(s.a,{href:"/developer/utilSetup/logger",children:"logging guide"}),"."]})})]}),"\n",(0,r.jsx)(s.p,{children:"Alright we have done, now let's go further!"})]})}function d(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/messageCreate.mdx",route:"/developer/eventSetup/messageCreate",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Message Create Event",headings:a},pageNextRoute:"/developer/eventSetup/messageCreate",nextraLayout:l.ZP,themeConfig:i.Z};s.default=(0,o.j)(x)},2069:function(e,s,n){"use strict";var r=n(5893);n(7294);var o=n(1163),l=n(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:n}=(0,o.useRouter)(),{frontMatter:i}=(0,l.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};s.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=9560)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/ready-861dce86147230e5.js b/_next/static/chunks/pages/developer/eventSetup/ready-861dce86147230e5.js deleted file mode 100644 index 73f91ad..0000000 --- a/_next/static/chunks/pages/developer/eventSetup/ready-861dce86147230e5.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[103],{654:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/ready",function(){return s(3666)}])},3666:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return d}});var r=s(5893),t=s(2673),o=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let d=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create ready.ts",id:"create-readyts"},{depth:3,value:"Required Dependencies",id:"required-dependencies"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Ready Event"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"ready"})," event in Discord.js is a crucial event that signifies when the bot has successfully connected to Discord and is ready to start receiving and responding to events. This event is triggered once, immediately after the bot logs in and establishes a connection with Discord's servers."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["First, create a folder named ",(0,r.jsx)(n.code,{children:"events"})," inside the ",(0,r.jsx)(n.code,{children:"src"})," folder. Then create a ",(0,r.jsx)(n.code,{children:"client"})," folder inside the ",(0,r.jsx)(n.code,{children:"events"})," folder and add a file named ",(0,r.jsx)(n.code,{children:"ready.ts"}),"."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"events",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"client",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"ready.ts"})})})})}),(0,r.jsxs)(n.h3,{id:"create-readyts",children:["Create ",(0,r.jsx)(n.code,{children:"ready.ts"})]}),(0,r.jsxs)(n.p,{children:["Now we will write the logic for the ",(0,r.jsx)(n.code,{children:"ready"})," event."]}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/ready.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logPastelPink } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ActivityType } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { BOT } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/metadata'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"registerReadyEvent"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".once"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ready'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelPink"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Successfully connected both Message & Slash clients "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.tag"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"!`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"?.setPresence"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" activities"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"help • "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.username"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"ActivityType"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".Custom"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" status"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'online'"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsxs)(n.p,{children:["You can customize this as you want. For more information, please visit the\n",(0,r.jsx)(n.a,{href:"https://discord.js.org/docs/packages/discord.js/14.15.3/Client:Class#ready",children:"Discord.js"})," official\ndocumentation about the ",(0,r.jsx)(n.code,{children:"ready"})," event and its types."]})}),(0,r.jsx)(n.h3,{id:"required-dependencies",children:"Required Dependencies"}),(0,r.jsxs)(n.p,{children:["For this, you may have noticed that we have used the color library ",(0,r.jsx)(n.code,{children:"nstypocolors"}),". Install ",(0,r.jsx)(n.code,{children:"nstypocolors"})," via ",(0,r.jsx)(n.a,{href:"https://www.npmjs.com/package/nstypocolors",children:"npm"})]}),(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"nstypocolors"})]})})}),(0,r.jsx)(a.UW,{type:"warning",children:(0,r.jsxs)(n.p,{children:["We are highly suggested you to use ",(0,r.jsx)(n.code,{children:"nstypocolors"})," only, dont use any other color libraries."]})})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, we have done it! Now let's move ahead."})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/ready.mdx",route:"/developer/eventSetup/ready",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Ready Event",headings:d},pageNextRoute:"/developer/eventSetup/ready",nextraLayout:o.ZP,themeConfig:i.Z};n.default=(0,t.j)(p)},2069:function(e,n,s){"use strict";var r=s(5893);s(7294);let t={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=t},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=654)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/eventSetup/ready-98e8936d2d0e3234.js b/_next/static/chunks/pages/developer/eventSetup/ready-98e8936d2d0e3234.js new file mode 100644 index 0000000..2f6567f --- /dev/null +++ b/_next/static/chunks/pages/developer/eventSetup/ready-98e8936d2d0e3234.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[103],{654:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/eventSetup/ready",function(){return s(3666)}])},3666:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var t=s(5893),r=s(2673),o=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create ready.ts",id:"create-readyts"},{depth:3,value:"Required Dependencies",id:"required-dependencies"}];function d(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Ready Event"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"ready"})," event in Discord.js is a crucial event that signifies when the bot has successfully connected to Discord and is ready to start receiving and responding to events. This event is triggered once, immediately after the bot logs in and establishes a connection with Discord's servers."]}),"\n",(0,t.jsxs)(a.Rg,{children:[(0,t.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,t.jsxs)(n.p,{children:["First, create a folder named ",(0,t.jsx)(n.code,{children:"events"})," inside the ",(0,t.jsx)(n.code,{children:"src"})," folder. Then create a ",(0,t.jsx)(n.code,{children:"client"})," folder inside the ",(0,t.jsx)(n.code,{children:"events"})," folder and add a file named ",(0,t.jsx)(n.code,{children:"ready.ts"}),"."]}),(0,t.jsx)(a.zH,{children:(0,t.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,t.jsx)(a.zH.Folder,{name:"events",defaultOpen:!0,children:(0,t.jsx)(a.zH.Folder,{name:"client",defaultOpen:!0,children:(0,t.jsx)(a.zH.File,{name:"ready.ts"})})})})}),(0,t.jsxs)(n.h3,{id:"create-readyts",children:["Create ",(0,t.jsx)(n.code,{children:"ready.ts"})]}),(0,t.jsxs)(n.p,{children:["Now we will write the logic for the ",(0,t.jsx)(n.code,{children:"ready"})," event."]}),(0,t.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/events/client/ready.ts",hasCopyCode:!0,children:(0,t.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logPastelPink } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../interfaces/ExtendedClient'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ActivityType } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { BOT } "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../../configs/metadata'"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"registerReadyEvent"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".once"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'ready'"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelPink"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Successfully connected both Message & Slash clients "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.tag"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"!`"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:" "}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"?.setPresence"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" activities"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"PREFIX"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"help • "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"user"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"?.username"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"ActivityType"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".Custom"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" status"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'online'"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,t.jsx)(a.UW,{type:"info",children:(0,t.jsxs)(n.p,{children:["You can customize this as you want. For more information, please visit the\n",(0,t.jsx)(n.a,{href:"https://discord.js.org/docs/packages/discord.js/14.15.3/Client:Class#ready",children:"Discord.js"})," official\ndocumentation about the ",(0,t.jsx)(n.code,{children:"ready"})," event and its types."]})}),(0,t.jsx)(n.h3,{id:"required-dependencies",children:"Required Dependencies"}),(0,t.jsxs)(n.p,{children:["For this, you may have noticed that we have used the color library ",(0,t.jsx)(n.code,{children:"nstypocolors"}),". Install ",(0,t.jsx)(n.code,{children:"nstypocolors"})," via ",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/package/nstypocolors",children:"npm"})]}),(0,t.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,t.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,t.jsxs)(n.span,{className:"line",children:[(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,t.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"nstypocolors"})]})})}),(0,t.jsx)(a.UW,{type:"warning",children:(0,t.jsxs)(n.p,{children:["We are highly suggested you to use ",(0,t.jsx)(n.code,{children:"nstypocolors"})," only, dont use any other color libraries."]})})]}),"\n",(0,t.jsx)(n.p,{children:"Alright, we have done it! Now let's move ahead."})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/eventSetup/ready.mdx",route:"/developer/eventSetup/ready",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Ready Event",headings:c},pageNextRoute:"/developer/eventSetup/ready",nextraLayout:o.ZP,themeConfig:i.Z};n.default=(0,r.j)(p)},2069:function(e,n,s){"use strict";var t=s(5893);s(7294);var r=s(1163),o=s(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,t.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,r.useRouter)(),{frontMatter:i}=(0,o.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("meta",{property:"og:url",content:l}),(0,t.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,t.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=654)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/gettingStarted-eeca41d304036d40.js b/_next/static/chunks/pages/developer/gettingStarted-8944885e008bdf25.js similarity index 57% rename from _next/static/chunks/pages/developer/gettingStarted-eeca41d304036d40.js rename to _next/static/chunks/pages/developer/gettingStarted-8944885e008bdf25.js index ffde5f7..e78a8ad 100644 --- a/_next/static/chunks/pages/developer/gettingStarted-eeca41d304036d40.js +++ b/_next/static/chunks/pages/developer/gettingStarted-8944885e008bdf25.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[937],{332:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/gettingStarted",function(){return t(2749)}])},2749:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var a=t(5893),o=t(2673),d=t(1334),i=t(2069);t(9488);var r=t(2643),s=t(2154);let l=[{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Initiating a Project Folder",id:"initiating-a-project-folder"},{depth:2,value:"Installation",id:"installation-1"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",a:"a",pre:"pre",code:"code",span:"span"},(0,r.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,a.jsx)(n.p,{children:"Lets dive into the ocean of discord app development."}),"\n",(0,a.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,a.jsxs)(n.p,{children:["To install Node.js, visit the official ",(0,a.jsx)(n.a,{href:"https://nodejs.org/",children:" Node.js "})," website and download the installer for your operating system. Follow the installation instructions provided by the installer."]}),"\n",(0,a.jsxs)(n.p,{children:["Once Node.js is installed, you'll have access to ",(0,a.jsx)(n.a,{href:"https://www.npmjs.com/",children:"npm"}),", which is used to install packages and manage dependencies for your Node.js projects."]}),"\n",(0,a.jsx)(n.h2,{id:"initiating-a-project-folder",children:"Initiating a Project Folder"}),"\n",(0,a.jsx)(n.p,{children:"To initiate a new project folder, open your terminal or command prompt and navigate to the directory where you want to create your project. Then, run the following command:"}),"\n",(0,a.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,a.jsxs)(n.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(n.span,{className:"line",children:[(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"mkdir"}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"nscore"})]}),"\n",(0,a.jsxs)(n.span,{className:"line",children:[(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"nscore"})]})]})}),"\n",(0,a.jsx)(s.UW,{type:"warning",children:(0,a.jsxs)(n.p,{children:["I am not including the steps to create a Discord app (bot) or setting up Node.js. If you are\nunfamiliar with these processes, please refer to the ",(0,a.jsx)(n.a,{href:"https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot",children:"Discord.js\ndocumentation"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"installation-1",children:"Installation"}),"\n",(0,a.jsxs)(n.p,{children:["Now, let's install ",(0,a.jsx)(n.a,{href:"https://discord.js.org/",children:"Discord.js"}),", which is a powerful library for interacting with the Discord API."]}),"\n",(0,a.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,a.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(n.span,{className:"line",children:[(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"discord.js"})]})})}),"\n",(0,a.jsx)(n.p,{children:"This command will download and install Discord.js and all its dependencies into your project folder. Once the installation is complete, you're ready to start building your Discord bot using Discord.js!"}),"\n",(0,a.jsx)(n.p,{children:"All set! Now we are ready to go further!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/gettingStarted.mdx",route:"/developer/gettingStarted",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/gettingStarted",nextraLayout:d.ZP,themeConfig:i.Z};n.default=(0,o.j)(p)},2069:function(e,n,t){"use strict";var a=t(5893);t(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,a.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,a.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=332)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[937],{332:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/gettingStarted",function(){return n(2749)}])},2749:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return l}});var a=n(5893),o=n(2673),r=n(1334),i=n(2069);n(9488);var d=n(2643),s=n(2154);let l=[{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Initiating a Project Folder",id:"initiating-a-project-folder"},{depth:2,value:"Installation",id:"installation-1"}];function c(e){let t=Object.assign({h1:"h1",p:"p",h2:"h2",a:"a",pre:"pre",code:"code",span:"span"},(0,d.a)(),e.components);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{children:"Getting Started"}),"\n",(0,a.jsx)(t.p,{children:"Lets dive into the ocean of discord app development."}),"\n",(0,a.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,a.jsxs)(t.p,{children:["To install Node.js, visit the official ",(0,a.jsx)(t.a,{href:"https://nodejs.org/",children:" Node.js "})," website and download the installer for your operating system. Follow the installation instructions provided by the installer."]}),"\n",(0,a.jsxs)(t.p,{children:["Once Node.js is installed, you'll have access to ",(0,a.jsx)(t.a,{href:"https://www.npmjs.com/",children:"npm"}),", which is used to install packages and manage dependencies for your Node.js projects."]}),"\n",(0,a.jsx)(t.h2,{id:"initiating-a-project-folder",children:"Initiating a Project Folder"}),"\n",(0,a.jsx)(t.p,{children:"To initiate a new project folder, open your terminal or command prompt and navigate to the directory where you want to create your project. Then, run the following command:"}),"\n",(0,a.jsx)(t.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,a.jsxs)(t.code,{"data-language":"bash","data-theme":"default",children:[(0,a.jsxs)(t.span,{className:"line",children:[(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"mkdir"}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"nscore"})]}),"\n",(0,a.jsxs)(t.span,{className:"line",children:[(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"cd"}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"nscore"})]})]})}),"\n",(0,a.jsx)(s.UW,{type:"warning",children:(0,a.jsxs)(t.p,{children:["I am not including the steps to create a Discord app (bot) or setting up Node.js. If you are\nunfamiliar with these processes, please refer to the ",(0,a.jsx)(t.a,{href:"https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot",children:"Discord.js\ndocumentation"}),"."]})}),"\n",(0,a.jsx)(t.h2,{id:"installation-1",children:"Installation"}),"\n",(0,a.jsxs)(t.p,{children:["Now, let's install ",(0,a.jsx)(t.a,{href:"https://discord.js.org/",children:"Discord.js"}),", which is a powerful library for interacting with the Discord API."]}),"\n",(0,a.jsx)(t.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,a.jsx)(t.code,{"data-language":"bash","data-theme":"default",children:(0,a.jsxs)(t.span,{className:"line",children:[(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,a.jsx)(t.span,{style:{color:"var(--shiki-token-string)"},children:"discord.js"})]})})}),"\n",(0,a.jsx)(t.p,{children:"This command will download and install Discord.js and all its dependencies into your project folder. Once the installation is complete, you're ready to start building your Discord bot using Discord.js!"}),"\n",(0,a.jsx)(t.p,{children:"All set! Now we are ready to go further!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,d.a)(),e.components);return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/gettingStarted.mdx",route:"/developer/gettingStarted",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/gettingStarted",nextraLayout:r.ZP,themeConfig:i.Z};t.default=(0,o.j)(p)},2069:function(e,t,n){"use strict";var a=n(5893);n(7294);var o=n(1163),r=n(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,a.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,a.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:t,locale:n}=(0,o.useRouter)(),{frontMatter:i}=(0,r.ZR)(),d="https://nsgpriyanshu.github.io/nsdocs"+(t===n?e:"/".concat(n).concat(e));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("meta",{property:"og:url",content:d}),(0,a.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,a.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};t.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=332)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/handlerSetup-27814520ea3da312.js b/_next/static/chunks/pages/developer/handlerSetup-0b4fc2cefd153827.js similarity index 59% rename from _next/static/chunks/pages/developer/handlerSetup-27814520ea3da312.js rename to _next/static/chunks/pages/developer/handlerSetup-0b4fc2cefd153827.js index 1f1b533..f4ecfea 100644 --- a/_next/static/chunks/pages/developer/handlerSetup-27814520ea3da312.js +++ b/_next/static/chunks/pages/developer/handlerSetup-0b4fc2cefd153827.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9],{2488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup",function(){return t(15)}])},15:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var d=t(5893),r=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Types",id:"types"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.h1,{children:"Introduction"}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.code,{children:"Handlers"})," in a Discord bot are essential components that manage different aspects of the bot's functionality. They are responsible for organizing and processing specific types of events or actions, such as commands, errors, and other interactions. By using ",(0,d.jsx)(n.code,{children:"handlers"}),", you can keep your code modular, clean, and maintainable. ",(0,d.jsx)(n.code,{children:"Handlers"})," help in separating different concerns, making the bot easier to debug, extend, and manage."]}),"\n",(0,d.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(n.p,{children:"An overview of our project structure"}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsxs)(s.zH.Folder,{name:"utils",children:[(0,d.jsx)(s.zH.File,{name:"logger.ts"}),(0,d.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"handlers",defaultOpen:!0})]})})}),"\n",(0,d.jsx)(n.h2,{id:"types",children:"Types"}),"\n",(0,d.jsx)(n.p,{children:"For this project, we are going to use:"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"commandHandler"})," for handling commands"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"errorHandler"})," for handling errors"]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"So, let's go!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/index.mdx",route:"/developer/handlerSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introduction",headings:l},pageNextRoute:"/developer/handlerSetup",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,r.j)(p)},2069:function(e,n,t){"use strict";var d=t(5893);t(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2488)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9],{2488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup",function(){return t(15)}])},15:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),d=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Types",id:"types"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||p("FileTree",!1),s.zH.File||p("FileTree.File",!0),s.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Introduction"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Handlers"})," in a Discord bot are essential components that manage different aspects of the bot's functionality. They are responsible for organizing and processing specific types of events or actions, such as commands, errors, and other interactions. By using ",(0,r.jsx)(n.code,{children:"handlers"}),", you can keep your code modular, clean, and maintainable. ",(0,r.jsx)(n.code,{children:"Handlers"})," help in separating different concerns, making the bot easier to debug, extend, and manage."]}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(n.p,{children:"An overview of our project structure"}),"\n",(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(s.zH.Folder,{name:"configs",children:[(0,r.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"constants",children:(0,r.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,r.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,r.jsx)(s.zH.File,{name:"Command.ts"}),(0,r.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,r.jsxs)(s.zH.Folder,{name:"events",children:[(0,r.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,r.jsxs)(s.zH.Folder,{name:"client",children:[(0,r.jsx)(s.zH.File,{name:"ready.ts"}),(0,r.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,r.jsxs)(s.zH.Folder,{name:"utils",children:[(0,r.jsx)(s.zH.File,{name:"logger.ts"}),(0,r.jsx)(s.zH.File,{name:"deploy.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"handlers",defaultOpen:!0})]})})}),"\n",(0,r.jsx)(n.h2,{id:"types",children:"Types"}),"\n",(0,r.jsx)(n.p,{children:"For this project, we are going to use:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"commandHandler"})," for handling commands"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"errorHandler"})," for handling errors"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"So, let's go!"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let u={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/index.mdx",route:"/developer/handlerSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introduction",headings:l},pageNextRoute:"/developer/handlerSetup",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,d.j)(u)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var d=t(1163),o=t(1334);let a={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,d.useRouter)(),{frontMatter:a}=(0,o.ZR)(),i="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:i}),(0,r.jsx)("meta",{property:"og:title",content:a.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:a.description||"A production level discord app guide"})]})}};n.Z=a},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2488)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/handlerSetup/cmd-3cb558ef6031aa43.js b/_next/static/chunks/pages/developer/handlerSetup/cmd-a5d9f7345c4b4cbd.js similarity index 96% rename from _next/static/chunks/pages/developer/handlerSetup/cmd-3cb558ef6031aa43.js rename to _next/static/chunks/pages/developer/handlerSetup/cmd-a5d9f7345c4b4cbd.js index 7d75c1f..d291428 100644 --- a/_next/static/chunks/pages/developer/handlerSetup/cmd-3cb558ef6031aa43.js +++ b/_next/static/chunks/pages/developer/handlerSetup/cmd-a5d9f7345c4b4cbd.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[543],{4679:function(e,s,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup/cmd",function(){return o(7299)}])},7299:function(e,s,o){"use strict";o.r(s),o.d(s,{__toc:function(){return a}});var n=o(5893),r=o(2673),l=o(1334),i=o(2069);o(9488);var t=o(2643),c=o(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create commandHandler.ts",id:"create-commandhandlerts"},{depth:3,value:"Verification",id:"verification"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),e.components);return c.zH||h("FileTree",!1),c.zH.File||h("FileTree.File",!0),c.zH.Folder||h("FileTree.Folder",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Command Handler"}),"\n",(0,n.jsxs)(s.p,{children:["A ",(0,n.jsx)(s.code,{children:"command handler"})," in a Discord bot is responsible for processing and executing commands received from users. It helps in organizing the command logic, making it easier to manage and extend. By using a ",(0,n.jsx)(s.code,{children:"command handler"}),", you can separate the command definitions from the execution logic, ensuring that each command is handled appropriately based on the user's input."]}),"\n",(0,n.jsxs)(c.Rg,{children:[(0,n.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,n.jsxs)(s.p,{children:["Create a folder named ",(0,n.jsx)(s.code,{children:"handlers"})," inside the ",(0,n.jsx)(s.code,{children:"src"})," folder, and then create a file named ",(0,n.jsx)(s.code,{children:"commandHandler.ts"}),"."]}),(0,n.jsx)(c.zH,{children:(0,n.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,n.jsx)(c.zH.Folder,{name:"handlers",defaultOpen:!0,children:(0,n.jsx)(c.zH.File,{name:"commandHandler.ts"})})})}),(0,n.jsxs)(s.h3,{id:"create-commandhandlerts",children:["Create ",(0,n.jsx)(s.code,{children:"commandHandler.ts"})]}),(0,n.jsxs)(s.p,{children:["This file will contain the logic of the command handler. It supports both ",(0,n.jsx)(s.code,{children:"message"})," and ",(0,n.jsx)(s.code,{children:"interaction"})," commands."]}),(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/handlers/commandHandler.ts",hasCopyCode:!0,children:(0,n.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { Collection } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" statSync } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fs'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { join } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'path'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { Command } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/Command'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/ExtendedClient'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../utils/logger'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"commandHandler"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".slashCommands "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".messageCommands "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath).default"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"typeof"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".executeSlash "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'function'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" command)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Slash command loaded: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" from "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath).default"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"typeof"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".executeMessage "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'function'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" command)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Message command loaded: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" from "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Message command "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" does not have executeMessage function defined`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../commands/slashCommands'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../commands/messageCommands'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".sLog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'All commands loaded'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Loaded slash command: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Loaded message command: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,n.jsx)(s.h3,{id:"verification",children:"Verification"}),(0,n.jsxs)(s.p,{children:["Ensure that your ",(0,n.jsx)(s.code,{children:"commands"})," are correctly imported from your ",(0,n.jsx)(s.a,{href:"/developer/interfaceSetup/command",children:(0,n.jsx)(s.code,{children:"command interface"})}),"."]})]}),"\n",(0,n.jsx)(s.p,{children:"Alright, now let's go further!"})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/cmd.mdx",route:"/developer/handlerSetup/cmd",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Command Handler",headings:a},pageNextRoute:"/developer/handlerSetup/cmd",nextraLayout:l.ZP,themeConfig:i.Z};s.default=(0,r.j)(x)},2069:function(e,s,o){"use strict";var n=o(5893);o(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,n.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,n.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4679)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[543],{4679:function(e,s,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup/cmd",function(){return o(7299)}])},7299:function(e,s,o){"use strict";o.r(s),o.d(s,{__toc:function(){return a}});var n=o(5893),r=o(2673),l=o(1334),i=o(2069);o(9488);var t=o(2643),c=o(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create commandHandler.ts",id:"create-commandhandlerts"},{depth:3,value:"Verification",id:"verification"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),e.components);return c.zH||h("FileTree",!1),c.zH.File||h("FileTree.File",!0),c.zH.Folder||h("FileTree.Folder",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Command Handler"}),"\n",(0,n.jsxs)(s.p,{children:["A ",(0,n.jsx)(s.code,{children:"command handler"})," in a Discord bot is responsible for processing and executing commands received from users. It helps in organizing the command logic, making it easier to manage and extend. By using a ",(0,n.jsx)(s.code,{children:"command handler"}),", you can separate the command definitions from the execution logic, ensuring that each command is handled appropriately based on the user's input."]}),"\n",(0,n.jsxs)(c.Rg,{children:[(0,n.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,n.jsxs)(s.p,{children:["Create a folder named ",(0,n.jsx)(s.code,{children:"handlers"})," inside the ",(0,n.jsx)(s.code,{children:"src"})," folder, and then create a file named ",(0,n.jsx)(s.code,{children:"commandHandler.ts"}),"."]}),(0,n.jsx)(c.zH,{children:(0,n.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,n.jsx)(c.zH.Folder,{name:"handlers",defaultOpen:!0,children:(0,n.jsx)(c.zH.File,{name:"commandHandler.ts"})})})}),(0,n.jsxs)(s.h3,{id:"create-commandhandlerts",children:["Create ",(0,n.jsx)(s.code,{children:"commandHandler.ts"})]}),(0,n.jsxs)(s.p,{children:["This file will contain the logic of the command handler. It supports both ",(0,n.jsx)(s.code,{children:"message"})," and ",(0,n.jsx)(s.code,{children:"interaction"})," commands."]}),(0,n.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/handlers/commandHandler.ts",hasCopyCode:!0,children:(0,n.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { Collection } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" statSync } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fs'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { join } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'path'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { Command } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/Command'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../interfaces/ExtendedClient'"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../utils/logger'"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"commandHandler"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".slashCommands "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".messageCommands "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath).default"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"typeof"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".executeSlash "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'function'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" command)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Slash command loaded: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" from "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".endsWith"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")) {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"require"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath).default"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"typeof"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".executeMessage "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'function'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".set"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" command)"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Message command loaded: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" from "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"filePath"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Message command "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:" does not have executeMessage function defined`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../commands/slashCommands'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadMessageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../commands/messageCommands'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:" "}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".sLog"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'All commands loaded'"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"slashCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Loaded slash command: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsxs)(s.span,{className:"line",children:[(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"messageCommands"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".forEach"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((command"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name) "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Loaded message command: "}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"name"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"))"})]}),"\n",(0,n.jsx)(s.span,{className:"line",children:(0,n.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,n.jsx)(s.h3,{id:"verification",children:"Verification"}),(0,n.jsxs)(s.p,{children:["Ensure that your ",(0,n.jsx)(s.code,{children:"commands"})," are correctly imported from your ",(0,n.jsx)(s.a,{href:"/developer/interfaceSetup/command",children:(0,n.jsx)(s.code,{children:"command interface"})}),"."]})]}),"\n",(0,n.jsx)(s.p,{children:"Alright, now let's go further!"})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/cmd.mdx",route:"/developer/handlerSetup/cmd",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Command Handler",headings:a},pageNextRoute:"/developer/handlerSetup/cmd",nextraLayout:l.ZP,themeConfig:i.Z};s.default=(0,r.j)(x)},2069:function(e,s,o){"use strict";var n=o(5893);o(7294);var r=o(1163),l=o(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,n.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,n.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:o}=(0,r.useRouter)(),{frontMatter:i}=(0,l.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===o?e:"/".concat(o).concat(e));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{property:"og:url",content:t}),(0,n.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,n.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};s.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4679)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/handlerSetup/error-3a10e25bc980284a.js b/_next/static/chunks/pages/developer/handlerSetup/error-163e0473085f2399.js similarity index 71% rename from _next/static/chunks/pages/developer/handlerSetup/error-3a10e25bc980284a.js rename to _next/static/chunks/pages/developer/handlerSetup/error-163e0473085f2399.js index 79882cf..96b3f20 100644 --- a/_next/static/chunks/pages/developer/handlerSetup/error-3a10e25bc980284a.js +++ b/_next/static/chunks/pages/developer/handlerSetup/error-163e0473085f2399.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[818],{2204:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup/error",function(){return t(7262)}])},7262:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return s}});var r=t(5893),d=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),l=t(2154);let s=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create errorHandler.ts",id:"create-errorhandlerts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3"},(0,i.a)(),e.components);return l.zH||u("FileTree",!1),l.zH.File||u("FileTree.File",!0),l.zH.Folder||u("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Error Handler"}),"\n",(0,r.jsxs)(n.p,{children:["An ",(0,r.jsx)(n.code,{children:"error"})," handler in a Discord bot is essential for managing and responding to errors that occur during the bot's operation. This includes handling exceptions that may arise from command execution, API calls, or other unexpected events. An effective ",(0,r.jsx)(n.code,{children:"error"})," handler helps in maintaining the stability and reliability of the bot by gracefully managing errors and providing useful feedback to users and developers."]}),"\n",(0,r.jsxs)(l.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["Add ",(0,r.jsx)(n.code,{children:"errorHandler.ts"})," inside the ",(0,r.jsx)(n.code,{children:"handlers"})," folder."]}),(0,r.jsx)(l.zH,{children:(0,r.jsx)(l.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(l.zH.Folder,{name:"handlers",defaultOpen:!0,children:[(0,r.jsx)(l.zH.File,{name:"commandHandler.ts"}),(0,r.jsx)(l.zH.File,{name:"errorHandler.ts"})]})})}),(0,r.jsxs)(n.h3,{id:"create-errorhandlerts",children:["Create ",(0,r.jsx)(n.code,{children:"errorHandler.ts"})]}),(0,r.jsxs)(n.p,{children:["This file will contain the logic of the ",(0,r.jsx)(n.code,{children:"error handler"}),", ensuring that any errors encountered during the bot's execution are properly managed and logged."]}),(0,r.jsx)(l.UW,{type:"warning",children:"Docs for this part is under construction."})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, we have completed more than half now let's go further!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/error.mdx",route:"/developer/handlerSetup/error",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Error Handler",headings:s},pageNextRoute:"/developer/handlerSetup/error",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,d.j)(p)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let d={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=d},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2204)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[818],{2204:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/handlerSetup/error",function(){return t(7262)}])},7262:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),d=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let l=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create errorHandler.ts",id:"create-errorhandlerts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3"},(0,i.a)(),e.components);return s.zH||p("FileTree",!1),s.zH.File||p("FileTree.File",!0),s.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Error Handler"}),"\n",(0,r.jsxs)(n.p,{children:["An ",(0,r.jsx)(n.code,{children:"error"})," handler in a Discord bot is essential for managing and responding to errors that occur during the bot's operation. This includes handling exceptions that may arise from command execution, API calls, or other unexpected events. An effective ",(0,r.jsx)(n.code,{children:"error"})," handler helps in maintaining the stability and reliability of the bot by gracefully managing errors and providing useful feedback to users and developers."]}),"\n",(0,r.jsxs)(s.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["Add ",(0,r.jsx)(n.code,{children:"errorHandler.ts"})," inside the ",(0,r.jsx)(n.code,{children:"handlers"})," folder."]}),(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"handlers",defaultOpen:!0,children:[(0,r.jsx)(s.zH.File,{name:"commandHandler.ts"}),(0,r.jsx)(s.zH.File,{name:"errorHandler.ts"})]})})}),(0,r.jsxs)(n.h3,{id:"create-errorhandlerts",children:["Create ",(0,r.jsx)(n.code,{children:"errorHandler.ts"})]}),(0,r.jsxs)(n.p,{children:["This file will contain the logic of the ",(0,r.jsx)(n.code,{children:"error handler"}),", ensuring that any errors encountered during the bot's execution are properly managed and logged."]}),(0,r.jsx)(s.UW,{type:"warning",children:"Docs for this part is under construction."})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, we have completed more than half now let's go further!"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let u={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/handlerSetup/error.mdx",route:"/developer/handlerSetup/error",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Error Handler",headings:l},pageNextRoute:"/developer/handlerSetup/error",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,d.j)(u)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var d=t(1163),o=t(1334);let a={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,d.useRouter)(),{frontMatter:a}=(0,o.ZR)(),i="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:i}),(0,r.jsx)("meta",{property:"og:title",content:a.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:a.description||"A production level discord app guide"})]})}};n.Z=a},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2204)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/ignoringFiles-5c347377a93faefc.js b/_next/static/chunks/pages/developer/ignoringFiles-3d45fad3c5691a1e.js similarity index 86% rename from _next/static/chunks/pages/developer/ignoringFiles-5c347377a93faefc.js rename to _next/static/chunks/pages/developer/ignoringFiles-3d45fad3c5691a1e.js index db00364..98e4b62 100644 --- a/_next/static/chunks/pages/developer/ignoringFiles-5c347377a93faefc.js +++ b/_next/static/chunks/pages/developer/ignoringFiles-3d45fad3c5691a1e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[449],{6979:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/ignoringFiles",function(){return s(3926)}])},3926:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return d}});var i=s(5893),a=s(2673),t=s(1334),r=s(2069);s(9488);var l=s(2643),o=s(2154);let d=[{depth:2,value:"Git Ignore",id:"git-ignore"},{depth:2,value:"Prettier Ignore",id:"prettier-ignore"},{depth:2,value:"Eslint Ignore",id:"eslint-ignore"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span"},(0,l.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Ignoring Files"}),"\n",(0,i.jsx)(n.p,{children:"It's time to create the necessary ignore files to prevent certain files from being uploaded to GitHub!"}),"\n",(0,i.jsx)(n.h2,{id:"git-ignore",children:"Git Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Let's create a ",(0,i.jsx)(n.code,{children:".gitignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".gitignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Node.js"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"dist/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# TypeScript"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".tsbuildinfo"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Logs"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".log"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Testing and coverage"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage/"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".test.js"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# IDE-specific files"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".vscode/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".idea/"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".sublime-project"})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".sublime-workspace"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# OS-specific files"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".DS_Store"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Thumbs.db"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ehthumbs.db"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"desktop.ini"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Environment variables"})}),"\n",(0,i.jsx)(n.span,{className:"line highlighted",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".env"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Miscellaneous"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".gitignore"})]})]})}),"\n",(0,i.jsxs)(o.UW,{type:"error",children:["Don't forget to include your ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsx)(n.h2,{id:"prettier-ignore",children:"Prettier Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Let's create a ",(0,i.jsx)(n.code,{children:".prettierignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".prettierignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore artifacts:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"build"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".next"})})]})}),"\n",(0,i.jsx)(n.h2,{id:"eslint-ignore",children:"Eslint Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Also, its better to keep an ",(0,i.jsx)(n.code,{children:".eslintignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".eslintignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore artifacts:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"build/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore specific files:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"dist/"})})]})}),"\n",(0,i.jsx)(n.p,{children:"Alright, we have successfully created our ignore files. Now we can go ahead!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/ignoringFiles.mdx",route:"/developer/ignoringFiles",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Ignoring Files",headings:d},pageNextRoute:"/developer/ignoringFiles",nextraLayout:t.ZP,themeConfig:r.Z};n.default=(0,a.j)(p)},2069:function(e,n,s){"use strict";var i=s(5893);s(7294);let a={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,i.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=a},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=6979)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[449],{6979:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/ignoringFiles",function(){return s(3926)}])},3926:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return d}});var i=s(5893),t=s(2673),a=s(1334),r=s(2069);s(9488);var o=s(2643),l=s(2154);let d=[{depth:2,value:"Git Ignore",id:"git-ignore"},{depth:2,value:"Prettier Ignore",id:"prettier-ignore"},{depth:2,value:"Eslint Ignore",id:"eslint-ignore"}];function c(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span"},(0,o.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{children:"Ignoring Files"}),"\n",(0,i.jsx)(n.p,{children:"It's time to create the necessary ignore files to prevent certain files from being uploaded to GitHub!"}),"\n",(0,i.jsx)(n.h2,{id:"git-ignore",children:"Git Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Let's create a ",(0,i.jsx)(n.code,{children:".gitignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".gitignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Node.js"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"dist/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# TypeScript"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".tsbuildinfo"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Logs"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".log"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Testing and coverage"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage/"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".test.js"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# IDE-specific files"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".vscode/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".idea/"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".sublime-project"})]}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".sublime-workspace"})]}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# OS-specific files"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".DS_Store"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Thumbs.db"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ehthumbs.db"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"desktop.ini"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Environment variables"})}),"\n",(0,i.jsx)(n.span,{className:"line highlighted",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".env"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Miscellaneous"})}),"\n",(0,i.jsxs)(n.span,{className:"line",children:[(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".gitignore"})]})]})}),"\n",(0,i.jsxs)(l.UW,{type:"error",children:["Don't forget to include your ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsx)(n.h2,{id:"prettier-ignore",children:"Prettier Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Let's create a ",(0,i.jsx)(n.code,{children:".prettierignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".prettierignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore artifacts:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"build"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".next"})})]})}),"\n",(0,i.jsx)(n.h2,{id:"eslint-ignore",children:"Eslint Ignore"}),"\n",(0,i.jsxs)(n.p,{children:["Also, its better to keep an ",(0,i.jsx)(n.code,{children:".eslintignore"})," file:"]}),"\n",(0,i.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".eslintignore",hasCopyCode:!0,children:(0,i.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore artifacts:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"build/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"coverage/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"node_modules/"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:" "}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"# Ignore specific files:"})}),"\n",(0,i.jsx)(n.span,{className:"line",children:(0,i.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"dist/"})})]})}),"\n",(0,i.jsx)(n.p,{children:"Alright, we have successfully created our ignore files. Now we can go ahead!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,o.a)(),e.components);return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/ignoringFiles.mdx",route:"/developer/ignoringFiles",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Ignoring Files",headings:d},pageNextRoute:"/developer/ignoringFiles",nextraLayout:a.ZP,themeConfig:r.Z};n.default=(0,t.j)(p)},2069:function(e,n,s){"use strict";var i=s(5893);s(7294);var t=s(1163),a=s(1334);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,i.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,t.useRouter)(),{frontMatter:r}=(0,a.ZR)(),o="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("meta",{property:"og:url",content:o}),(0,i.jsx)("meta",{property:"og:title",content:r.title||"nsDocs"}),(0,i.jsx)("meta",{property:"og:description",content:r.description||"A production level discord app guide"})]})}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=6979)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/interfaceSetup-fe11dea655b5ba1e.js b/_next/static/chunks/pages/developer/interfaceSetup-4e111fe8e0dcbc36.js similarity index 64% rename from _next/static/chunks/pages/developer/interfaceSetup-fe11dea655b5ba1e.js rename to _next/static/chunks/pages/developer/interfaceSetup-4e111fe8e0dcbc36.js index dd24301..fb7f0f8 100644 --- a/_next/static/chunks/pages/developer/interfaceSetup-fe11dea655b5ba1e.js +++ b/_next/static/chunks/pages/developer/interfaceSetup-4e111fe8e0dcbc36.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55],{8887:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup",function(){return t(6442)}])},6442:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return c}});var r=t(5893),d=t(2673),o=t(1334),a=t(2069);t(9488);var i=t(2643),s=t(2154);let c=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Necessary Interfaces",id:"necessary-interfaces"}];function l(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Getting Started"}),"\n",(0,r.jsxs)(n.p,{children:["Let's start creating our ",(0,r.jsx)(n.code,{children:"interfaces"}),"!"]}),"\n",(0,r.jsx)(n.p,{children:"Interfaces in TypeScript define the structure of an object. They specify the types and the properties that an object should have. For a Discord bot, interfaces can help ensure that the objects we use, such as configurations, commands, and clients, adhere to the expected structure, which can prevent errors and improve code quality."}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(s.zH.Folder,{name:"configs",children:[(0,r.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"constants",children:(0,r.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,r.jsx)(s.zH.Folder,{name:"interfaces"})]})})}),"\n",(0,r.jsx)(n.h2,{id:"necessary-interfaces",children:"Necessary Interfaces"}),"\n",(0,r.jsx)(n.p,{children:"For this project we will use only:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ExtendedClient"})," interface"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Command"})," interface"]}),"\n"]}),"\n",(0,r.jsxs)(s.UW,{type:"error",children:["You can setup more ",(0,r.jsx)(n.code,{children:"interfaces"})," as of your need."]}),"\n",(0,r.jsx)(n.p,{children:"Now we can go ahead!"})]})}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/index.mdx",route:"/developer/interfaceSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:c},pageNextRoute:"/developer/interfaceSetup",nextraLayout:o.ZP,themeConfig:a.Z};n.default=(0,d.j)(p)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let d={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=d},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=8887)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55],{8887:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup",function(){return n(6442)}])},6442:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return c}});var r=n(5893),d=n(2673),o=n(1334),a=n(2069);n(9488);var i=n(2643),s=n(2154);let c=[{depth:2,value:"Project Structure",id:"project-structure"},{depth:2,value:"Necessary Interfaces",id:"necessary-interfaces"}];function l(e){let t=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,i.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Getting Started"}),"\n",(0,r.jsxs)(t.p,{children:["Let's start creating our ",(0,r.jsx)(t.code,{children:"interfaces"}),"!"]}),"\n",(0,r.jsx)(t.p,{children:"Interfaces in TypeScript define the structure of an object. They specify the types and the properties that an object should have. For a Discord bot, interfaces can help ensure that the objects we use, such as configurations, commands, and clients, adhere to the expected structure, which can prevent errors and improve code quality."}),"\n",(0,r.jsx)(t.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(s.zH.Folder,{name:"configs",children:[(0,r.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"constants",children:(0,r.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,r.jsx)(s.zH.Folder,{name:"interfaces"})]})})}),"\n",(0,r.jsx)(t.h2,{id:"necessary-interfaces",children:"Necessary Interfaces"}),"\n",(0,r.jsx)(t.p,{children:"For this project we will use only:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"ExtendedClient"})," interface"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"Command"})," interface"]}),"\n"]}),"\n",(0,r.jsxs)(s.UW,{type:"error",children:["You can setup more ",(0,r.jsx)(t.code,{children:"interfaces"})," as of your need."]}),"\n",(0,r.jsx)(t.p,{children:"Now we can go ahead!"})]})}function u(e,t){throw Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,i.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/index.mdx",route:"/developer/interfaceSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:c},pageNextRoute:"/developer/interfaceSetup",nextraLayout:o.ZP,themeConfig:a.Z};t.default=(0,d.j)(p)},2069:function(e,t,n){"use strict";var r=n(5893);n(7294);var d=n(1163),o=n(1334);let a={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:t,locale:n}=(0,d.useRouter)(),{frontMatter:a}=(0,o.ZR)(),i="https://nsgpriyanshu.github.io/nsdocs"+(t===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:i}),(0,r.jsx)("meta",{property:"og:title",content:a.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:a.description||"A production level discord app guide"})]})}};t.Z=a},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=8887)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/interfaceSetup/command-3342833e1befee40.js b/_next/static/chunks/pages/developer/interfaceSetup/command-8f590718415483b6.js similarity index 93% rename from _next/static/chunks/pages/developer/interfaceSetup/command-3342833e1befee40.js rename to _next/static/chunks/pages/developer/interfaceSetup/command-8f590718415483b6.js index 95a2052..ffa5507 100644 --- a/_next/static/chunks/pages/developer/interfaceSetup/command-3342833e1befee40.js +++ b/_next/static/chunks/pages/developer/interfaceSetup/command-8f590718415483b6.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89],{1170:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup/command",function(){return s(3890)}])},3890:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var o=s(5893),r=s(2673),i=s(1334),t=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create CommandInterface.ts",id:"create-commandinterfacets"}];function d(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Command Interface"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"Command Interface"})," is a structure that defines how commands should be organized and managed within your Discord bot. By creating a command interface, you ensure that each command follows a consistent format, making it easier to manage and execute commands. This can include defining properties like the command name, description, execute function, and any required permissions."]}),"\n",(0,o.jsxs)(a.Rg,{children:[(0,o.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,o.jsxs)(n.p,{children:["As you know we already have created the ",(0,o.jsx)(n.code,{children:"interfaces"})," folder so now just add ",(0,o.jsx)(n.code,{children:"Command.ts"})," inside the ",(0,o.jsx)(n.code,{children:"interfaces"})," folder."]}),(0,o.jsx)(a.zH,{children:(0,o.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,o.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,o.jsxs)(a.zH.Folder,{name:"interfaces",children:[(0,o.jsx)(a.zH.File,{name:"Command.ts"}),(0,o.jsx)(a.zH.File,{name:"ExtendedClient.ts"})]})})})}),(0,o.jsxs)(n.h3,{id:"create-commandinterfacets",children:["Create ",(0,o.jsx)(n.code,{children:"CommandInterface.ts"})]}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsx)(n.p,{children:"Defining a command interface helps ensure consistency and ease of management for all commands."})}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/interfaces/Command.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ChatInputCommandInteraction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandSubcommandsOnlyBuilder"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommandBuilder } "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@discordjs/builders'"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./ExtendedClient'"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Omit"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'addSubcommand'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'addSubcommandGroup'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandSubcommandsOnlyBuilder"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (interaction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ChatInputCommandInteraction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" client"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"userPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"botPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"devOnly"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" client"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"extends"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]})]})}),(0,o.jsx)(a.UW,{type:"warning",children:(0,o.jsx)(n.p,{children:"Ensure that all commands adhere to the defined interface for smooth operation."})})]}),"\n",(0,o.jsx)(n.p,{children:"Alright, now let's move ahead!"})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/command.mdx",route:"/developer/interfaceSetup/command",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Command Interface",headings:c},pageNextRoute:"/developer/interfaceSetup/command",nextraLayout:i.ZP,themeConfig:t.Z};n.default=(0,r.j)(x)},2069:function(e,n,s){"use strict";var o=s(5893);s(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,o.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1170)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89],{1170:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup/command",function(){return s(3890)}])},3890:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var o=s(5893),r=s(2673),t=s(1334),i=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create CommandInterface.ts",id:"create-commandinterfacets"}];function d(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"Command Interface"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"Command Interface"})," is a structure that defines how commands should be organized and managed within your Discord bot. By creating a command interface, you ensure that each command follows a consistent format, making it easier to manage and execute commands. This can include defining properties like the command name, description, execute function, and any required permissions."]}),"\n",(0,o.jsxs)(a.Rg,{children:[(0,o.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,o.jsxs)(n.p,{children:["As you know we already have created the ",(0,o.jsx)(n.code,{children:"interfaces"})," folder so now just add ",(0,o.jsx)(n.code,{children:"Command.ts"})," inside the ",(0,o.jsx)(n.code,{children:"interfaces"})," folder."]}),(0,o.jsx)(a.zH,{children:(0,o.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,o.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,o.jsxs)(a.zH.Folder,{name:"interfaces",children:[(0,o.jsx)(a.zH.File,{name:"Command.ts"}),(0,o.jsx)(a.zH.File,{name:"ExtendedClient.ts"})]})})})}),(0,o.jsxs)(n.h3,{id:"create-commandinterfacets",children:["Create ",(0,o.jsx)(n.code,{children:"CommandInterface.ts"})]}),(0,o.jsx)(a.UW,{type:"info",children:(0,o.jsx)(n.p,{children:"Defining a command interface helps ensure consistency and ease of management for all commands."})}),(0,o.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/interfaces/Command.ts",hasCopyCode:!0,children:(0,o.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ChatInputCommandInteraction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandSubcommandsOnlyBuilder"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { SlashCommandBuilder } "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'@discordjs/builders'"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { ExtendedClient } "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./ExtendedClient'"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" data"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Omit"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'addSubcommand'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'addSubcommandGroup'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"|"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandSubcommandsOnlyBuilder"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"executeSlash"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (interaction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ChatInputCommandInteraction"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" client"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"userPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"botPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"devOnly"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"executeMessage"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Message"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" args"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" client"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" userPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" botPermissions"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"PermissionResolvable"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" devOnly"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"boolean"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"extends"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"MessageCommand"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {}"})]})]})}),(0,o.jsx)(a.UW,{type:"warning",children:(0,o.jsx)(n.p,{children:"Ensure that all commands adhere to the defined interface for smooth operation."})})]}),"\n",(0,o.jsx)(n.p,{children:"Alright, now let's move ahead!"})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/command.mdx",route:"/developer/interfaceSetup/command",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Command Interface",headings:c},pageNextRoute:"/developer/interfaceSetup/command",nextraLayout:t.ZP,themeConfig:i.Z};n.default=(0,r.j)(p)},2069:function(e,n,s){"use strict";var o=s(5893);s(7294);var r=s(1163),t=s(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,o.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,r.useRouter)(),{frontMatter:i}=(0,t.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:url",content:l}),(0,o.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,o.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1170)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/interfaceSetup/extendedClient-2625d28d691d8244.js b/_next/static/chunks/pages/developer/interfaceSetup/extendedClient-20d7eb4cf24672a7.js similarity index 83% rename from _next/static/chunks/pages/developer/interfaceSetup/extendedClient-2625d28d691d8244.js rename to _next/static/chunks/pages/developer/interfaceSetup/extendedClient-20d7eb4cf24672a7.js index b034990..d837176 100644 --- a/_next/static/chunks/pages/developer/interfaceSetup/extendedClient-2625d28d691d8244.js +++ b/_next/static/chunks/pages/developer/interfaceSetup/extendedClient-20d7eb4cf24672a7.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[642],{1835:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup/extendedClient",function(){return t(7135)}])},7135:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),o=t(2673),i=t(1334),s=t(2069);t(9488);var d=t(2643),a=t(2154);let l=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create ExtendedClient.ts",id:"create-extendedclientts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,d.a)(),e.components);return a.zH||p("FileTree",!1),a.zH.File||p("FileTree.File",!0),a.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Extended Client"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"Extended Client"})," refers to an enhanced version of the standard Discord client provided by the ",(0,r.jsx)(n.code,{children:"discord.js"})," library. By extending the base client, we can add custom properties and methods that are specific to our bot's needs. This could include additional configurations, utility functions, or other custom features that the standard client does not provide."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["First, create a folder named ",(0,r.jsx)(n.code,{children:"interfaces"})," inside the ",(0,r.jsx)(n.code,{children:"src"})," directory. Inside this ",(0,r.jsx)(n.code,{children:"interfaces"})," folder, create a file named ",(0,r.jsx)(n.code,{children:"ExtendedClient.ts"}),". This files will hold the constants for your project."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"interfaces",children:(0,r.jsx)(a.zH.File,{name:"ExtendedClient.ts"})})})})}),(0,r.jsxs)(n.h3,{id:"create-extendedclientts",children:["Create ",(0,r.jsx)(n.code,{children:"ExtendedClient.ts"})]}),(0,r.jsx)(a.UW,{type:"info",children:"You can extend your client as you want!"}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/interfaces/ExtendedClient.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Collection } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Command } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./Command'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"extends"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" events"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"any"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]) "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" messageCommands"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" slashCommands"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, now let's move ahead!"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,d.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/extendedClient.mdx",route:"/developer/interfaceSetup/extendedClient",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Extended Client",headings:l},pageNextRoute:"/developer/interfaceSetup/extendedClient",nextraLayout:i.ZP,themeConfig:s.Z};n.default=(0,o.j)(h)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1835)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[642],{1835:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/interfaceSetup/extendedClient",function(){return t(7135)}])},7135:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return l}});var r=t(5893),o=t(2673),s=t(1334),i=t(2069);t(9488);var a=t(2643),d=t(2154);let l=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Create ExtendedClient.ts",id:"create-extendedclientts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,a.a)(),e.components);return d.zH||p("FileTree",!1),d.zH.File||p("FileTree.File",!0),d.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Extended Client"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"Extended Client"})," refers to an enhanced version of the standard Discord client provided by the ",(0,r.jsx)(n.code,{children:"discord.js"})," library. By extending the base client, we can add custom properties and methods that are specific to our bot's needs. This could include additional configurations, utility functions, or other custom features that the standard client does not provide."]}),"\n",(0,r.jsxs)(d.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["First, create a folder named ",(0,r.jsx)(n.code,{children:"interfaces"})," inside the ",(0,r.jsx)(n.code,{children:"src"})," directory. Inside this ",(0,r.jsx)(n.code,{children:"interfaces"})," folder, create a file named ",(0,r.jsx)(n.code,{children:"ExtendedClient.ts"}),". This files will hold the constants for your project."]}),(0,r.jsx)(d.zH,{children:(0,r.jsx)(d.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsx)(d.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(d.zH.Folder,{name:"interfaces",children:(0,r.jsx)(d.zH.File,{name:"ExtendedClient.ts"})})})})}),(0,r.jsxs)(n.h3,{id:"create-extendedclientts",children:["Create ",(0,r.jsx)(n.code,{children:"ExtendedClient.ts"})]}),(0,r.jsx)(d.UW,{type:"info",children:"You can extend your client as you want!"}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/interfaces/ExtendedClient.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" Collection } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { Command } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./Command'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"ExtendedClient"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"extends"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Client"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" events"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"args"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"any"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[]) "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"void"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" messageCommands"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" slashCommands"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Collection"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"Command"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]}),"\n",(0,r.jsx)(n.p,{children:"Alright, now let's move ahead!"})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/interfaceSetup/extendedClient.mdx",route:"/developer/interfaceSetup/extendedClient",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Extended Client",headings:l},pageNextRoute:"/developer/interfaceSetup/extendedClient",nextraLayout:s.ZP,themeConfig:i.Z};n.default=(0,o.j)(h)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var o=t(1163),s=t(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,o.useRouter)(),{frontMatter:i}=(0,s.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1835)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/settings-5a8be605f4f4c7a3.js b/_next/static/chunks/pages/developer/settings-548355899fb79c68.js similarity index 92% rename from _next/static/chunks/pages/developer/settings-5a8be605f4f4c7a3.js rename to _next/static/chunks/pages/developer/settings-548355899fb79c68.js index 1345f7d..cf7fb32 100644 --- a/_next/static/chunks/pages/developer/settings-5a8be605f4f4c7a3.js +++ b/_next/static/chunks/pages/developer/settings-548355899fb79c68.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[222],{4387:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/settings",function(){return s(3499)}])},3499:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var r=s(5893),t=s(2673),i=s(1334),o=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:2,value:"Setting up tsconfig.json",id:"setting-up-tsconfigjson"},{depth:2,value:"Setting up .env",id:"setting-up-env"}];function d(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Settings"}),"\n",(0,r.jsx)(n.p,{children:"In this part, we will add our environmental variables and TypeScript configurations!"}),"\n",(0,r.jsxs)(n.h2,{id:"setting-up-tsconfigjson",children:["Setting up ",(0,r.jsx)(n.code,{children:"tsconfig.json"})]}),"\n",(0,r.jsx)(n.p,{children:"Now we have to set up the TypeScript configuration for compiling our TypeScript code into JavaScript!"}),"\n",(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"tsconfig.json",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"compilerOptions"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"target"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2017"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"commonjs"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"strict"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"resolveJsonModule"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"esModuleInterop"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"skipLibCheck"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"forceConsistentCasingInFileNames"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"outDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./dist"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rootDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./src"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceMap"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"declaration"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"declarationDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./types"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"include"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"src/**/*"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"exclude"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node_modules"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"dist"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsxs)(n.p,{children:["You can add more compiler options from ",(0,r.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options-in-msbuild.html",children:"here"})]}),"\n",(0,r.jsxs)(n.h2,{id:"setting-up-env",children:["Setting up ",(0,r.jsx)(n.code,{children:".env"})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, this part is very crucial. Here we will set up our environmental variables, such as the ",(0,r.jsx)(n.code,{children:"app ID"}),", ",(0,r.jsx)(n.code,{children:"client ID"}),", etc."]}),"\n",(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(n.p,{children:["Never include your ",(0,r.jsx)(n.code,{children:".env"})," variables to public, Make sure you have put this on your git ignore\nfile."]})}),"\n",(0,r.jsx)(n.p,{children:"So here is the setup needed for our Discord app project!"}),"\n",(0,r.jsxs)(n.p,{children:["Fisrt install ",(0,r.jsx)(n.code,{children:"dotenv"})]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"dotenv"})]})})}),"\n",(0,r.jsxs)(n.p,{children:["Then add an ",(0,r.jsx)(n.code,{children:".env"})," file out of your ",(0,r.jsx)(n.code,{children:"src"})," directory!"]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".env",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" AUTH_TOKEN"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-BOT-TOKEN"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" CLIENT_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-BOT-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DEV-SERVER-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-ERROR-CHANNEL-ID"})]})]})}),"\n",(0,r.jsx)(n.p,{children:"Okay, now our basic configuration setup is done!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/settings.mdx",route:"/developer/settings",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Settings",headings:c},pageNextRoute:"/developer/settings",nextraLayout:i.ZP,themeConfig:o.Z};n.default=(0,t.j)(p)},2069:function(e,n,s){"use strict";var r=s(5893);s(7294);let t={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=t},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4387)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[222],{4387:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/settings",function(){return s(3499)}])},3499:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return c}});var r=s(5893),t=s(2673),i=s(1334),o=s(2069);s(9488);var l=s(2643),a=s(2154);let c=[{depth:2,value:"Setting up tsconfig.json",id:"setting-up-tsconfigjson"},{depth:2,value:"Setting up .env",id:"setting-up-env"}];function d(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",code:"code",pre:"pre",span:"span",a:"a"},(0,l.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Settings"}),"\n",(0,r.jsx)(n.p,{children:"In this part, we will add our environmental variables and TypeScript configurations!"}),"\n",(0,r.jsxs)(n.h2,{id:"setting-up-tsconfigjson",children:["Setting up ",(0,r.jsx)(n.code,{children:"tsconfig.json"})]}),"\n",(0,r.jsx)(n.p,{children:"Now we have to set up the TypeScript configuration for compiling our TypeScript code into JavaScript!"}),"\n",(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"tsconfig.json",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"{"})}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"compilerOptions"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"target"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"es2017"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"module"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"commonjs"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"strict"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"resolveJsonModule"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"esModuleInterop"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"skipLibCheck"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"forceConsistentCasingInFileNames"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"outDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./dist"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"rootDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./src"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"sourceMap"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"declaration"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"declarationDir"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"./types"'})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"include"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"src/**/*"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"]"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"exclude"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:": ["}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"node_modules"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"dist"'}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),"\n",(0,r.jsxs)(n.p,{children:["You can add more compiler options from ",(0,r.jsx)(n.a,{href:"https://www.typescriptlang.org/docs/handbook/compiler-options-in-msbuild.html",children:"here"})]}),"\n",(0,r.jsxs)(n.h2,{id:"setting-up-env",children:["Setting up ",(0,r.jsx)(n.code,{children:".env"})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, this part is very crucial. Here we will set up our environmental variables, such as the ",(0,r.jsx)(n.code,{children:"app ID"}),", ",(0,r.jsx)(n.code,{children:"client ID"}),", etc."]}),"\n",(0,r.jsx)(a.UW,{type:"error",children:(0,r.jsxs)(n.p,{children:["Never include your ",(0,r.jsx)(n.code,{children:".env"})," variables to public, Make sure you have put this on your git ignore\nfile."]})}),"\n",(0,r.jsx)(n.p,{children:"So here is the setup needed for our Discord app project!"}),"\n",(0,r.jsxs)(n.p,{children:["Fisrt install ",(0,r.jsx)(n.code,{children:"dotenv"})]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",hasCopyCode:!0,children:(0,r.jsx)(n.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"i"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"dotenv"})]})})}),"\n",(0,r.jsxs)(n.p,{children:["Then add an ",(0,r.jsx)(n.code,{children:".env"})," file out of your ",(0,r.jsx)(n.code,{children:"src"})," directory!"]}),"\n",(0,r.jsx)(n.pre,{"data-language":"bash","data-theme":"default",filename:".env",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"bash","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" AUTH_TOKEN"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-BOT-TOKEN"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" CLIENT_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-BOT-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" DEVELOPER_IDS"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DISCORD-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" SERVER_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-DEV-SERVER-ID"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" ERROR_CHANNEL_ID"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string)"},children:"YOUR-ERROR-CHANNEL-ID"})]})]})}),"\n",(0,r.jsx)(n.p,{children:"Okay, now our basic configuration setup is done!"})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/settings.mdx",route:"/developer/settings",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Settings",headings:c},pageNextRoute:"/developer/settings",nextraLayout:i.ZP,themeConfig:o.Z};n.default=(0,t.j)(p)},2069:function(e,n,s){"use strict";var r=s(5893);s(7294);var t=s(1163),i=s(1334);let o={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:s}=(0,t.useRouter)(),{frontMatter:o}=(0,i.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===s?e:"/".concat(s).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:l}),(0,r.jsx)("meta",{property:"og:title",content:o.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:o.description||"A production level discord app guide"})]})}};n.Z=o},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4387)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/utilSetup-a60465f09b1a29e2.js b/_next/static/chunks/pages/developer/utilSetup-0f12e5b1b33fddb9.js similarity index 62% rename from _next/static/chunks/pages/developer/utilSetup-a60465f09b1a29e2.js rename to _next/static/chunks/pages/developer/utilSetup-0f12e5b1b33fddb9.js index 2071523..560d890 100644 --- a/_next/static/chunks/pages/developer/utilSetup-a60465f09b1a29e2.js +++ b/_next/static/chunks/pages/developer/utilSetup-0f12e5b1b33fddb9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[562],{4042:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup",function(){return n(4975)}])},4975:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return l}});var d=n(5893),r=n(2673),o=n(1334),a=n(2069);n(9488);var i=n(2643),s=n(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"}];function c(e){let t=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2"},(0,i.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t.h1,{children:"Getting Started"}),"\n",(0,d.jsxs)(t.p,{children:["Utilities, or ",(0,d.jsx)(t.code,{children:"utils"}),", are helper functions and reusable code snippets that make development easier by providing common functionality that can be used throughout the project. These can include functions for logging, data processing, formatting, and other repetitive tasks."]}),"\n",(0,d.jsx)(t.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,d.jsx)(t.p,{children:"An overview of our project structure"}),"\n",(0,d.jsx)(s.zH,{children:(0,d.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,d.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,d.jsxs)(s.zH.Folder,{name:"configs",children:[(0,d.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,d.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,d.jsx)(s.zH.Folder,{name:"constants",children:(0,d.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,d.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,d.jsx)(s.zH.File,{name:"Command.ts"}),(0,d.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,d.jsxs)(s.zH.Folder,{name:"events",children:[(0,d.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,d.jsxs)(s.zH.Folder,{name:"client",children:[(0,d.jsx)(s.zH.File,{name:"ready.ts"}),(0,d.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,d.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,d.jsx)(s.zH.Folder,{name:"utils"})]})})}),"\n",(0,d.jsx)(t.p,{children:"Alright, let's begin!"})]})}function u(e,t){throw Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,i.a)(),e.components);return t?(0,d.jsx)(t,{...e,children:(0,d.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/index.mdx",route:"/developer/utilSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/utilSetup",nextraLayout:o.ZP,themeConfig:a.Z};t.default=(0,r.j)(p)},2069:function(e,t,n){"use strict";var d=n(5893);n(7294);let r={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,d.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};t.Z=r},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4042)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[562],{4042:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup",function(){return n(4975)}])},4975:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return l}});var r=n(5893),d=n(2673),o=n(1334),i=n(2069);n(9488);var a=n(2643),s=n(2154);let l=[{depth:2,value:"Project Structure",id:"project-structure"}];function c(e){let t=Object.assign({h1:"h1",p:"p",code:"code",h2:"h2"},(0,a.a)(),e.components);return s.zH||u("FileTree",!1),s.zH.File||u("FileTree.File",!0),s.zH.Folder||u("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{children:"Getting Started"}),"\n",(0,r.jsxs)(t.p,{children:["Utilities, or ",(0,r.jsx)(t.code,{children:"utils"}),", are helper functions and reusable code snippets that make development easier by providing common functionality that can be used throughout the project. These can include functions for logging, data processing, formatting, and other repetitive tasks."]}),"\n",(0,r.jsx)(t.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(t.p,{children:"An overview of our project structure"}),"\n",(0,r.jsx)(s.zH,{children:(0,r.jsx)(s.zH.Folder,{name:"nsCore",defaultOpen:!0,children:(0,r.jsxs)(s.zH.Folder,{name:"src",defaultOpen:!0,children:[(0,r.jsxs)(s.zH.Folder,{name:"configs",children:[(0,r.jsx)(s.zH.File,{name:"botConfig.ts"}),(0,r.jsx)(s.zH.File,{name:"metadata.ts"})]}),(0,r.jsx)(s.zH.Folder,{name:"constants",children:(0,r.jsx)(s.zH.File,{name:"botConst.ts"})}),(0,r.jsxs)(s.zH.Folder,{name:"interfaces",children:[(0,r.jsx)(s.zH.File,{name:"Command.ts"}),(0,r.jsx)(s.zH.File,{name:"ExtendedClient.ts"})]}),(0,r.jsxs)(s.zH.Folder,{name:"events",children:[(0,r.jsx)(s.zH.File,{name:"eventIndex.ts"}),(0,r.jsxs)(s.zH.Folder,{name:"client",children:[(0,r.jsx)(s.zH.File,{name:"ready.ts"}),(0,r.jsx)(s.zH.File,{name:"messageCreate.ts"}),(0,r.jsx)(s.zH.File,{name:"interactionCreate.ts"})]})]}),(0,r.jsx)(s.zH.Folder,{name:"utils"})]})})}),"\n",(0,r.jsx)(t.p,{children:"Alright, let's begin!"})]})}function u(e,t){throw Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,a.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/index.mdx",route:"/developer/utilSetup",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Getting Started",headings:l},pageNextRoute:"/developer/utilSetup",nextraLayout:o.ZP,themeConfig:i.Z};t.default=(0,d.j)(p)},2069:function(e,t,n){"use strict";var r=n(5893);n(7294);var d=n(1163),o=n(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:t,locale:n}=(0,d.useRouter)(),{frontMatter:i}=(0,o.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(t===n?e:"/".concat(n).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};t.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=4042)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/utilSetup/deployCommand-30471380fdfca32e.js b/_next/static/chunks/pages/developer/utilSetup/deployCommand-2ce07cfed8cf640f.js similarity index 96% rename from _next/static/chunks/pages/developer/utilSetup/deployCommand-30471380fdfca32e.js rename to _next/static/chunks/pages/developer/utilSetup/deployCommand-2ce07cfed8cf640f.js index 1455e01..714d701 100644 --- a/_next/static/chunks/pages/developer/utilSetup/deployCommand-30471380fdfca32e.js +++ b/_next/static/chunks/pages/developer/utilSetup/deployCommand-2ce07cfed8cf640f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[776],{2487:function(e,s,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup/deployCommand",function(){return o(2031)}])},2031:function(e,s,o){"use strict";o.r(s),o.d(s,{__toc:function(){return a}});var r=o(5893),n=o(2673),l=o(1334),i=o(2069);o(9488);var t=o(2643),c=o(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating deploy.ts",id:"creating-deployts"},{depth:3,value:"Ensuring .env",id:"ensuring-env"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),e.components);return c.zH||h("FileTree",!1),c.zH.File||h("FileTree.File",!0),c.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Deploy Function"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"deploy"})," function in a Discord bot is crucial for registering and updating slash commands with Discord's API. This function ensures that the bot's commands are correctly deployed to either a specific server (guild) or globally across all servers. By using a ",(0,r.jsx)(s.code,{children:"deploy"})," function, you can dynamically manage and update the bot's commands without manually configuring each command."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now, simply add a ",(0,r.jsx)(s.code,{children:"deploy.ts"})," file inside the ",(0,r.jsx)(s.code,{children:"utils"})," folder."]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"utils",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"logger.ts"}),(0,r.jsx)(c.zH.File,{name:"deploy.ts"})]})})}),(0,r.jsxs)(s.h3,{id:"creating-deployts",children:["Creating ",(0,r.jsx)(s.code,{children:"deploy.ts"})]}),(0,r.jsxs)(s.p,{children:["Here is the logic for the ",(0,r.jsx)(s.code,{children:"deploy"})," function:"]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/utils/deployCommand.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { REST"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Routes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { readdirSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" statSync } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fs'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" extname } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'path'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./logger'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../configs/botConfig'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Array"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"any"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"includeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'commands/slashCommands/general'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'commands/slashCommands/info'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dirs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[])"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[]> "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" reject) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"extname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(file) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"extname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(file) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandModule"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandModule"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".default"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (command "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".data "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"instanceof"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".push"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"data"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".toJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"())"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".all"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"dirs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commands))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(reject)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"absoluteIncludeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"includeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dir))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(absoluteIncludeDirectories)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commands "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"rest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"REST"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ version"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'10'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setToken"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_TOKEN"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Started refreshing application (/) commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"rest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".put"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Routes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".applicationCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_ID"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" commands })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Successfully reloaded application (/) commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(error "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (error "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"instanceof"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error registering commands: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Unknown error occurred while registering commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})})]})}),(0,r.jsx)(c.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["In case of any error, please contact with me in my ",(0,r.jsx)(s.a,{href:"https://discord.gg/HvEjEpbDR6",children:"discord server"})]})}),(0,r.jsxs)(s.h3,{id:"ensuring-env",children:["Ensuring ",(0,r.jsx)(s.code,{children:".env"})]}),(0,r.jsxs)(s.p,{children:["Ensure that your ",(0,r.jsx)(s.code,{children:"CLIENT_ID"})," and ",(0,r.jsx)(s.code,{children:"SERVER_ID"})," are correctly set in your ",(0,r.jsx)(s.a,{href:"../../../developer/settings",children:(0,r.jsx)(s.code,{children:".env"})})," file."]}),(0,r.jsx)(s.p,{children:"Finally, we have successfully completed our utility functions."})]})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/deployCommand.mdx",route:"/developer/utilSetup/deployCommand",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Deploy Function",headings:a},pageNextRoute:"/developer/utilSetup/deployCommand",nextraLayout:l.ZP,themeConfig:i.Z};s.default=(0,n.j)(x)},2069:function(e,s,o){"use strict";var r=o(5893);o(7294);let n={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};s.Z=n},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2487)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[776],{2487:function(e,s,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup/deployCommand",function(){return o(2031)}])},2031:function(e,s,o){"use strict";o.r(s),o.d(s,{__toc:function(){return a}});var r=o(5893),n=o(2673),l=o(1334),i=o(2069);o(9488);var t=o(2643),c=o(2154);let a=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating deploy.ts",id:"creating-deployts"},{depth:3,value:"Ensuring .env",id:"ensuring-env"}];function d(e){let s=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span",a:"a"},(0,t.a)(),e.components);return c.zH||h("FileTree",!1),c.zH.File||h("FileTree.File",!0),c.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Deploy Function"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"deploy"})," function in a Discord bot is crucial for registering and updating slash commands with Discord's API. This function ensures that the bot's commands are correctly deployed to either a specific server (guild) or globally across all servers. By using a ",(0,r.jsx)(s.code,{children:"deploy"})," function, you can dynamically manage and update the bot's commands without manually configuring each command."]}),"\n",(0,r.jsxs)(c.Rg,{children:[(0,r.jsx)(s.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(s.p,{children:["Now, simply add a ",(0,r.jsx)(s.code,{children:"deploy.ts"})," file inside the ",(0,r.jsx)(s.code,{children:"utils"})," folder."]}),(0,r.jsx)(c.zH,{children:(0,r.jsx)(c.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsxs)(c.zH.Folder,{name:"utils",defaultOpen:!0,children:[(0,r.jsx)(c.zH.File,{name:"logger.ts"}),(0,r.jsx)(c.zH.File,{name:"deploy.ts"})]})})}),(0,r.jsxs)(s.h3,{id:"creating-deployts",children:["Creating ",(0,r.jsx)(s.code,{children:"deploy.ts"})]}),(0,r.jsxs)(s.p,{children:["Here is the logic for the ",(0,r.jsx)(s.code,{children:"deploy"})," function:"]}),(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",filename:"src/utils/deployCommand.ts",hasCopyCode:!0,children:(0,r.jsxs)(s.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"2",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { REST"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Routes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" SlashCommandBuilder } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'discord.js'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { readdirSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" statSync } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'fs'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" extname } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'path'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { logger } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'./logger'"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" config "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../configs/botConfig'"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"interface"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" description"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" options"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"?:"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Array"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"any"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"includeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'commands/slashCommands/general'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'commands/slashCommands/info'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"]"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dirs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[])"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[]> "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" reject) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"[] "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" []"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (dir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"files"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"readdirSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"for"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"file"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"of"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" files) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"filePath"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" file)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"statSync"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"fileStat"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".isDirectory"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()) {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"extname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(file) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.ts'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"||"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"extname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(file) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'.js'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandModule"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(filePath)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commandModule"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".default"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (command "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"&&"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".data "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"instanceof"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"SlashCommandBuilder"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"commands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".push"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"command"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"data"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".toJSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"())"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Promise"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".all"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"dirs"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadCommandsFromDir"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir)))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"resolve"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commands))"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(reject)"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"absoluteIncludeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"includeDirectories"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(dir "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"join"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(__dirname"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'../'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dir))"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"loadSlashCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(absoluteIncludeDirectories)"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(commands "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"rest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"REST"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({ version"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'10'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".setToken"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_TOKEN"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Started refreshing application (/) commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"rest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".put"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Routes"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".applicationCommands"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"config"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"BOT_ID"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" commands })"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(() "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Successfully reloaded application (/) commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".catch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(error "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (error "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"instanceof"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`Error registering commands: "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".message"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"else"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".error"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Unknown error occurred while registering commands.'"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" })"})})]})}),(0,r.jsx)(c.UW,{type:"warning",children:(0,r.jsxs)(s.p,{children:["In case of any error, please contact with me in my ",(0,r.jsx)(s.a,{href:"https://discord.gg/HvEjEpbDR6",children:"discord server"})]})}),(0,r.jsxs)(s.h3,{id:"ensuring-env",children:["Ensuring ",(0,r.jsx)(s.code,{children:".env"})]}),(0,r.jsxs)(s.p,{children:["Ensure that your ",(0,r.jsx)(s.code,{children:"CLIENT_ID"})," and ",(0,r.jsx)(s.code,{children:"SERVER_ID"})," are correctly set in your ",(0,r.jsx)(s.a,{href:"../../../developer/settings",children:(0,r.jsx)(s.code,{children:".env"})})," file."]}),(0,r.jsx)(s.p,{children:"Finally, we have successfully completed our utility functions."})]})]})}function h(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,t.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/deployCommand.mdx",route:"/developer/utilSetup/deployCommand",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Deploy Function",headings:a},pageNextRoute:"/developer/utilSetup/deployCommand",nextraLayout:l.ZP,themeConfig:i.Z};s.default=(0,n.j)(x)},2069:function(e,s,o){"use strict";var r=o(5893);o(7294);var n=o(1163),l=o(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:s,locale:o}=(0,n.useRouter)(),{frontMatter:i}=(0,l.ZR)(),t="https://nsgpriyanshu.github.io/nsdocs"+(s===o?e:"/".concat(o).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};s.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=2487)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/developer/utilSetup/logger-91741461f0a54e70.js b/_next/static/chunks/pages/developer/utilSetup/logger-d806718d8b669ec2.js similarity index 88% rename from _next/static/chunks/pages/developer/utilSetup/logger-91741461f0a54e70.js rename to _next/static/chunks/pages/developer/utilSetup/logger-d806718d8b669ec2.js index 292e4ce..82454c1 100644 --- a/_next/static/chunks/pages/developer/utilSetup/logger-91741461f0a54e70.js +++ b/_next/static/chunks/pages/developer/utilSetup/logger-d806718d8b669ec2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[863],{3108:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup/logger",function(){return o(1586)}])},1586:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return d}});var r=o(5893),s=o(2673),t=o(1334),i=o(2069);o(9488);var l=o(2643),a=o(2154);let d=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating logger.ts",id:"creating-loggerts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||h("FileTree",!1),a.zH.File||h("FileTree.File",!0),a.zH.Folder||h("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Logger Function"}),"\n",(0,r.jsxs)(n.p,{children:["A ",(0,r.jsx)(n.code,{children:"logger"})," function is used to record various types of messages and events that occur during the execution of an application. This can include error messages, informational messages, warnings, and debugging information. The primary advantage of using a ",(0,r.jsx)(n.code,{children:"logger"})," function is to provide an easy way to track and monitor the application's behavior and performance. It helps in debugging, analyzing issues, and maintaining the application more effectively."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["First, create a folder named ",(0,r.jsx)(n.code,{children:"utils"}),", and inside this folder, create a file named ",(0,r.jsx)(n.code,{children:"logger.ts"}),"."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"utils",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"logger.ts"})})})}),(0,r.jsxs)(n.h3,{id:"creating-loggerts",children:["Creating ",(0,r.jsx)(n.code,{children:"logger.ts"})]}),(0,r.jsxs)(n.p,{children:["Now, here is the logic for ",(0,r.jsx)(n.code,{children:"logger.ts"}),":"]}),(0,r.jsxs)(a.UW,{type:"warning",children:["Highly suggested to use ",(0,r.jsx)(n.code,{children:"nstypocolors"})," only!"]}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/utils/logger.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logPastelGreen"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelLavender"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelRed"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelYellow } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"log"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelGreen"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[LOG] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"sLog"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelLavender"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[SUCCESS] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelYellow"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[WARN] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelRed"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[ERROR] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsx)(n.p,{children:"You can add more logging functions like this to enhance your application's functionality."})}),(0,r.jsx)(n.p,{children:"That's it! Now go ahead."})]})]})}function h(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/logger.mdx",route:"/developer/utilSetup/logger",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Logger Function",headings:d},pageNextRoute:"/developer/utilSetup/logger",nextraLayout:t.ZP,themeConfig:i.Z};n.default=(0,s.j)(p)},2069:function(e,n,o){"use strict";var r=o(5893);o(7294);let s={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=s},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=3108)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[863],{3108:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developer/utilSetup/logger",function(){return o(1586)}])},1586:function(e,n,o){"use strict";o.r(n),o.d(n,{__toc:function(){return d}});var r=o(5893),t=o(2673),s=o(1334),i=o(2069);o(9488);var l=o(2643),a=o(2154);let d=[{depth:3,value:"Project Structure",id:"project-structure"},{depth:3,value:"Creating logger.ts",id:"creating-loggerts"}];function c(e){let n=Object.assign({h1:"h1",p:"p",code:"code",h3:"h3",pre:"pre",span:"span"},(0,l.a)(),e.components);return a.zH||p("FileTree",!1),a.zH.File||p("FileTree.File",!0),a.zH.Folder||p("FileTree.Folder",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Logger Function"}),"\n",(0,r.jsxs)(n.p,{children:["A ",(0,r.jsx)(n.code,{children:"logger"})," function is used to record various types of messages and events that occur during the execution of an application. This can include error messages, informational messages, warnings, and debugging information. The primary advantage of using a ",(0,r.jsx)(n.code,{children:"logger"})," function is to provide an easy way to track and monitor the application's behavior and performance. It helps in debugging, analyzing issues, and maintaining the application more effectively."]}),"\n",(0,r.jsxs)(a.Rg,{children:[(0,r.jsx)(n.h3,{id:"project-structure",children:"Project Structure"}),(0,r.jsxs)(n.p,{children:["First, create a folder named ",(0,r.jsx)(n.code,{children:"utils"}),", and inside this folder, create a file named ",(0,r.jsx)(n.code,{children:"logger.ts"}),"."]}),(0,r.jsx)(a.zH,{children:(0,r.jsx)(a.zH.Folder,{name:"src",defaultOpen:!0,children:(0,r.jsx)(a.zH.Folder,{name:"utils",defaultOpen:!0,children:(0,r.jsx)(a.zH.File,{name:"logger.ts"})})})}),(0,r.jsxs)(n.h3,{id:"creating-loggerts",children:["Creating ",(0,r.jsx)(n.code,{children:"logger.ts"})]}),(0,r.jsxs)(n.p,{children:["Now, here is the logic for ",(0,r.jsx)(n.code,{children:"logger.ts"}),":"]}),(0,r.jsxs)(a.UW,{type:"warning",children:["Highly suggested to use ",(0,r.jsx)(n.code,{children:"nstypocolors"})," only!"]}),(0,r.jsx)(n.pre,{"data-language":"ts","data-theme":"default",filename:"src/utils/logger.ts",hasCopyCode:!0,children:(0,r.jsxs)(n.code,{"data-line-numbers":"","data-language":"ts","data-theme":"default","data-line-numbers-max-digits":"1",children:[(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" { logPastelGreen"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelLavender"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelRed"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" logPastelYellow } "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'nstypocolors'"})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"logger"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"log"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelGreen"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[LOG] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"sLog"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelLavender"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[SUCCESS] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"warn"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelYellow"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[WARN] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(n.span,{className:"line",children:[(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"error"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"string"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"logPastelRed"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`[ERROR] "}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"${"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"message"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"}"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"`"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(n.span,{className:"line",children:(0,r.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})}),(0,r.jsx)(a.UW,{type:"info",children:(0,r.jsx)(n.p,{children:"You can add more logging functions like this to enhance your application's functionality."})}),(0,r.jsx)(n.p,{children:"That's it! Now go ahead."})]})]})}function p(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,l.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)},pageOpts:{filePath:"src/pages/developer/utilSetup/logger.mdx",route:"/developer/utilSetup/logger",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Logger Function",headings:d},pageNextRoute:"/developer/utilSetup/logger",nextraLayout:s.ZP,themeConfig:i.Z};n.default=(0,t.j)(h)},2069:function(e,n,o){"use strict";var r=o(5893);o(7294);var t=o(1163),s=o(1334);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:o}=(0,t.useRouter)(),{frontMatter:i}=(0,s.ZR)(),l="https://nsgpriyanshu.github.io/nsdocs"+(n===o?e:"/".concat(o).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:l}),(0,r.jsx)("meta",{property:"og:title",content:i.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:i.description||"A production level discord app guide"})]})}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=3108)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/index-2055cdf06f66fea6.js b/_next/static/chunks/pages/index-8f084752539ce842.js similarity index 85% rename from _next/static/chunks/pages/index-2055cdf06f66fea6.js rename to _next/static/chunks/pages/index-8f084752539ce842.js index e232d18..fb8f0ab 100644 --- a/_next/static/chunks/pages/index-2055cdf06f66fea6.js +++ b/_next/static/chunks/pages/index-8f084752539ce842.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{1464:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(944)}])},944:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return c}});var r=t(5893),i=t(2673),o=t(1334),d=t(2069);t(9488);var a=t(2643),s=t(2154),l=t(4861);let c=[{depth:2,value:"Before We Begin",id:"before-we-begin"},{depth:3,value:"Best for learning TypeScript",id:"best-for-learning-typescript"},{depth:3,value:"Best for learning JavaScript",id:"best-for-learning-javascript"},{depth:2,value:"Quick links",id:"quick-links"},{depth:2,value:"Thank You",id:"thank-you"}];function p(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ol:"ol",li:"li",a:"a",ul:"ul"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Introducing"}),"\n",(0,r.jsx)(n.p,{children:"Hey there, fellow creative developers! Welcome to the developer section of the nsCore app! I hope this guide will enhance your Discord app (bot) knowledge. So let's begin."}),"\n",(0,r.jsx)(n.h2,{id:"before-we-begin",children:"Before We Begin"}),"\n",(0,r.jsx)(n.p,{children:"If you don't know about TypeScript or JavaScript basics, please learn them first! At least, watch a one-shot video about them. Here I am leaving some links to some good YouTube channels. This is not sponsored by them!"}),"\n",(0,r.jsx)(n.h3,{id:"best-for-learning-typescript",children:"Best for learning TypeScript"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtu.be/ZchBYjHFCC4?si=64dYmcXQDloNxPQ2",children:"Complete Typescript in under 5 hours - Hitesh Choudhary"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=NjN00cM18Z4",children:"TypeScript Tutorial for Beginners - Programming with Mosh"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=BwuLxPH8IDs",children:"Learn TypeScript in 50 Minutes - Academind"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=gp5H0Vw39yw",children:"TypeScript for Beginners - freeCodeCamp.org"})}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"best-for-learning-javascript",children:"Best for learning JavaScript"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtube.com/playlist?list=PLu71SKxNbfoBuX3f4EOACle2y-tRC5Q37&si=P_RhJH4vX9nk2sEH",children:"Javascript for beginners | chai aur #javascript - Chai aur Code"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtu.be/ER9SspLe4Hg?si=lQ0EjPQ8x_2nXY0u",children:"Introduction to JavaScript + Setup | JavaScript Tutorial in Hindi #1 - CodeWithHarry"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=PkZNo7MFNFg",children:"Learn JavaScript - Full Course for Beginners - freeCodeCamp.org"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtube.com/playlist?list=PLGjplNEQ1it_oTvuLRNqXfz_v_0pq6unW&si=TGWm6hhjnamS2blm",children:"JavaScript Full Course (2024) - Beginners to Pro - Shradha Khapra"})}),"\n"]}),"\n",(0,r.jsx)(s.UW,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Please note, now in\n",(0,r.jsx)(n.a,{href:"https://discord.com/channels/613425648685547541/697138785317814292/1230245052819832912",children:"Discord"}),'\nbots are now referred to as apps. In this documentation, I have mentioned "app" (also referred to\nas "bot" in parentheses) so readers can understand.']})}),"\n",(0,r.jsx)(n.h2,{id:"quick-links",children:"Quick links"}),"\n",(0,r.jsxs)(s.oy,{children:[(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Config. & Const. Setup",href:"/developer/config&const"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Interfaces",href:"/developer/interfaceSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Events",href:"/developer/eventSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Utils",href:"/developer/utilSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Handlers",href:"/developer/handlerSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Commands",href:"/developer/commandSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Advance",href:"/developer/advance"})]}),"\n",(0,r.jsx)(n.h2,{id:"thank-you",children:"Thank You"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Thank you for believing in us and using our guide! I hope this will help you in your coding journey. Happy coding!"}),"\n"]})]})}let u={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"src/pages/index.mdx",route:"/",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introducing",headings:c},pageNextRoute:"/",nextraLayout:o.ZP,themeConfig:d.Z};n.default=(0,i.j)(u)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);let i={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs"}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"/nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "}};n.Z=i},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1464)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{1464:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(944)}])},944:function(e,n,t){"use strict";t.r(n),t.d(n,{__toc:function(){return c}});var r=t(5893),i=t(2673),o=t(1334),d=t(2069);t(9488);var a=t(2643),s=t(2154),l=t(4861);let c=[{depth:2,value:"Before We Begin",id:"before-we-begin"},{depth:3,value:"Best for learning TypeScript",id:"best-for-learning-typescript"},{depth:3,value:"Best for learning JavaScript",id:"best-for-learning-javascript"},{depth:2,value:"Quick links",id:"quick-links"},{depth:2,value:"Thank You",id:"thank-you"}];function p(e){let n=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ol:"ol",li:"li",a:"a",ul:"ul"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{children:"Introducing"}),"\n",(0,r.jsx)(n.p,{children:"Hey there, fellow creative developers! Welcome to the developer section of the nsCore app! I hope this guide will enhance your Discord app (bot) knowledge. So let's begin."}),"\n",(0,r.jsx)(n.h2,{id:"before-we-begin",children:"Before We Begin"}),"\n",(0,r.jsx)(n.p,{children:"If you don't know about TypeScript or JavaScript basics, please learn them first! At least, watch a one-shot video about them. Here I am leaving some links to some good YouTube channels. This is not sponsored by them!"}),"\n",(0,r.jsx)(n.h3,{id:"best-for-learning-typescript",children:"Best for learning TypeScript"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtu.be/ZchBYjHFCC4?si=64dYmcXQDloNxPQ2",children:"Complete Typescript in under 5 hours - Hitesh Choudhary"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=NjN00cM18Z4",children:"TypeScript Tutorial for Beginners - Programming with Mosh"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=BwuLxPH8IDs",children:"Learn TypeScript in 50 Minutes - Academind"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=gp5H0Vw39yw",children:"TypeScript for Beginners - freeCodeCamp.org"})}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"best-for-learning-javascript",children:"Best for learning JavaScript"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtube.com/playlist?list=PLu71SKxNbfoBuX3f4EOACle2y-tRC5Q37&si=P_RhJH4vX9nk2sEH",children:"Javascript for beginners | chai aur #javascript - Chai aur Code"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtu.be/ER9SspLe4Hg?si=lQ0EjPQ8x_2nXY0u",children:"Introduction to JavaScript + Setup | JavaScript Tutorial in Hindi #1 - CodeWithHarry"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=PkZNo7MFNFg",children:"Learn JavaScript - Full Course for Beginners - freeCodeCamp.org"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://youtube.com/playlist?list=PLGjplNEQ1it_oTvuLRNqXfz_v_0pq6unW&si=TGWm6hhjnamS2blm",children:"JavaScript Full Course (2024) - Beginners to Pro - Shradha Khapra"})}),"\n"]}),"\n",(0,r.jsx)(s.UW,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Please note, now in\n",(0,r.jsx)(n.a,{href:"https://discord.com/channels/613425648685547541/697138785317814292/1230245052819832912",children:"Discord"}),'\nbots are now referred to as apps. In this documentation, I have mentioned "app" (also referred to\nas "bot" in parentheses) so readers can understand.']})}),"\n",(0,r.jsx)(n.h2,{id:"quick-links",children:"Quick links"}),"\n",(0,r.jsxs)(s.oy,{children:[(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Config. & Const. Setup",href:"/developer/config&const"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Interfaces",href:"/developer/interfaceSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Events",href:"/developer/eventSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Utils",href:"/developer/utilSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Handlers",href:"/developer/handlerSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Commands",href:"/developer/commandSetup"}),(0,r.jsx)(s.Zb,{icon:(0,r.jsx)(l.LZ,{}),title:"Advance",href:"/developer/advance"})]}),"\n",(0,r.jsx)(n.h2,{id:"thank-you",children:"Thank You"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Thank you for believing in us and using our guide! I hope this will help you in your coding journey. Happy coding!"}),"\n"]})]})}let u={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"src/pages/index.mdx",route:"/",timestamp:1718442877e3,pageMap:[{kind:"Meta",data:{index:"Introduction",developer:"Developer"}},{kind:"Folder",name:"developer",route:"/developer",children:[{kind:"Meta",data:{gettingStarted:"Getting Started",settings:"Settings",codeFormatters:"Code Formatting",ignoringFiles:"Ignoring Files","config&const":"Config. & Const. Setup",interfaceSetup:"Interfaces",eventSetup:"Events",utilSetup:"Utils",handlerSetup:"Handlers",commandSetup:"Commands",advance:"Advance"}},{kind:"Folder",name:"advance",route:"/developer/advance",children:[{kind:"Meta",data:{introduction:"Introduction",scripts:"Required Scripts",index:"Core"}},{kind:"MdxPage",name:"index",route:"/developer/advance"},{kind:"MdxPage",name:"introduction",route:"/developer/advance/introduction"},{kind:"MdxPage",name:"scripts",route:"/developer/advance/scripts"}]},{kind:"MdxPage",name:"codeFormatters",route:"/developer/codeFormatters"},{kind:"Folder",name:"commandSetup",route:"/developer/commandSetup",children:[{kind:"Meta",data:{index:"Getting Started",messageCommands:"Message Commands",slashCommands:"Slash Commands"}},{kind:"MdxPage",name:"index",route:"/developer/commandSetup"},{kind:"MdxPage",name:"messageCommands",route:"/developer/commandSetup/messageCommands"},{kind:"MdxPage",name:"slashCommands",route:"/developer/commandSetup/slashCommands"}]},{kind:"Folder",name:"config&const",route:"/developer/config&const",children:[{kind:"Meta",data:{index:"Getting Started",configSetup:"Setting up Configurations",constSetup:"Setting up Constants"}},{kind:"MdxPage",name:"configSetup",route:"/developer/config&const/configSetup"},{kind:"MdxPage",name:"constSetup",route:"/developer/config&const/constSetup"},{kind:"MdxPage",name:"index",route:"/developer/config&const"}]},{kind:"Folder",name:"eventSetup",route:"/developer/eventSetup",children:[{kind:"Meta",data:{index:"Introduction",ready:"Ready Event",messageCreate:"Message Create Event",interactionCreate:"Interaction Create Event",centralize:"Centralize Handler"}},{kind:"MdxPage",name:"centralize",route:"/developer/eventSetup/centralize"},{kind:"MdxPage",name:"index",route:"/developer/eventSetup"},{kind:"MdxPage",name:"interactionCreate",route:"/developer/eventSetup/interactionCreate"},{kind:"MdxPage",name:"messageCreate",route:"/developer/eventSetup/messageCreate"},{kind:"MdxPage",name:"ready",route:"/developer/eventSetup/ready"}]},{kind:"MdxPage",name:"gettingStarted",route:"/developer/gettingStarted"},{kind:"Folder",name:"handlerSetup",route:"/developer/handlerSetup",children:[{kind:"Meta",data:{index:"Introduction",cmd:"Command Handler",error:"Error Handler"}},{kind:"MdxPage",name:"cmd",route:"/developer/handlerSetup/cmd"},{kind:"MdxPage",name:"error",route:"/developer/handlerSetup/error"},{kind:"MdxPage",name:"index",route:"/developer/handlerSetup"}]},{kind:"MdxPage",name:"ignoringFiles",route:"/developer/ignoringFiles"},{kind:"Folder",name:"interfaceSetup",route:"/developer/interfaceSetup",children:[{kind:"Meta",data:{index:"Getting Started",extendedClient:"Extended Client",command:"Command"}},{kind:"MdxPage",name:"command",route:"/developer/interfaceSetup/command"},{kind:"MdxPage",name:"extendedClient",route:"/developer/interfaceSetup/extendedClient"},{kind:"MdxPage",name:"index",route:"/developer/interfaceSetup"}]},{kind:"MdxPage",name:"settings",route:"/developer/settings"},{kind:"Folder",name:"utilSetup",route:"/developer/utilSetup",children:[{kind:"Meta",data:{index:"Getting Started",logger:"Logger Function",deployCommand:"Deployment Function"}},{kind:"MdxPage",name:"deployCommand",route:"/developer/utilSetup/deployCommand"},{kind:"MdxPage",name:"index",route:"/developer/utilSetup"},{kind:"MdxPage",name:"logger",route:"/developer/utilSetup/logger"}]}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Introducing",headings:c},pageNextRoute:"/",nextraLayout:o.ZP,themeConfig:d.Z};n.default=(0,i.j)(u)},2069:function(e,n,t){"use strict";var r=t(5893);t(7294);var i=t(1163),o=t(1334);let d={useNextSeoProps:()=>({titleTemplate:"%s – nsDocs",defaultTitle:"nsDocs",description:"Comprehensive documentation for nsDocs",twitter:{handle:"@nsgpriyanshu",site:"@nsgpriyanshu",cardType:"summary_large_image"},openGraph:{type:"website",url:"https://nsgpriyanshu.github.io/nsdocs",site_name:"nsDocs"}}),logo:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:"./nscorebot.png",alt:"nsCore",style:{height:"2rem",marginRight:"0.5rem"}}),(0,r.jsx)("span",{style:{fontWeight:700},children:"nsDocs"})]}),project:{link:"https://github.com/nsgpriyanshu/nsdocs"},chat:{link:"https://discord.gg/G44dR8Zjwx"},docsRepositoryBase:"https://github.com/nsgpriyanshu/nsdocs",footer:{text:"Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ "},sidebar:{toggleButton:!0},head:()=>{let{asPath:e,defaultLocale:n,locale:t}=(0,i.useRouter)(),{frontMatter:d}=(0,o.ZR)(),a="https://nsgpriyanshu.github.io/nsdocs"+(n===t?e:"/".concat(t).concat(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:a}),(0,r.jsx)("meta",{property:"og:title",content:d.title||"nsDocs"}),(0,r.jsx)("meta",{property:"og:description",content:d.description||"A production level discord app guide"})]})}};n.Z=d},5789:function(){}},function(e){e.O(0,[235,888,774,179],function(){return e(e.s=1464)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/yC8pbpgj0ZoUz2XATYPtC/_buildManifest.js b/_next/static/yC8pbpgj0ZoUz2XATYPtC/_buildManifest.js deleted file mode 100644 index fb9236b..0000000 --- a/_next/static/yC8pbpgj0ZoUz2XATYPtC/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(e,t){return{__rewrites:{afterFiles:[{has:void 0,source:"/nsdocs/:path*/_meta",destination:"/nsdocs/404"}],beforeFiles:[],fallback:[]},"/":[e,t,"static/chunks/pages/index-2055cdf06f66fea6.js"],"/_error":["static/chunks/pages/_error-77823ddac6993d35.js"],"/developer/advance":[e,t,"static/chunks/pages/developer/advance-33df118444bafe33.js"],"/developer/advance/introduction":[e,t,"static/chunks/pages/developer/advance/introduction-16f82a948829680b.js"],"/developer/advance/scripts":[e,t,"static/chunks/pages/developer/advance/scripts-a9b9f30b04b15e21.js"],"/developer/codeFormatters":[e,t,"static/chunks/pages/developer/codeFormatters-4fab7bf974665bfa.js"],"/developer/commandSetup":[e,t,"static/chunks/pages/developer/commandSetup-f41b90ad81169434.js"],"/developer/commandSetup/messageCommands":[e,t,"static/chunks/pages/developer/commandSetup/messageCommands-04b5419f41d4e83b.js"],"/developer/commandSetup/slashCommands":[e,t,"static/chunks/pages/developer/commandSetup/slashCommands-762bd84ae1913594.js"],"/developer/config&const":[e,t,"static/chunks/pages/developer/config&const-97ca088f41dffa39.js"],"/developer/config&const/configSetup":[e,t,"static/chunks/pages/developer/config&const/configSetup-9880e1501054eba4.js"],"/developer/config&const/constSetup":[e,t,"static/chunks/pages/developer/config&const/constSetup-bad1e1a5a7b9a3ec.js"],"/developer/eventSetup":[e,t,"static/chunks/pages/developer/eventSetup-e7ff0c708ff4f78f.js"],"/developer/eventSetup/centralize":[e,t,"static/chunks/pages/developer/eventSetup/centralize-e03e160a5e53cd24.js"],"/developer/eventSetup/interactionCreate":[e,t,"static/chunks/pages/developer/eventSetup/interactionCreate-d929851e2222802c.js"],"/developer/eventSetup/messageCreate":[e,t,"static/chunks/pages/developer/eventSetup/messageCreate-24dc8ba6c5554e86.js"],"/developer/eventSetup/ready":[e,t,"static/chunks/pages/developer/eventSetup/ready-861dce86147230e5.js"],"/developer/gettingStarted":[e,t,"static/chunks/pages/developer/gettingStarted-eeca41d304036d40.js"],"/developer/handlerSetup":[e,t,"static/chunks/pages/developer/handlerSetup-27814520ea3da312.js"],"/developer/handlerSetup/cmd":[e,t,"static/chunks/pages/developer/handlerSetup/cmd-3cb558ef6031aa43.js"],"/developer/handlerSetup/error":[e,t,"static/chunks/pages/developer/handlerSetup/error-3a10e25bc980284a.js"],"/developer/ignoringFiles":[e,t,"static/chunks/pages/developer/ignoringFiles-5c347377a93faefc.js"],"/developer/interfaceSetup":[e,t,"static/chunks/pages/developer/interfaceSetup-fe11dea655b5ba1e.js"],"/developer/interfaceSetup/command":[e,t,"static/chunks/pages/developer/interfaceSetup/command-3342833e1befee40.js"],"/developer/interfaceSetup/extendedClient":[e,t,"static/chunks/pages/developer/interfaceSetup/extendedClient-2625d28d691d8244.js"],"/developer/settings":[e,t,"static/chunks/pages/developer/settings-5a8be605f4f4c7a3.js"],"/developer/utilSetup":[e,t,"static/chunks/pages/developer/utilSetup-a60465f09b1a29e2.js"],"/developer/utilSetup/deployCommand":[e,t,"static/chunks/pages/developer/utilSetup/deployCommand-30471380fdfca32e.js"],"/developer/utilSetup/logger":[e,t,"static/chunks/pages/developer/utilSetup/logger-91741461f0a54e70.js"],sortedPages:["/","/_app","/_error","/developer/advance","/developer/advance/introduction","/developer/advance/scripts","/developer/codeFormatters","/developer/commandSetup","/developer/commandSetup/messageCommands","/developer/commandSetup/slashCommands","/developer/config&const","/developer/config&const/configSetup","/developer/config&const/constSetup","/developer/eventSetup","/developer/eventSetup/centralize","/developer/eventSetup/interactionCreate","/developer/eventSetup/messageCreate","/developer/eventSetup/ready","/developer/gettingStarted","/developer/handlerSetup","/developer/handlerSetup/cmd","/developer/handlerSetup/error","/developer/ignoringFiles","/developer/interfaceSetup","/developer/interfaceSetup/command","/developer/interfaceSetup/extendedClient","/developer/settings","/developer/utilSetup","/developer/utilSetup/deployCommand","/developer/utilSetup/logger"]}}("static/css/471946d199e2edea.css","static/chunks/235-b9da8f73f88a7deb.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/developer/advance.html b/developer/advance.html index f9de0f9..2057823 100644 --- a/developer/advance.html +++ b/developer/advance.html @@ -1,4 +1,4 @@ -Creating the Core – nsDocs
Developer
Advance
Core

Creating the Core

+
Developer
Advance
Core

Creating the Core

The index.ts file is the heart of your bot. It serves as the entry point for your application, initializing and configuring the bot to connect to Discord and start responding to events and commands.

Project Structure

Now, inside the src directory, add a file named index.ts.

    • index.ts
  • Creating index.ts

    This is the main file, or we can say the core file, of the bot.

    src/index.ts
    import { Client, Collection, GatewayIntentBits } from 'discord.js'
     import { ExtendedClient } from './interfaces/ExtendedClient'
    @@ -42,4 +42,4 @@
       .catch((err: string) => console.error('Failed to login: ' + err))
    💡

    Feel free to customize this setup to suit your needs. You can add additional intents, configurations, or other settings to enhance the functionality of your bot.

    Verification

    Ensure that you have imported everything correctly and that you have defined your client properly.

    Run

    Now open your terminal and enter:

    npm run execute

    Congratualations, finally your app (bot) is online.

    Thank You

    -

    Dont forget to give a star in github.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Dont forget to give a star in github.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/advance/introduction.html b/developer/advance/introduction.html index 39b3b88..20b0412 100644 --- a/developer/advance/introduction.html +++ b/developer/advance/introduction.html @@ -1,4 +1,4 @@ -Getting Ended – nsDocs
    Developer
    Advance
    Introduction

    Getting Ended

    +
    Developer
    Advance
    Introduction

    Getting Ended

    So yeah, this is the last part — just a little more work, and we're done. Let's get started!

    Project Structure

    Our final structure should look like this:

      • index.ts
  • Before Clicking the Run Button

    Guys, we're finally done! Now, you just need to add the main entry file, index.ts, and you're ready to click the run button.

    -

    I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    I hope this guide has helped you build a production-level Discord bot. Remember, you can contribute to this guide, as it is open source. Thank you for using my guide. Happy coding and enjoy your journey with Discord bots!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/advance/scripts.html b/developer/advance/scripts.html index bbcc55d..e3f1e53 100644 --- a/developer/advance/scripts.html +++ b/developer/advance/scripts.html @@ -1,4 +1,4 @@ -Scripts – nsDocs
    Developer
    Advance
    Required Scripts

    Scripts

    +
    Developer
    Advance
    Required Scripts

    Scripts

    Before moving to the index.ts file, ensure that you have configured your scripts properly in the package.json file.

    Creating scripts

    Now, in the package.json file, add these scripts:

    @@ -30,4 +30,4 @@

    "lint:fix": "eslint 'src/**/*.{ts,tsx}' --fix" },

    You can add more scripts as needed.
    -

    Alright, let's move to the last part.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, let's move to the last part.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/codeFormatters.html b/developer/codeFormatters.html index 2e5eb51..b49da75 100644 --- a/developer/codeFormatters.html +++ b/developer/codeFormatters.html @@ -1,4 +1,4 @@ -Codeformatters – nsDocs
    Developer
    Code Formatting

    Code Formatting

    +
    Developer
    Code Formatting

    Code Formatting

    Now let's set up our code formatting styles by using some popular libraries!

    Installing Prettier

    This is a very popular code formatting library. Here are the required configurations for our Discord app project!

    @@ -91,4 +91,4 @@

    You can find a list of all of ESLint's rules on their website (opens in a new tab).

    This configuration extends the core vitals for the app and includes the recommended settings for Prettier, ensuring that ESLint and Prettier work together seamlessly.

    -

    Alright, we're all set! Now we can proceed further.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, we're all set! Now we can proceed further.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/commandSetup.html b/developer/commandSetup.html index ac5f475..2c5dae5 100644 --- a/developer/commandSetup.html +++ b/developer/commandSetup.html @@ -1,4 +1,4 @@ -Getting Started – nsDocs
    Developer
    Commands
    Getting Started

    Getting Started

    +
    Developer
    Commands
    Getting Started

    Getting Started

    In a Discord bot, commands are instructions given by users to the bot to perform specific actions or tasks. These commands can be typed directly into the chat by users, triggering the bot to execute a predefined function. Commands are a fundamental part of bot interaction, enabling users to control the bot and retrieve information or perform actions within a server. There are primarily two types of commands: message commands and slash commands.

    Project Structure

    To organize your commands efficiently, we'll set up a structured project directory. This helps in maintaining a clean codebase and makes it easier to manage different types of commands.

    @@ -22,4 +22,4 @@

    Message Commands: These are traditional commands that users type in chat, usually prefixed with a character like ! or ?. For example, !help or !ping.
  • Slash Commands: These are the newer type of commands introduced by Discord. Users can type / followed by the command name, and Discord will present an interface to help users complete the command. Its also known as Interaction Command
  • -

    Now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/commandSetup/messageCommands.html b/developer/commandSetup/messageCommands.html index 7593107..2878253 100644 --- a/developer/commandSetup/messageCommands.html +++ b/developer/commandSetup/messageCommands.html @@ -1,4 +1,4 @@ -Message Commands – nsDocs
    Developer
    Commands
    Message Commands

    Message Commands

    +
    Developer
    Commands
    Message Commands

    Message Commands

    Message commands are traditional commands in Discord bots that users type directly into the chat. These commands are typically prefixed with a specific character (like !, ?, or any custom prefix you choose). When the bot detects a message starting with this prefix, it processes the command and executes the corresponding function. Message commands are straightforward and easy to use, making them a popular choice for many bot functionalities.

    Project Structure

    First, create a folder named commands inside the src folder. Then, inside the commands folder, create another folder named messageCommands. Inside this messageCommands folder, create a folder named general. Finally, inside the general folder, add a file named ping.ts

    💡

    Our message command structure is organized into subdirectories, allowing for better code management and customization.

          • ping.ts
  • Create Ping Command

    Let's create a basic ping command to demonstrate how message commands work. This command will respond with "Pong!" when a user types !ping.

    src/commands/messageCommands/general/hello.ts
    import { EmbedBuilder, Message } from 'discord.js'
    @@ -61,4 +61,4 @@
      
     export default string

    Now, in the blank spaces, you can add whatever you want. Feel free to modify this command structure to suit your needs.

    Developer Command

    The Developer Command is a type of command that is restricted to developers only. To enable a command as a Developer Command, you simply need to set the devOnly property to true.

    -

    Alright, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/commandSetup/slashCommands.html b/developer/commandSetup/slashCommands.html index 1ea56b0..8642e21 100644 --- a/developer/commandSetup/slashCommands.html +++ b/developer/commandSetup/slashCommands.html @@ -1,4 +1,4 @@ -Slash Commands – nsDocs
    Developer
    Commands
    Slash Commands

    Slash Commands

    +
    Developer
    Commands
    Slash Commands

    Slash Commands

    Slash commands, also known as interaction commands, are a newer feature introduced by Discord that provide a more streamlined and user-friendly way for users to interact with bots. Unlike message commands, slash commands are invoked by typing / followed by the command name directly into the chat input box.

    Project Structure

    Now that we've already created the commands folder, let's add a folder named slashCommands inside it. Then, within the slashCommands folder, add another folder named general. Finally, inside the general folder, add ping.ts.

    💡

    Our slash command structure is organized similarly to message commands, allowing for efficient code management and customization.

          • ping.ts
  • Create Ping Command

    Let's create a basic ping slash command to demonstrate how slash commands work. This command will respond with "Pong!" when invoked by the user.

    src/commands/slashCommands/general/ping.ts
    import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from 'discord.js'
    @@ -62,4 +62,4 @@
     developer commands. If you want to include a developer command in Slash Commands, you simply
     need to set the devOnly property to true. There's no need to add anything extra because our
     handlers are perfectly equipped to handle it.

    -

    Alright! Go go ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright! Go go ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/config&const.html b/developer/config&const.html index f4b56a1..ce1b672 100644 --- a/developer/config&const.html +++ b/developer/config&const.html @@ -1,4 +1,4 @@ -Getting Started – nsDocs
    Developer
    Config. & Const. Setup
    Getting Started

    Getting Started

    +
    Developer
    Config. & Const. Setup
    Getting Started

    Getting Started

    So, we've mostly completed all our work outside the src directory. Now it's time to enter the src directory, where things will get a bit more complex. It's better to begin with the blueprint of the project structure!

    Project Structure

    Here is the basic project structure that nsCore will look like:

    @@ -27,4 +27,4 @@

    ├── package.json ├── package-lock.json ├── tsconfig.json

    -

    Now we have to create each folder and component separately, so let's begin!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Now we have to create each folder and component separately, so let's begin!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/config&const/configSetup.html b/developer/config&const/configSetup.html index 43fec70..731bc79 100644 --- a/developer/config&const/configSetup.html +++ b/developer/config&const/configSetup.html @@ -1,4 +1,4 @@ -Setting up Configurations – nsDocs
    Developer
    Config. & Const. Setup
    Setting up Configurations

    Setting up Configurations

    +
    Developer
    Config. & Const. Setup
    Setting up Configurations

    Setting up Configurations

    In this section we will configure our necessary configurations. so lets begin.

    Project Structure

    First, create a folder named configs inside the src directory. Inside this configs folder, create a file named botConfig.ts and metadata.ts. This files will hold the configuration settings for your project.

  • Adding .env Configurations

    Now, remember that we have created an .env file. We cannot implement this .env file directly into our project. Instead, we will use a configuration system to integrate these environment variables via our config file.

    You can directly import your .env variables into your project, but it is a better approach to use a configuration file. This provides a more reliable way to manage configurations and allows @@ -42,4 +42,4 @@ NAME: 'nsCore', }

    This file will help us to store our metadatas, which will be required in future also, you can more metadatas as of your need.

    -

    Done, successfully we have setted our configurations, lets move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Done, successfully we have setted our configurations, lets move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/config&const/constSetup.html b/developer/config&const/constSetup.html index b1fc7e6..918a5b5 100644 --- a/developer/config&const/constSetup.html +++ b/developer/config&const/constSetup.html @@ -1,4 +1,4 @@ -Setting up Constants – nsDocs
    Developer
    Config. & Const. Setup
    Setting up Constants

    Setting up Constants

    +
    Developer
    Config. & Const. Setup
    Setting up Constants

    Setting up Constants

    In this section we will set our necessary const. so lets begin.

    Project Structure

    First, create a folder named constants inside the src directory. Inside this constants folder, create a file named botConst.ts. This files will hold the constants for your project.

  • Adding Colors

    @@ -85,4 +85,4 @@

    } as const

    💡

    You can use your own emojis, and if you wanted to use nsCore emojis, then contact with them in their server, here is the link (opens in a new tab).

    -

    successfully completed our constant section also, Now we can move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    successfully completed our constant section also, Now we can move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/eventSetup.html b/developer/eventSetup.html index acee658..15cd9c3 100644 --- a/developer/eventSetup.html +++ b/developer/eventSetup.html @@ -1,4 +1,4 @@ -Introduction – nsDocs
    Developer
    Events
    Introduction

    Introduction

    +
    Developer
    Events
    Introduction

    Introduction

    This section will cover the event handling part, which is a fundamental concept of a Discord bot.

    Project Structure

    To efficiently handle events in our Discord bot, we'll structure our project in a way that separates different responsibilities. Below is an example project structure focusing on event handling:

    @@ -25,4 +25,4 @@

    You can learn about more events from discord.js events (opens in a new tab).

    -

    Now let's understand these events one by one! So, let's go!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Now let's understand these events one by one! So, let's go!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/eventSetup/centralize.html b/developer/eventSetup/centralize.html index 8999e0a..d48a745 100644 --- a/developer/eventSetup/centralize.html +++ b/developer/eventSetup/centralize.html @@ -1,4 +1,4 @@ -Centralize Handler – nsDocs
    Developer
    Events
    Centralize Handler

    Centralize Handler

    +
    Developer
    Events
    Centralize Handler

    Centralize Handler

    Now, we have to create a entralized function, to export and import our events, this makes a better and easier way to export events.

    Project Structure

    Add an eventIndex.ts file inside the event folder.

      • eventIndex.ts
  • Add eventIndex.ts

    This is our centralize handler code:

    src/events/eventIndex.ts
    import { registerReadyEvent } from './client/ready'
     import { eventHandlerInteraction } from './client/interactionCreate'
    @@ -23,4 +23,4 @@
       eventHandlerInteraction(client)
       eventHandlerMessage(client)
     }
    💡
    You can add more functions like this to centralize event handling.

    Verification

    Ensure you have imported everything correctly.

    -

    Alright, lets move ahead,


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, lets move ahead,


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/eventSetup/interactionCreate.html b/developer/eventSetup/interactionCreate.html index 8db99ac..ff467af 100644 --- a/developer/eventSetup/interactionCreate.html +++ b/developer/eventSetup/interactionCreate.html @@ -1,4 +1,4 @@ -Interaction Create Event – nsDocs
    Developer
    Events
    Interaction Create Event

    Interaction Create Event

    +
    Developer
    Events
    Interaction Create Event

    Interaction Create Event

    The interactionCreate event in Discord.js is triggered whenever an interaction is created. This event is useful for handling various types of interactions such as slash commands, button clicks, and select menu selections. By listening to this event, you can execute specific code whenever a user interacts with your bot in these ways.

    Project Structure

    Now inside the client folder add our interactionCreate.ts file.

        • ready.ts
        • messageCreate.ts
        • interactionCreate.ts
  • Create interactionCreate.ts

    Now, we have to write the logic for our interactionCreate event. This file will contain the logic that should be executed whenever a new interaction is created. Typically, you will check the type of interaction and then execute the corresponding action.

    This interaction event handler comes with developer commands, bot permissions, and user permission checks built-in.

    src/events/client/interactionCreate.ts
    import {
    @@ -96,4 +96,4 @@
       })
     }
    💡

    You can add more interactions, for example, context interactions and other Discord.js interactions.

    -

    Done, now let's go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Done, now let's go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/eventSetup/messageCreate.html b/developer/eventSetup/messageCreate.html index 41cae12..0938984 100644 --- a/developer/eventSetup/messageCreate.html +++ b/developer/eventSetup/messageCreate.html @@ -1,4 +1,4 @@ -Message Create Event – nsDocs
    Developer
    Events
    Message Create Event

    Message Create Event

    +
    Developer
    Events
    Message Create Event

    Message Create Event

    The messageCreate event in Discord.js is triggered whenever a new message is created in a text channel. This event is useful for building features such as command handling, automated responses, and various message-based interactions. By listening to this event, you can execute specific code whenever a user sends a message in your Discord server.

    Project Structure

    Now inside the client folder add our messageCreate.ts file

        • ready.ts
        • messageCreate.ts
  • Create messageCreate.ts

    Now, we have to write the logic for our message create event. This file will contain the logic that should be executed whenever a new message is created. Typically, you will check if the message starts with a command prefix and then execute the corresponding command.

    This message event handler comes with developer commands, bot permissions, and user permission checks built-in.

    src/events/client/messageCreate.ts
    import { EmbedBuilder, Message, PermissionsBitField } from 'discord.js'
    @@ -104,4 +104,4 @@
       })
     }
    🚫

    At this moment, you may get some errors because we haven't created our logger function yet! For the logger function, please refer to the logging guide.

    -

    Alright we have done, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright we have done, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/eventSetup/ready.html b/developer/eventSetup/ready.html index c3266fc..f979e3c 100644 --- a/developer/eventSetup/ready.html +++ b/developer/eventSetup/ready.html @@ -1,4 +1,4 @@ -Ready Event – nsDocs
    Developer
    Events
    Ready Event

    Ready Event

    +
    Developer
    Events
    Ready Event

    Ready Event

    The ready event in Discord.js is a crucial event that signifies when the bot has successfully connected to Discord and is ready to start receiving and responding to events. This event is triggered once, immediately after the bot logs in and establishes a connection with Discord's servers.

    Project Structure

    First, create a folder named events inside the src folder. Then create a client folder inside the events folder and add a file named ready.ts.

        • ready.ts
  • Create ready.ts

    Now we will write the logic for the ready event.

    src/events/client/ready.ts
    import { logPastelPink } from 'nstypocolors'
     import { ExtendedClient } from '../../interfaces/ExtendedClient'
    @@ -35,4 +35,4 @@
     }

    You can customize this as you want. For more information, please visit the Discord.js (opens in a new tab) official documentation about the ready event and its types.

    Required Dependencies

    For this, you may have noticed that we have used the color library nstypocolors. Install nstypocolors via npm (opens in a new tab)

    npm i nstypocolors
    ⚠️

    We are highly suggested you to use nstypocolors only, dont use any other color libraries.

    -

    Alright, we have done it! Now let's move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, we have done it! Now let's move ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/gettingStarted.html b/developer/gettingStarted.html index e8b3a42..2c0b90e 100644 --- a/developer/gettingStarted.html +++ b/developer/gettingStarted.html @@ -1,4 +1,4 @@ -Getting Started – nsDocs
    Developer
    Getting Started

    Getting Started

    +
    Developer
    Getting Started

    Getting Started

    Lets dive into the ocean of discord app development.

    Installation

    To install Node.js, visit the official Node.js (opens in a new tab) website and download the installer for your operating system. Follow the installation instructions provided by the installer.

    @@ -27,4 +27,4 @@

    Now, let's install Discord.js (opens in a new tab), which is a powerful library for interacting with the Discord API.

    npm install discord.js

    This command will download and install Discord.js and all its dependencies into your project folder. Once the installation is complete, you're ready to start building your Discord bot using Discord.js!

    -

    All set! Now we are ready to go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    All set! Now we are ready to go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/handlerSetup.html b/developer/handlerSetup.html index 33ab1a9..1061141 100644 --- a/developer/handlerSetup.html +++ b/developer/handlerSetup.html @@ -1,4 +1,4 @@ -Introduction – nsDocs
    Developer
    Handlers
    Introduction

    Introduction

    +
    Developer
    Handlers
    Introduction

    Introduction

    Handlers in a Discord bot are essential components that manage different aspects of the bot's functionality. They are responsible for organizing and processing specific types of events or actions, such as commands, errors, and other interactions. By using handlers, you can keep your code modular, clean, and maintainable. Handlers help in separating different concerns, making the bot easier to debug, extend, and manage.

    Project Structure

    An overview of our project structure

    @@ -22,4 +22,4 @@

    commandHandler for handling commands
  • errorHandler for handling errors
  • -

    So, let's go!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    So, let's go!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/handlerSetup/cmd.html b/developer/handlerSetup/cmd.html index 5cea516..b60b9a4 100644 --- a/developer/handlerSetup/cmd.html +++ b/developer/handlerSetup/cmd.html @@ -1,4 +1,4 @@ -Command Handler – nsDocs
    Developer
    Handlers
    Command Handler

    Command Handler

    +
    Developer
    Handlers
    Command Handler

    Command Handler

    A command handler in a Discord bot is responsible for processing and executing commands received from users. It helps in organizing the command logic, making it easier to manage and extend. By using a command handler, you can separate the command definitions from the execution logic, ensuring that each command is handled appropriately based on the user's input.

    Project Structure

    Create a folder named handlers inside the src folder, and then create a file named commandHandler.ts.

      • commandHandler.ts
  • Create commandHandler.ts

    This file will contain the logic of the command handler. It supports both message and interaction commands.

    src/handlers/commandHandler.ts
    import { Collection } from 'discord.js'
     import { readdirSync, statSync } from 'fs'
    @@ -73,4 +73,4 @@
       client.slashCommands.forEach((command, name) => logger.log(`Loaded slash command: ${name}`))
       client.messageCommands.forEach((command, name) => logger.log(`Loaded message command: ${name}`))
     }

    Verification

    Ensure that your commands are correctly imported from your command interface.

    -

    Alright, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/handlerSetup/error.html b/developer/handlerSetup/error.html index 73e9006..4a25c1b 100644 --- a/developer/handlerSetup/error.html +++ b/developer/handlerSetup/error.html @@ -1,4 +1,4 @@ -Error Handler – nsDocs
    Developer
    Handlers
    Error Handler

    Error Handler

    +
    Developer
    Handlers
    Error Handler

    Error Handler

    An error handler in a Discord bot is essential for managing and responding to errors that occur during the bot's operation. This includes handling exceptions that may arise from command execution, API calls, or other unexpected events. An effective error handler helps in maintaining the stability and reliability of the bot by gracefully managing errors and providing useful feedback to users and developers.

    Project Structure

    Add errorHandler.ts inside the handlers folder.

      • commandHandler.ts
      • errorHandler.ts
  • Create errorHandler.ts

    This file will contain the logic of the error handler, ensuring that any errors encountered during the bot's execution are properly managed and logged.

    ⚠️
    Docs for this part is under construction.
    -

    Alright, we have completed more than half now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, we have completed more than half now let's go further!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/ignoringFiles.html b/developer/ignoringFiles.html index a1dd610..1f76c51 100644 --- a/developer/ignoringFiles.html +++ b/developer/ignoringFiles.html @@ -1,4 +1,4 @@ -Ignoring Files – nsDocs
    Developer
    Ignoring Files

    Ignoring Files

    +
    -

    Alright, we have successfully created our ignore files. Now we can go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, we have successfully created our ignore files. Now we can go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/interfaceSetup.html b/developer/interfaceSetup.html index 1f5dfd6..7bf463c 100644 --- a/developer/interfaceSetup.html +++ b/developer/interfaceSetup.html @@ -1,4 +1,4 @@ -Getting Started – nsDocs
    Developer
    Interfaces
    Getting Started

    Getting Started

    +
    Developer
    Interfaces
    Getting Started

    Getting Started

    Let's start creating our interfaces!

    Interfaces in TypeScript define the structure of an object. They specify the types and the properties that an object should have. For a Discord bot, interfaces can help ensure that the objects we use, such as configurations, commands, and clients, adhere to the expected structure, which can prevent errors and improve code quality.

    Project Structure

    @@ -23,4 +23,4 @@

    Command interface
    🚫
    You can setup more interfaces as of your need.
    -

    Now we can go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Now we can go ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/interfaceSetup/command.html b/developer/interfaceSetup/command.html index b302bd0..6eb2d51 100644 --- a/developer/interfaceSetup/command.html +++ b/developer/interfaceSetup/command.html @@ -1,4 +1,4 @@ -Command Interface – nsDocs
    Developer
    Interfaces
    Command

    Command Interface

    +
    Developer
    Interfaces
    Command

    Command Interface

    The Command Interface is a structure that defines how commands should be organized and managed within your Discord bot. By creating a command interface, you ensure that each command follows a consistent format, making it easier to manage and execute commands. This can include defining properties like the command name, description, execute function, and any required permissions.

    Project Structure

    As you know we already have created the interfaces folder so now just add Command.ts inside the interfaces folder.

  • Create CommandInterface.ts

    Defining a command interface helps ensure consistency and ease of management for all commands.

    src/interfaces/Command.ts
    import {
       ChatInputCommandInteraction,
    @@ -45,4 +45,4 @@
     }
      
     export interface Command extends SlashCommand, MessageCommand {}
    ⚠️

    Ensure that all commands adhere to the defined interface for smooth operation.

    -

    Alright, now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/interfaceSetup/extendedClient.html b/developer/interfaceSetup/extendedClient.html index 488a67a..43386f8 100644 --- a/developer/interfaceSetup/extendedClient.html +++ b/developer/interfaceSetup/extendedClient.html @@ -1,4 +1,4 @@ -Extended Client – nsDocs
    Developer
    Interfaces
    Extended Client

    Extended Client

    +
    Developer
    Interfaces
    Extended Client

    Extended Client

    The Extended Client refers to an enhanced version of the standard Discord client provided by the discord.js library. By extending the base client, we can add custom properties and methods that are specific to our bot's needs. This could include additional configurations, utility functions, or other custom features that the standard client does not provide.

    Project Structure

    First, create a folder named interfaces inside the src directory. Inside this interfaces folder, create a file named ExtendedClient.ts. This files will hold the constants for your project.

  • Create ExtendedClient.ts

    You can extend your client as you want!
    src/interfaces/ExtendedClient.ts
    import { Client, Collection } from 'discord.js'
     import { Command } from './Command'
    @@ -21,4 +21,4 @@
       messageCommands: Collection<string, Command>
       slashCommands: Collection<string, Command>
     }
    -

    Alright, now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, now let's move ahead!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/settings.html b/developer/settings.html index d02622d..767738a 100644 --- a/developer/settings.html +++ b/developer/settings.html @@ -1,4 +1,4 @@ -Settings – nsDocs
    Developer
    Settings

    Settings

    +
    Developer
    Settings

    Settings

    In this part, we will add our environmental variables and TypeScript configurations!

    Setting up tsconfig.json

    Now we have to set up the TypeScript configuration for compiling our TypeScript code into JavaScript!

    @@ -47,4 +47,4 @@

    DEVELOPER_IDS=YOUR-DISCORD-ID SERVER_ID=YOUR-DEV-SERVER-ID ERROR_CHANNEL_ID=YOUR-ERROR-CHANNEL-ID

    -

    Okay, now our basic configuration setup is done!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Okay, now our basic configuration setup is done!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/utilSetup.html b/developer/utilSetup.html index 4f86369..f0cf410 100644 --- a/developer/utilSetup.html +++ b/developer/utilSetup.html @@ -1,4 +1,4 @@ -Getting Started – nsDocs
    Developer
    Utils
    Getting Started

    Getting Started

    +
    Developer
    Utils
    Getting Started

    Getting Started

    Utilities, or utils, are helper functions and reusable code snippets that make development easier by providing common functionality that can be used throughout the project. These can include functions for logging, data processing, formatting, and other repetitive tasks.

    Project Structure

    An overview of our project structure

  • -

    Alright, let's begin!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Alright, let's begin!


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/utilSetup/deployCommand.html b/developer/utilSetup/deployCommand.html index 85571de..236d325 100644 --- a/developer/utilSetup/deployCommand.html +++ b/developer/utilSetup/deployCommand.html @@ -1,4 +1,4 @@ -Deploy Function – nsDocs
    Developer
    Utils
    Deployment Function

    Deploy Function

    +
    Developer
    Utils
    Deployment Function

    Deploy Function

    The deploy function in a Discord bot is crucial for registering and updating slash commands with Discord's API. This function ensures that the bot's commands are correctly deployed to either a specific server (guild) or globally across all servers. By using a deploy function, you can dynamically manage and update the bot's commands without manually configuring each command.

    Project Structure

    Now, simply add a deploy.ts file inside the utils folder.

      • logger.ts
      • deploy.ts
  • Creating deploy.ts

    Here is the logic for the deploy function:

    src/utils/deployCommand.ts
    import { REST, Routes, SlashCommandBuilder } from 'discord.js'
     import { readdirSync, statSync } from 'fs'
    @@ -74,4 +74,4 @@
         } else {
           logger.error('Unknown error occurred while registering commands.')
         }
    -  })
    ⚠️

    In case of any error, please contact with me in my discord server (opens in a new tab)

    Ensuring .env

    Ensure that your CLIENT_ID and SERVER_ID are correctly set in your .env file.

    Finally, we have successfully completed our utility functions.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file + })
    ⚠️

    In case of any error, please contact with me in my discord server (opens in a new tab)

    Ensuring .env

    Ensure that your CLIENT_ID and SERVER_ID are correctly set in your .env file.

    Finally, we have successfully completed our utility functions.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/developer/utilSetup/logger.html b/developer/utilSetup/logger.html index feda1b2..79d93bd 100644 --- a/developer/utilSetup/logger.html +++ b/developer/utilSetup/logger.html @@ -1,4 +1,4 @@ -Logger Function – nsDocs
    Developer
    Utils
    Logger Function

    Logger Function

    +
    Developer
    Utils
    Logger Function

    Logger Function

    A logger function is used to record various types of messages and events that occur during the execution of an application. This can include error messages, informational messages, warnings, and debugging information. The primary advantage of using a logger function is to provide an easy way to track and monitor the application's behavior and performance. It helps in debugging, analyzing issues, and maintaining the application more effectively.

    Project Structure

    First, create a folder named utils, and inside this folder, create a file named logger.ts.

      • logger.ts
  • Creating logger.ts

    Now, here is the logic for logger.ts:

    ⚠️
    Highly suggested to use nstypocolors only!
    src/utils/logger.ts
    import { logPastelGreen, logPastelLavender, logPastelRed, logPastelYellow } from 'nstypocolors'
      
    @@ -20,4 +20,4 @@
       sLog: (message: string) => logPastelLavender(`[SUCCESS] ${message}`),
       warn: (message: string) => logPastelYellow(`[WARN] ${message}`),
       error: (message: string) => logPastelRed(`[ERROR] ${message}`),
    -}

    You can add more logging functions like this to enhance your application's functionality.

    That's it! Now go ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +}

    You can add more logging functions like this to enhance your application's functionality.

    That's it! Now go ahead.


    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file diff --git a/index.html b/index.html index 6936270..301182a 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -Introducing – nsDocs
    Introduction

    Introducing

    +
    Introduction

    Introducing

    Hey there, fellow creative developers! Welcome to the developer section of the nsCore app! I hope this guide will enhance your Discord app (bot) knowledge. So let's begin.

    Before We Begin

    If you don't know about TypeScript or JavaScript basics, please learn them first! At least, watch a one-shot video about them. Here I am leaving some links to some good YouTube channels. This is not sponsored by them!

    @@ -38,4 +38,4 @@

    Thank You

    • Thank you for believing in us and using our guide! I hope this will help you in your coding journey. Happy coding!
    • -

    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file +

    Developed by ŊʂƓ ᴾᴿᴵᵞᴬᴺˢᴴᵁ
    \ No newline at end of file