How i set userlevel for an alias command?

Asked Nov 9, 2022·1 reply·Last activity 3 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi!

I added two commands:

!addcom !opgg -ul=moderator $(eval a="$(querystring)";if(a){a=a.split('%20');b=a[0];a.splice(0,1);'https://www.op.gg/summoners/'+b+'/'+a.join('%20');}else{'Missing parameters.';};)

and

!addcom !faker -a=!opgg -ul=everyone kr Hide on bush

But the User Level of the !faker command didn't change and i can't execute that command with non moderator account.

Can you fix it?

Thanks

El_Chanfle

1 reply

Hey @Stellar Bear!

Your !faker command, which userlevel is set to everyone, calls !opgg as an alias -a=!opgg, which means !faker calls !opgg right after !faker's code was executed, but users who call !opgg need to be moderators as it's the userlevel specified for the command, therefore so do users who call !faker.