manage slash commands and originals commands in the same time
Hello,
i have multiple commands which works fine with normal
?command
. I have now slash commands and my execute function nows only have an interaction Object and not a message, args, Discord, Client... what is the best way to combine these two ?8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
14.3.0
You could make one function per command that accepts either messages or interactions and use hundreds of
instanceof
checks to see if you're dealing with interactions or messages, or you could just pick one of the systems and keep your bot consistentIt makes me rewrite some functions for two different case ?
I might have misunderstood the question
Do you want to use both message and slash commands (not recommended), or just slash commands?
both of them
OK, then either you need to have one function per command type, or you need just one function that checks the type of the parameters passed into it
okay yes