Custom commands for specific user

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`:` `)
1 Like

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`:` `)
1 Like

you are a master :sunglasses:

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`:` `)
1 Like

Maaaaaaaan you are my hero now!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.