# Interface: dms

> Direct-message channels with members (capability `dms`, the protocol). The member decides: `FORBIDDEN` (`dms_closed`) when they turned DMs from bots off or closed this one.

Generated from `zaun:bot@0.2.0` (`wit/` in [zaun-bot](https://github.com/zaunchat/zaun-bot)). Do not edit.

Direct-message channels with members (capability `dms`, the protocol). The member
decides: `FORBIDDEN` (`dms_closed`) when they turned DMs from bots off or closed this one.

## Uses

- `use types.{id, host-error, channel}`

## Functions

### `open`

```wit
open: func(member-id: id) -> result<channel, host-error>;
```

`dm.open`: the DM with `member-id`, created when there is none.

### `close`

```wit
close: func(channel-id: id) -> result<_, host-error>;
```

`dm.close`: hides it from the bot's list.

### `list-open`

```wit
list-open: func() -> result<list<channel>, host-error>;
```

`dm.list`: the DMs the bot has open.
