# Discord bot

> Add the LayerHop Discord bot to a server for /price, /quote, /track and price, rug, unlock, move and cross-chain gap alerts by DM or in a channel a server admin picks. Non-custodial, slash commands only.

Source: https://docs.layerhop.com/guides/discord-bot

The LayerHop Discord bot brings prices, swap quotes, transfer tracking and alerts to Discord. Like the [Telegram bot](/guides/telegram-bot), it is **non-custodial**: `/quote` shows the best route and a link to finish the swap on layerhop.com, where you review the live quote and sign in **your own wallet**. The bot never asks for a private key or seed phrase and cannot move funds.

## How do I add it to my server?

Open the install link (`https://discord.layerhop.com/install` once it is live) and pick your server. The bot asks only for **View Channels**, **Send Messages** and **Embed Links**, which it needs to post alerts in the channel you choose. It uses slash commands only: it doesn't read your messages.

## Which commands are there?

| Command | What it does |
|---|---|
| `/price token [chain]` | Price (LayerHop [`GET /v1/prices`](/api-reference#get-usd-prices)), 1h and 24h change and main-pool liquidity (DexScreener), with **Buy** and token-page buttons |
| `/quote amount from from_chain to to_chain` | The best route across LayerHop's providers, what you receive, the minimum, ETA and LayerHop's fee, with a **Swap on LayerHop** button (`ref=bot`) |
| `/track tx [chain]` | Where a cross-chain transfer stands, on any bridge LayerHop's [transfer tracker](/guides/track-transfers) knows, with the next step |
| `/alert price \| move \| rug \| unlock \| gap …` | Alerts by DM, or in the server's alert channel (`where`) |
| `/alert list`, `/alert remove n`, `/alert mute n [for]` | Your alerts |
| `/settings channel \| clear \| show` | Server admins (Manage Server): the channel server alerts are posted in |

Tokens are symbols (`SOL`, `USDC`) or addresses; a `0x` address needs `chain`.

## How do alerts work?

The rules are the same as on Telegram (one shared alert engine):

- **price**: above or below a USD price. It fires when the price crosses, then again only after the price has moved back past your target by 1%.
- **move**: the price moved at least `pct` % (default 10) within 1h or 24h.
- **rug**: the token's main pool loses `pct` % (default 50) of its liquidity within an hour, or its risk check turns `danger`.
- **unlock**: a vesting unlock of at least `min_pct` % of circulating supply (default 1) or `min_usd` (default $1M) is due within `days` (default 3), from DefiLlama's emissions data.
- **gap**: the same token (USDC, USDT, ETH / WETH, DAI, WBTC, cbBTC) is at least `pct` % (default 1) cheaper on another chain, with a **Swap now** button.

Every alert message has **Mute 24h** and **Remove** buttons. Alerts are checked about once a minute, with cooldowns per alert and at most 20 messages per DM or channel per hour.

**DMs:** alerts arrive as DMs from the bot, so keep "Direct messages from server members" (or from apps) allowed. If Discord refuses a DM, the bot drops that person's DM alerts.

**Server channel:** an admin runs `/settings channel` and picks a text channel. Then members with **Manage Server** add server alerts with `where: This server's alert channel`. Moving the channel moves the alerts; `/settings clear` removes them. The person who set an alert, or any server admin, can mute or remove a channel alert with its buttons.

## What does the bot store?

Your alerts (the token, the rule and where to send it), your Discord user id, and per server the chosen alert channel. No wallets, no keys. `/alert remove` deletes an alert; `/settings clear` deletes a server's channel alerts.

## What does it charge?

Nothing for prices, quotes, tracking or alerts. Swaps opened from its links use the `bot` fee channel, shown on every quote before you sign. See [Fees & channels](/concepts/fees-and-channels).
