Skip to content

Commit fffb381

Browse files
authored
Merge branch 'Garlic-Team:next' into feat/improve-jsdocs
2 parents 875fcf9 + 1bba379 commit fffb381

File tree

5 files changed

+100
-92
lines changed

5 files changed

+100
-92
lines changed

package-lock.json

+80-80
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"@types/keyv": "3.1.4",
6767
"@types/lru-cache": "7.6.1",
6868
"@types/node": "16.11.27",
69-
"@typescript-eslint/eslint-plugin": "5.19.0",
70-
"@typescript-eslint/parser": "5.19.0",
69+
"@typescript-eslint/eslint-plugin": "5.20.0",
70+
"@typescript-eslint/parser": "5.20.0",
7171
"conventional-changelog-cli": "2.2.2",
7272
"discord.js": "13.6.0",
7373
"eslint": "8.13.0",

src/handlers/ComponentHandler.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ export async function ComponentHandler(
3737
if (cooldown) {
3838
return interaction.reply({
3939
content: (await Util.getResponse('COOLDOWN', interaction))
40-
.replace('{time}', String(cooldown))
41-
.replace(
42-
'{name}',
43-
component.name +
44-
(interaction.isButton() ? ' button' : ' select menu'),
45-
),
40+
/**
41+
* @deprecated Use {duration} instead
42+
*/
43+
.replaceAll('{time}', String(cooldown))
44+
.replaceAll('{duration}', String(cooldown))
45+
.replaceAll('{name}', component.name),
4646
ephemeral: true,
4747
});
4848
}

src/handlers/InteractionCommandHandler.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ export async function InteractionCommandHandler(
3636
if (cooldown) {
3737
return interaction.reply({
3838
content: (await Util.getResponse('COOLDOWN', interaction))
39-
.replace('{time}', String(cooldown))
40-
.replace('{name}', `${command.name} command`),
39+
/**
40+
* @deprecated Use {duration} instead
41+
*/
42+
.replaceAll('{time}', String(cooldown))
43+
.replaceAll('{duration}', String(cooldown))
44+
.replaceAll('{name}', command.name),
4145
ephemeral: true,
4246
});
4347
}

src/handlers/MessageCommandHandler.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ export async function MessageCommandHandler(
162162
if (cooldown) {
163163
return message.reply({
164164
content: (await Util.getResponse('COOLDOWN', { client }))
165-
.replace('{time}', String(cooldown))
166-
.replace('{name}', `${command.name} command`),
165+
/**
166+
* @deprecated Use {duration} instead
167+
*/
168+
.replaceAll('{time}', String(cooldown))
169+
.replaceAll('{duration}', String(cooldown))
170+
.replaceAll('{name}', command.name),
167171
});
168172
}
169173
}

0 commit comments

Comments
 (0)