How can I make a custom command only be used by a specific user?
There is no actual option to make a command only available for specific users but you can use some eval logic to decide whether to output a response or not.
$(eval `$(user)`==`username here`?`response here`:` `)
yah, I make that:
$(eval $(user)
=== âyelloalejoâ ? â!bonus $(eval decodeURIComponent($(querystring)
).slice(1)||
)â : "No tienes permiso para utilizar este comando CoolCat ")
but I need to add other user, like:
âyelloalejoâ||âNayeâ
but doesnât work, if I add that, everyone can use the command, I donât know why
To add another user:
$(eval `$(user)`==`user 1`||`$(user)`==`user 2`?`response here`:` `)
you are a master
hi again, last question⌠I can add an array of users to compare or i need put:
|| `$(user)`==`newuser`
?
You can do:
$(eval [`user1`,`user2`,`etc`].includes(`$(user)`)?`response here`:` `)
Maaaaaaaan you are my hero now!!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.