> For the complete documentation index, see [llms.txt](https://discordlib.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://discordlib.js.org/classes/kick.md).

# kick

This is the function that will kick a member out of the server.&#x20;

{% hint style="info" %}
For now, only member with ADMINISTRATOR permission could kick member. if you want to specify a permission, you need use the discord.lib.client interacting method. This method will be in the example section below
{% endhint %}

### Parameters

| Parameter | Description  | Require |
| --------- | ------------ | ------- |
| command   | command name | yes     |

## Example

### example for using discord.lib kick

```javascript
const dl = require("discord.lib")
dl.kick("A_kick")//usage will be A_kick @member#1234
```

### example for interacting with discord.lib.client

```javascript
const dl = require("discord.lib")
dl.client.on("message", msg => {
 if(msg.startsWith("kick")){
  if(!msg.member.hasPermission("your permission"))return;
  let mention = msg.mentions.users.first();
  let member = msg.guild.member(mention)
  member.kick("optional reason for audit log")
 }
})
```


---

# 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:

```
GET https://discordlib.js.org/classes/kick.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
