Bot Channels
EasyShell supports multiple messaging channels that connect to the AI assistant, allowing your team to interact with EasyShell through Telegram, Discord, DingTalk, Feishu (Lark), Slack, or WeCom (WeChat Work).
Channel Overview
Section titled “Channel Overview”| Channel | Mode | Public IP Required | Notes |
|---|---|---|---|
| Telegram | Long Polling | No | Auto-polling, no server exposure needed |
| Discord | REST Polling | No | Polls every 2 seconds |
| DingTalk | Webhook / Stream | Webhook: Yes / Stream: No | Stream uses WebSocket, no public IP |
| Feishu | Webhook / Stream | Webhook: Yes / Stream: No | Stream uses WebSocket, no public IP |
| Slack | Webhook | Yes | Receives messages via Events API |
| WeCom | Webhook | No | Push-only to group chats |
Telegram Bot
Section titled “Telegram Bot”1. Create a Telegram Bot
Section titled “1. Create a Telegram Bot”- Search for @BotFather in Telegram
- Send the
/newbotcommand - Follow the prompts to set the bot name and username
- Upon creation, BotFather returns a Bot Token (format:
123456789:ABCdefGHI-jklMNO...) - Save this token securely
2. Get Chat ID
Section titled “2. Get Chat ID”- Send a message to the bot (or add the bot to a group and send a message)
- Open in browser:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Find
"chat":{"id": 123456}in the returned JSON — that’s your Chat ID
Search for @userinfobot in Telegram and send any message to get your Chat ID.
3. Configure in EasyShell
Section titled “3. Configure in EasyShell”- Navigate to System Management → Bot Configuration → Telegram
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Bot Token | Token obtained from BotFather | Yes |
| Allowed Chat IDs | Comma-separated list of allowed Chat IDs | No (empty = accept all messages) |
- Toggle Enable on
- The system automatically starts long polling — the bot will receive and reply to messages
Discord Bot
Section titled “Discord Bot”1. Create a Discord Bot
Section titled “1. Create a Discord Bot”- Visit the Discord Developer Portal
- Click New Application, enter a name and create
- Go to Bot in the left menu
- Click Add Bot to create the bot
- Click Reset Token to get the Bot Token — save it securely
- Under Privileged Gateway Intents, enable MESSAGE CONTENT INTENT (required to read message content)
2. Invite the Bot to Your Server
Section titled “2. Invite the Bot to Your Server”- Go to OAuth2 → URL Generator in the left menu
- Under Scopes, check
bot - Under Bot Permissions, check:
Send MessagesRead Message HistoryView Channels
- Copy the generated invite link and open it in your browser
- Select the target server and confirm authorization
3. Get Guild ID and Channel ID
Section titled “3. Get Guild ID and Channel ID”- Enable Developer Mode in Discord:
- User Settings → Advanced → Enable “Developer Mode”
- Guild ID (Server ID): Right-click the server name → Copy Server ID
- Channel ID: Right-click the target text channel → Copy Channel ID
4. Configure in EasyShell
Section titled “4. Configure in EasyShell”- Navigate to System Management → Bot Configuration → Discord
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Bot Token | Discord Bot Token | Yes |
| Guild ID | Server ID | Yes |
| Allowed Channel IDs | Comma-separated list of allowed channel IDs | No (empty = listen to all channels) |
- Toggle Enable on
DingTalk Bot
Section titled “DingTalk Bot”DingTalk bot supports two modes: Webhook mode and Stream mode.
Stream mode uses a WebSocket long-lived connection to receive messages — no public IP or HTTPS certificate required. This is the recommended approach.
1. Create an Enterprise Internal App
Section titled “1. Create an Enterprise Internal App”- Log in to the DingTalk Open Platform
- Create an enterprise internal app → Add Bot capability
- In the app’s Credentials & Basic Info, obtain the Client ID (AppKey) and Client Secret (AppSecret)
2. Configure in EasyShell
Section titled “2. Configure in EasyShell”- Navigate to System Management → Bot Configuration → DingTalk
- Switch mode to Stream
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Mode | Select Stream | Yes |
| Client ID | App’s AppKey | Yes |
| Client Secret | App’s AppSecret | Yes |
- Toggle Enable on
Webhook mode requires your server to have a publicly accessible HTTPS address.
1. Create a DingTalk Custom Bot
Section titled “1. Create a DingTalk Custom Bot”- Open DingTalk desktop client, enter the target group chat
- Click Group Settings → Smart Group Assistant → Add Bot
- Select Custom (via Webhook)
- Set the bot name and avatar
- For security, select Sign and record the Secret (starts with
SEC) - Click Finish and copy the generated Webhook URL
2. Configure Callback URL (Receiving User Messages)
Section titled “2. Configure Callback URL (Receiving User Messages)”Enterprise internal application bot setup:
- Log in to the DingTalk Open Platform
- Create an enterprise internal app → Add bot capability
- Set the message receiving URL to:
https://<your-server-domain>:<port>/api/v1/webhook/dingtalk
- Requirements:
- Must use HTTPS
- Must be publicly accessible
- For internal servers, use tools like ngrok or frp for tunneling
3. Configure in EasyShell
Section titled “3. Configure in EasyShell”- Navigate to System Management → Bot Configuration → DingTalk
- Switch mode to Webhook
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Mode | Select Webhook | Yes |
| Webhook URL | DingTalk Webhook URL | Yes |
| Secret | Signing key (starts with SEC) | Recommended |
- Toggle Enable on
Feishu (Lark) Bot
Section titled “Feishu (Lark) Bot”Feishu bot supports both Webhook mode and Stream mode.
Stream mode uses a WebSocket long-lived connection to receive messages — no public IP or HTTPS certificate required.
1. Create a Feishu App
Section titled “1. Create a Feishu App”- Log in to the Feishu Open Platform
- Create an enterprise self-built app
- Add Bot capability
- In Credentials & Basic Info, obtain the App ID and App Secret
- In Events & Callbacks → Event Configuration, select Long Connection mode
- Subscribe to events:
im.message.receive_v1(receive messages)
2. Configure in EasyShell
Section titled “2. Configure in EasyShell”- Navigate to System Management → Bot Configuration → Feishu
- Switch mode to Stream
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Mode | Select Stream | Yes |
| App ID | Feishu app’s App ID | Yes |
| App Secret | Feishu app’s App Secret | Yes |
- Toggle Enable on
Webhook mode requires your server to have a publicly accessible HTTPS address.
1. Create a Feishu App
Section titled “1. Create a Feishu App”- Log in to the Feishu Open Platform
- Create an enterprise self-built app → Add Bot capability
- In Credentials & Basic Info, obtain the App Secret (for signature verification)
- In Events & Callbacks, set the request URL:
https://<your-server-domain>:<port>/api/v1/webhook/feishu
- Feishu will send a
url_verificationrequest — EasyShell handles this automatically - Subscribe to events:
im.message.receive_v1(receive messages)
2. Get Webhook URL (Push Messages)
Section titled “2. Get Webhook URL (Push Messages)”To push messages to Feishu groups:
- In Feishu group settings, add a Custom Bot
- Copy the generated Webhook URL
- Optionally enable Signature Verification and obtain the key
3. Configure in EasyShell
Section titled “3. Configure in EasyShell”- Navigate to System Management → Bot Configuration → Feishu
- Switch mode to Webhook
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Mode | Select Webhook | Yes |
| Webhook URL | Feishu Webhook URL (for push messages) | Optional |
| Secret | Signing key (HMAC-SHA256 verification) | Recommended |
- Toggle Enable on
Slack Bot
Section titled “Slack Bot”1. Create a Slack App
Section titled “1. Create a Slack App”- Visit Slack API and click Create New App
- Choose From scratch, enter the app name and select a workspace
- Under Event Subscriptions, enable events
- Set the request URL:
https://<your-server-domain>:<port>/api/v1/webhook/slack
- Under Subscribe to bot events, add:
message.channels,message.im - Under OAuth & Permissions, add Bot Token Scopes:
chat:write— Send messageschannels:history— Read channel message historyim:history— Read direct message history
- Install the app to your workspace and obtain the Bot Token (starts with
xoxb-) - In Basic Information, obtain the Signing Secret
2. Configure in EasyShell
Section titled “2. Configure in EasyShell”- Navigate to System Management → Bot Configuration → Slack
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Webhook URL | Slack Incoming Webhook URL (for push messages) | Optional |
| Bot Token | Bot Token (starts with xoxb-, for channel replies) | Recommended |
| Allowed Channel IDs | Comma-separated list of allowed channel IDs | Optional |
- Toggle Enable on
WeCom (WeChat Work) Bot
Section titled “WeCom (WeChat Work) Bot”WeCom bot currently supports push-only messaging to group chats.
1. Create a Group Bot
Section titled “1. Create a Group Bot”- In a WeCom group chat, click Group Settings → Add Group Bot
- Enter the bot name and create
- Copy the generated Webhook URL
2. Configure in EasyShell
Section titled “2. Configure in EasyShell”- Navigate to System Management → Bot Configuration → WeCom
- Fill in the configuration:
| Field | Description | Required |
|---|---|---|
| Webhook URL | WeCom Webhook URL | Yes |
- Toggle Enable on
Conversation Context Settings
Section titled “Conversation Context Settings”Bot channels support persistent conversation context, so the AI remembers previous messages within a session. These settings are configured globally for all channels.
Navigate to System Management → Bot Configuration, and find the Channel Context Settings panel.
Configuration Options
Section titled “Configuration Options”| Setting | Description | Default |
|---|---|---|
| Context Mode | Persistent — AI remembers conversation history within a session. Stateless — each message is treated independently with no history. | Persistent |
| Session Timeout | How long (in minutes) before an idle session expires and context is cleared. Set to 0 for no timeout. | 30 minutes |
| Default Provider | AI provider used for bot channel conversations (e.g., OpenAI, Anthropic). If not set, the system’s default AI provider is used. | System default |
| Default Model | AI model used for bot channel conversations. If not set, the provider’s default model is used. | Provider default |
Per-Channel Provider & Model
Section titled “Per-Channel Provider & Model”In each channel’s configuration section, you can optionally set a Provider and Model specific to that channel. This allows different channels to use different AI models. If left empty, the global channel defaults above are used.
Resetting Conversation Context
Section titled “Resetting Conversation Context”Users can send the /new command in any bot channel to reset their conversation context and start a fresh session. This clears all previous message history for that user/chat.
Scheduled Task Channel Push
Section titled “Scheduled Task Channel Push”Scheduled inspection tasks and scheduled script execution results can be pushed to designated bot channels. When creating or editing a scheduled task, select the Notification Channel — task results will be automatically sent to the selected channels upon completion.
All enabled channels are supported: Telegram, Discord, DingTalk, Feishu, Slack, and WeCom.
Troubleshooting
Section titled “Troubleshooting”Bot not responding after configuration?
Section titled “Bot not responding after configuration?”- Confirm the channel’s Enable toggle is on
- Check EasyShell server logs — search for
Started channelorFailed to start channel - Verify the Bot Token or Webhook URL is correct
- Confirm an AI model provider is configured (e.g., OpenAI, DeepSeek)
DingTalk / Feishu Stream mode not connecting?
Section titled “DingTalk / Feishu Stream mode not connecting?”- Verify the Client ID / App ID and Secret are correct
- Confirm the app has Bot capability enabled on the open platform
- Check that outbound network from your server can reach
api.dingtalk.comoropen.feishu.cn - Check logs for WebSocket connection errors
- Stream mode auto-reconnects with exponential backoff — wait a few seconds
How to restart Telegram / Discord bot?
Section titled “How to restart Telegram / Discord bot?”In Bot Configuration, turn off the channel’s Enable toggle, wait a few seconds, then turn it back on. The system will automatically stop the old connection and establish a new one.
DingTalk bot not receiving messages (Webhook mode)?
Section titled “DingTalk bot not receiving messages (Webhook mode)?”- Confirm you’re using an enterprise internal application bot (not a custom group bot) with a message receiving URL configured
- Verify the callback URL
https://<domain>/api/v1/webhook/dingtalkis publicly accessible - Check that the signing Secret matches the DingTalk Open Platform configuration
- Check server logs for signature verification failures
Feishu bot not receiving messages (Webhook mode)?
Section titled “Feishu bot not receiving messages (Webhook mode)?”- Verify the callback URL
https://<domain>/api/v1/webhook/feishuis publicly accessible - Confirm the
url_verificationchallenge completed successfully (EasyShell handles this automatically) - Confirm you’ve subscribed to the
im.message.receive_v1event - Check that the signing Secret matches the Feishu Open Platform configuration
Slack bot not receiving messages?
Section titled “Slack bot not receiving messages?”- Verify the Events API request URL
https://<domain>/api/v1/webhook/slackis publicly accessible - Confirm you’ve subscribed to
message.channelsandmessage.imevents - Confirm Bot Token Scopes include
chat:writeandchannels:history - Check that the Signing Secret is correct
How to check bot status?
Section titled “How to check bot status?”Check the EasyShell server startup logs:
Started channel: telegram — Telegram bot startedStarted channel: discord — Discord bot startedDingTalk bot started (stream mode) — DingTalk bot started (Stream)DingTalk bot started (webhook mode) — DingTalk bot started (Webhook)Feishu bot started (stream mode) — Feishu bot started (Stream)Feishu bot started (webhook mode) — Feishu bot started (Webhook)Slack bot started (webhook mode) — Slack bot startedWeChat Work bot started (webhook mode) — WeCom bot startedFailed to start channel: xxx — Startup failed, check error detailsBot doesn’t remember conversation history?
Section titled “Bot doesn’t remember conversation history?”- Check that Context Mode is set to Persistent (not Stateless) in Channel Context Settings
- Verify the Session Timeout hasn’t expired — if the user was idle longer than the configured timeout, the session was cleared
- Check server logs for
Session expired formessages indicating timeout-based cleanup - Remember that server restarts clear all session context
How to use different AI models for different channels?
Section titled “How to use different AI models for different channels?”Set the Provider and Model fields in each channel’s individual configuration section. For example, you can use GPT-4o for Telegram and Claude for Discord. If a channel’s provider/model is not set, it falls back to the global channel defaults, then to the system AI settings.