Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
typo & fixed cooldown bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tyowk committed Jan 22, 2025
1 parent a20eb87 commit c26f9a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/client/others/interface/previous.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
code: `
$previousTrack
$interactionReply[{newEmbed:{description:$getEmoji[previous] Playing the previous track}{color:#4367FE}};;true]
$onlyIf[$isPreviousExists==true;{newEmbed:{description:$getEmoji[no] There are no previousTrack!}{color:Red}}{ephemeral}]
$onlyIf[$isPreviousExists==true;{newEmbed:{description:$getEmoji[no] There are no previous track!}{color:Red}}{ephemeral}]
$onlyIf[$playerStatus!=stopped&&$playerStatus!=destroyed;{newEmbed:{description:$getEmoji[no] There are no track currently playing!}{color:Red}}{ephemeral}{execute:removeComponents}]
$onlyIf[$hasPlayer==true;{newEmbed:{description:$getEmoji[no] There are no players for this guild!}{color:Red}}{ephemeral}{execute:removeComponents}]
$checkVoice
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/functions/custom/commandCooldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
const cooldowns = d.client.cooldowns;
const cmd = d.client.cmd.default.find(x => x?.name?.toLowerCase() === d.command.name);

if (!cmd || !cmd.cooldown) return d.client.returnCode(d, data);
if (!cmd || !cmd?.cooldown || cmd?.prototype === 'button') return d.client.returnCode(d, data);
time = time ? d.helpers.time.parse(time).ms : d.helpers.time.parse(cmd.cooldown).ms;

time = checkCooldown(d.client, userId, cmd.name, time);
Expand Down

0 comments on commit c26f9a6

Please sign in to comment.