> 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.5/classes/attachments.md).

# Attachments

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.

Our package gives you a feature to send attachment. This doc shows you how to do it.

### Param

| Parameters | Description                         | Required |
| ---------- | ----------------------------------- | -------- |
| command    | The command name                    | yes      |
| url        | The directory/url of the image/file | yes      |
| buffer     | To enable file buffer               | no       |

### Examples

Example of not using buffer

```
const dl = require("discord.lib")
dl.attachment("command", "https://example.com/image.png/ or ./path/to/your/file");
dl.login("token", "I am the best bot!")
```

Example of using buffer

{% hint style="info" %}
You are require to specify an directory.
{% endhint %}

```
const dl = require("discord.lib")
dl.attachment("command", "./path/to/your/file.js", "buffer");
dl.login("token", "I am the best bot!")
```
