> 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/0.5.7/classes/ban.md).

# ban

A powerful discord bot making library to help you make discord bots. Super easy, 100 percent discord api coverage, and more! Discord.lib also allows you to interact with discord.js.

This is the function that will ban a member.

{% hint style="info" %}
For now, only member with ADMINISTRATOR permission could ban 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_ban")//usage will be A_ban @member#1234
```

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

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