Skip to content

Commit

Permalink
Merge branch 'Garlic-Team:next' into feat/improve-jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom authored Apr 18, 2022
2 parents 875fcf9 + 1bba379 commit fffb381
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 92 deletions.
160 changes: 80 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"@types/keyv": "3.1.4",
"@types/lru-cache": "7.6.1",
"@types/node": "16.11.27",
"@typescript-eslint/eslint-plugin": "5.19.0",
"@typescript-eslint/parser": "5.19.0",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"conventional-changelog-cli": "2.2.2",
"discord.js": "13.6.0",
"eslint": "8.13.0",
Expand Down
12 changes: 6 additions & 6 deletions src/handlers/ComponentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export async function ComponentHandler(
if (cooldown) {
return interaction.reply({
content: (await Util.getResponse('COOLDOWN', interaction))
.replace('{time}', String(cooldown))
.replace(
'{name}',
component.name +
(interaction.isButton() ? ' button' : ' select menu'),
),
/**
* @deprecated Use {duration} instead
*/
.replaceAll('{time}', String(cooldown))
.replaceAll('{duration}', String(cooldown))
.replaceAll('{name}', component.name),
ephemeral: true,
});
}
Expand Down
8 changes: 6 additions & 2 deletions src/handlers/InteractionCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ export async function InteractionCommandHandler(
if (cooldown) {
return interaction.reply({
content: (await Util.getResponse('COOLDOWN', interaction))
.replace('{time}', String(cooldown))
.replace('{name}', `${command.name} command`),
/**
* @deprecated Use {duration} instead
*/
.replaceAll('{time}', String(cooldown))
.replaceAll('{duration}', String(cooldown))
.replaceAll('{name}', command.name),
ephemeral: true,
});
}
Expand Down
8 changes: 6 additions & 2 deletions src/handlers/MessageCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ export async function MessageCommandHandler(
if (cooldown) {
return message.reply({
content: (await Util.getResponse('COOLDOWN', { client }))
.replace('{time}', String(cooldown))
.replace('{name}', `${command.name} command`),
/**
* @deprecated Use {duration} instead
*/
.replaceAll('{time}', String(cooldown))
.replaceAll('{duration}', String(cooldown))
.replaceAll('{name}', command.name),
});
}
}
Expand Down

0 comments on commit fffb381

Please sign in to comment.