Hi, I've been trying to make some roles not incur a cooldown at all but I haven't been successful so far. I've been trying to extend the ExecuteChecksAsync() method with my code checking for roles, but I have the problem that the method is called from yet another sealed class SlashCommandsExtension. Does anybody have a good solution for my problem that doesn't include basically rewriting the whole SlashCommandsExtension class?
#No cooldown for certain roles
1 messages · Page 1 of 1 (latest)
Can you elaborate? I am not very familiar with dependency injection, but I am not sure how it would help me. My problem isn't that I can't access the user's roles, my problem is that the SlashCommandsExtension class and the SlashCooldownAttribute classes are sealed and I can't override the methods they contain
ahh, you could copy the code from SlashCooldownAttribute and make your own attribute
yea i thought about that too but wanted to avoid that if at all possible
think its not really possible at all tbh, there are so many protected and internal classes etc.