Skip to content

Cooldown portion not working #1463

Closed Answered by jasonrbarnes81
jasonrbarnes81 asked this question in Q&A
Discussion options

You must be logged in to vote

I have it figured out. when in the interactionCreate.js file ,that was created during the Command Handling portion of the guide, you need to have client changed to interaction.client.

The git hub needs to be updated to reflect correctly. the link does not provide the interactionCreate.js file at all.
https://github.com/discordjs/guide/tree/main/code-samples/additional-features/cooldowns

Below is what the interactionCreate.js should look like after implementing the cooldown function.

`const { Events, Collection } = require('discord.js');

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if (!interaction.isChatInputCommand()) return;

	const command = interactio…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jasonrbarnes81
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jasonrbarnes81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants