# Discord

> Add the Tangled bot to a Discord server and post repository events to a channel.

The Tangled bot posts repository events to a Discord channel. It can watch any public repository on Tangled.

## Add the bot to a server

1. Open the [install link](https://discord-bot.tangled.org/invite).
2. Select your server and select **Authorize**.

You must have the **Manage Server** permission to add the bot.

## Watch a repository

In a channel, type:

```plaintext
/tangled watch repo:tangled.org/core
```

> **Note**
>
> If the `/tangled` commands do not show, disable the legacy chat input. In Discord, go to **User Settings → Accessibility → Audio & Screen Reader** and turn off **Use the legacy chat input**.

The bot posts these events in that channel:

| Event               | What the bot posts                           |
| ------------------- | -------------------------------------------- |
| **Issues**          | Each new issue, with its title and body.     |
| **Pull requests**   | Each new pull request, with its diff stats.  |
| **Tags**            | Each new tag, with its message.              |
| **Artifacts**       | Each new artifact, with a link to its tag.   |
| **Star milestones** | The star count when it reaches 1, 2, 4, 8, … |

To post in a different channel, set the `channel` option. To turn off an event, set its option to `False`. For example, this command posts only issues and pull requests:

```plaintext
/tangled watch repo:tangled.org/core tags:False artifacts:False stars:False
```

To change the events later, run `/tangled watch` again for the same repository.

## Watch a collection

The bot can also post each new record of a collection in a repository, for example `org.tangled.feed.comment`:

```plaintext
/tangled collection add repo:tangled.org/core nsid:org.tangled.feed.comment
```

To stop, use `/tangled collection remove`.

## Other commands

* `/tangled list` shows all repositories that the server watches.
* `/tangled unwatch` stops all events for a repository.

Only members with the **Manage Server** permission can use these commands. A server can watch a maximum of 50 repositories.