> For the complete documentation index, see [llms.txt](https://skript-luckperms.gitbook.io/skript-luckperms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skript-luckperms.gitbook.io/skript-luckperms/groups/misc.md).

# Misc

### Getting All Groups

Per usual, getting all groups is extremely easy.\
\
Consider this example:<br>

```genie
set {_list::*} to all luckperms groups
broadcast "All the server's LuckPerms groups:"
loop {_list::*}:
    broadcast loop-value
```

### Group Members

Allows you to search all users in the LuckPerms database and find those who have a specific group.\
\
Consider this example:<br>

```genie
get the members of group "example" and store it in {_lp::*}
send "%size of {_lp::*}% have 'example' group!" to all ops
```

### Has Group

Allows you to check if a user has the provided group.\
\
Consider this example:<br>

```genie
set {_lp} to luckperms user from player
if {_lp} has luckperms group "admin":
    broadcast "%player% is an admin!"
else:
    broadcast "%player% is not an admin!"
```

### Groups of User

Allows you to get all the groups of a user.\
\
Consider this example:<br>

```genie
set {_lp} to luckperms user from player
set {_groups::*} to luckperms groups of {_lp}
broadcast '%player% has %size of {group::*}% groups!"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://skript-luckperms.gitbook.io/skript-luckperms/groups/misc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
