#Cooldown
1 messages · Page 1 of 1 (latest)
I checked that but wasn't sure if it's command denied
Nothing gets printed when trying to log
I can post code when home
please do
export class ChatInputCommandDenied extends Listener<typeof Events.ChatInputCommandDenied> {
public run(error: UserError, { interaction }: ChatInputCommandDeniedPayload) {
console.log(error)
console.log(interaction)
// ...
}
}
and I am using a slash command with ```ts
public constructor(context: Command.Context) {
super(context, {
cooldownDelay: Time.Second * 5,
cooldownScope: BucketScope.User
});
}
It should be chatInputCommandDenied.ts
Or you can add { event: Events.ChatInputCommandDenied } to the constructor
ahh I see, I missed that completely :S do you have an example for the constructor what I need inside it?
It's printing now so I can debug it and figure out the rest
thank you so much both of you two
As referenced on the guide page I linked before: https://www.sapphirejs.dev/docs/Guide/listeners/creating-your-own-listeners