@@ -15,7 +15,7 @@ Validation functions are called on every command trigger, so it's important to k
15
15
<Tabs items = { [' CommonJS' , ' ESM' , ' TypeScript' ]} >
16
16
<Tabs.Tab label = " CommonJS" >
17
17
``` js filename="validations/cooldowns.js" copy
18
- const cooldowns = require ( ' ../cooldowns-cache ' );
18
+ const cooldowns = new Set ( );
19
19
20
20
module .exports = ({ interaction, commandObj, handler }) => {
21
21
if (cooldowns .has (` ${ interaction .user .id } -${ commandObj .data .name } ` )) {
@@ -32,7 +32,7 @@ Validation functions are called on every command trigger, so it's important to k
32
32
33
33
<Tabs.Tab label = " ESM" >
34
34
``` js filename="validations/cooldowns.js" copy
35
- import cooldowns from ' ../cooldowns-cache ' ;
35
+ const cooldowns = new Set () ;
36
36
37
37
export default function ({ interaction, commandObj, handler }) {
38
38
if (cooldowns .has (` ${ interaction .user .id } -${ commandObj .data .name } ` )) {
@@ -50,7 +50,7 @@ Validation functions are called on every command trigger, so it's important to k
50
50
<Tabs.Tab label = " TypeScript" >
51
51
``` ts filename="validations/cooldowns.ts" copy
52
52
import type { ValidationProps } from ' commandkit' ;
53
- import cooldowns from ' ../cooldowns-cache ' ;
53
+ const cooldowns = new Set () ;
54
54
55
55
export default function ({ interaction , commandObj , handler }: ValidationProps ) {
56
56
if (cooldowns .has (` ${interaction .user .id }-${commandObj .data .name } ` )) {
0 commit comments