#RequireUserPermission Administrator no working

1 messages · Page 1 of 1 (latest)

tough wind
#

from which namespace the RequireUserPermission attribute is?

#

Discord.Commands or Discord.Interactions?

wispy nimbus
#

First I test them in the prefix commands and then pass them to the interactions commands

#

I made sure the roles don't have admin permissions where I'm testing the bot, even though it doesn't work for some reason

#
public class PrefixModule : ModuleBase<SocketCommandContext>
{

  //commands for members
  
  [RequireContext(ContexType.Guild)]
  [RequireUserPermissions(GuildPermissions.Administrator)]
  public class AdminPrefixModule : ModuleBase<SocketCommandContext>
  {
    //command for admins (purge)
  } 
}
#

The code is something like that