File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,9 @@ The code above is just a simple example of how to set up an event function. But
123123 ``` js filename="events/messageCreate/say-hi.js" copy
124124 module .exports = (message , client ) => {
125125 if (message .content === ' hey' ) {
126- message .reply (' Hi!' )
126+ message .reply (' Hi!' );
127127
128- return true // This stops the event loop
128+ return true ; // This stops the event loop
129129 }
130130 }
131131 ```
@@ -135,9 +135,9 @@ The code above is just a simple example of how to set up an event function. But
135135 ``` js filename="events/messageCreate/say-hi.js" copy
136136 export default function (message , client ) {
137137 if (message .content === ' hey' ) {
138- message .reply (' Hi!' )
138+ message .reply (' Hi!' );
139139
140- return true // This stops the event loop
140+ return true ; // This stops the event loop
141141 }
142142 }
143143 ```
@@ -150,9 +150,9 @@ The code above is just a simple example of how to set up an event function. But
150150
151151 export default function (message : Message < true > , client : Client < true > , handler : CommandKit ) {
152152 if (message .content === ' hey' ) {
153- message .reply (' Hi!' )
153+ message .reply (' Hi!' );
154154
155- return true // This stops the event loop
155+ return true ; // This stops the event loop
156156 }
157157 }
158158 ```
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ Validation functions are called on every command trigger, so it's important to k
1313
1414<Tabs items = { [' CommonJS' , ' ESM' , ' TypeScript' ]} >
1515 <Tabs.Tab label = " CommonJS" >
16- ``` js
17- // validations/cooldowns.js
16+ ``` js filename="validations/cooldowns.js" copy
1817 const cooldowns = require (' ../cooldowns-cache' );
1918
2019 module .exports = ({ interaction, commandObj, handler }) => {
@@ -31,8 +30,7 @@ Validation functions are called on every command trigger, so it's important to k
3130 </Tabs.Tab >
3231
3332 <Tabs.Tab label = " ESM" >
34- ``` js
35- // validations/cooldowns.js
33+ ``` js filename="validations/cooldowns.js" copy
3634 import cooldowns from ' ../cooldowns-cache' ;
3735
3836 export default function ({ interaction, commandObj, handler }) {
@@ -49,8 +47,7 @@ Validation functions are called on every command trigger, so it's important to k
4947 </Tabs.Tab >
5048
5149 <Tabs.Tab label = " TypeScript" >
52- ``` js
53- // validations/cooldowns.js
50+ ``` ts filename="validations/cooldowns.ts" copy
5451 import type { ValidationFunctionProps } from ' commandkit' ;
5552 import cooldowns from ' ../cooldowns-cache' ;
5653
You can’t perform that action at this time.
0 commit comments