> ## Documentation Index
> Fetch the complete documentation index at: https://stars-components.js.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Function: RequiresUserPermissions()

> **RequiresUserPermissions**(...`permissions`): `MethodDecorator`

Defined in: [packages/http-framework/src/lib/decorators/RequiresPermissions.ts:87](https://github.com/wolfstar-project/stars-components/blob/5aefd164bc5fc41e5a35d3abf908c288163dd354/packages/http-framework/src/lib/decorators/RequiresPermissions.ts#L87)

Decorator that only runs the decorated method when the invoking user has all of the given permissions in the channel
the interaction was sent from.

## Parameters

### permissions

...`PermissionResolvable`\[]

The permissions the invoking user must have.

## Returns

`MethodDecorator`

A method decorator.

## Remarks

Interactions received outside of a guild carry no member permissions, so the check passes for them. Pair
this decorator with [`RequiresGuildContext`](/documentation/api/http-framework/functions/RequiresGuildContext) when the method must also be guild-only.

## Example

```typescript theme={"system"}
import { Command, RegisterCommand, RequiresUserPermissions } from '@wolfstar/http-framework';

(at)RegisterCommand({ name: 'ban', description: 'Bans a member' })
export class UserCommand extends Command {
	(at)RequiresUserPermissions('BanMembers')
	public override chatInputRun(interaction: Command.ChatInputInteraction) {
		return interaction.reply({ content: 'Banned!' });
	}
}
```
