Skip to content

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).

ChannelModePublic IP RequiredNotes
TelegramLong PollingNoAuto-polling, no server exposure needed
DiscordREST PollingNoPolls every 2 seconds
DingTalkWebhook / StreamWebhook: Yes / Stream: NoStream uses WebSocket, no public IP
FeishuWebhook / StreamWebhook: Yes / Stream: NoStream uses WebSocket, no public IP
SlackWebhookYesReceives messages via Events API
WeComWebhookNoPush-only to group chats

  1. Search for @BotFather in Telegram
  2. Send the /newbot command
  3. Follow the prompts to set the bot name and username
  4. Upon creation, BotFather returns a Bot Token (format: 123456789:ABCdefGHI-jklMNO...)
  5. Save this token securely
  1. Send a message to the bot (or add the bot to a group and send a message)
  2. Open in browser: https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
  3. Find "chat":{"id": 123456} in the returned JSON — that’s your Chat ID
  1. Navigate to System Management → Bot Configuration → Telegram
  2. Fill in the configuration:
FieldDescriptionRequired
Bot TokenToken obtained from BotFatherYes
Allowed Chat IDsComma-separated list of allowed Chat IDsNo (empty = accept all messages)
  1. Toggle Enable on
  2. The system automatically starts long polling — the bot will receive and reply to messages

  1. Visit the Discord Developer Portal
  2. Click New Application, enter a name and create
  3. Go to Bot in the left menu
  4. Click Add Bot to create the bot
  5. Click Reset Token to get the Bot Token — save it securely
  6. Under Privileged Gateway Intents, enable MESSAGE CONTENT INTENT (required to read message content)
  1. Go to OAuth2 → URL Generator in the left menu
  2. Under Scopes, check bot
  3. Under Bot Permissions, check:
    • Send Messages
    • Read Message History
    • View Channels
  4. Copy the generated invite link and open it in your browser
  5. Select the target server and confirm authorization
  1. Enable Developer Mode in Discord:
    • User Settings → Advanced → Enable “Developer Mode”
  2. Guild ID (Server ID): Right-click the server name → Copy Server ID
  3. Channel ID: Right-click the target text channel → Copy Channel ID
  1. Navigate to System Management → Bot Configuration → Discord
  2. Fill in the configuration:
FieldDescriptionRequired
Bot TokenDiscord Bot TokenYes
Guild IDServer IDYes
Allowed Channel IDsComma-separated list of allowed channel IDsNo (empty = listen to all channels)
  1. Toggle Enable on

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. Log in to the DingTalk Open Platform
  2. Create an enterprise internal app → Add Bot capability
  3. In the app’s Credentials & Basic Info, obtain the Client ID (AppKey) and Client Secret (AppSecret)
  1. Navigate to System Management → Bot Configuration → DingTalk
  2. Switch mode to Stream
  3. Fill in the configuration:
FieldDescriptionRequired
ModeSelect StreamYes
Client IDApp’s AppKeyYes
Client SecretApp’s AppSecretYes
  1. Toggle Enable on

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. Log in to the Feishu Open Platform
  2. Create an enterprise self-built app
  3. Add Bot capability
  4. In Credentials & Basic Info, obtain the App ID and App Secret
  5. In Events & Callbacks → Event Configuration, select Long Connection mode
  6. Subscribe to events: im.message.receive_v1 (receive messages)
  1. Navigate to System Management → Bot Configuration → Feishu
  2. Switch mode to Stream
  3. Fill in the configuration:
FieldDescriptionRequired
ModeSelect StreamYes
App IDFeishu app’s App IDYes
App SecretFeishu app’s App SecretYes
  1. Toggle Enable on

  1. Visit Slack API and click Create New App
  2. Choose From scratch, enter the app name and select a workspace
  3. Under Event Subscriptions, enable events
  4. Set the request URL:
    https://<your-server-domain>:<port>/api/v1/webhook/slack
  5. Under Subscribe to bot events, add: message.channels, message.im
  6. Under OAuth & Permissions, add Bot Token Scopes:
    • chat:write — Send messages
    • channels:history — Read channel message history
    • im:history — Read direct message history
  7. Install the app to your workspace and obtain the Bot Token (starts with xoxb-)
  8. In Basic Information, obtain the Signing Secret
  1. Navigate to System Management → Bot Configuration → Slack
  2. Fill in the configuration:
FieldDescriptionRequired
Webhook URLSlack Incoming Webhook URL (for push messages)Optional
Bot TokenBot Token (starts with xoxb-, for channel replies)Recommended
Allowed Channel IDsComma-separated list of allowed channel IDsOptional
  1. Toggle Enable on

WeCom bot currently supports push-only messaging to group chats.

  1. In a WeCom group chat, click Group Settings → Add Group Bot
  2. Enter the bot name and create
  3. Copy the generated Webhook URL
  1. Navigate to System Management → Bot Configuration → WeCom
  2. Fill in the configuration:
FieldDescriptionRequired
Webhook URLWeCom Webhook URLYes
  1. Toggle Enable on

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.

SettingDescriptionDefault
Context ModePersistent — AI remembers conversation history within a session. Stateless — each message is treated independently with no history.Persistent
Session TimeoutHow long (in minutes) before an idle session expires and context is cleared. Set to 0 for no timeout.30 minutes
Default ProviderAI provider used for bot channel conversations (e.g., OpenAI, Anthropic). If not set, the system’s default AI provider is used.System default
Default ModelAI model used for bot channel conversations. If not set, the provider’s default model is used.Provider default

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.

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 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.


  1. Confirm the channel’s Enable toggle is on
  2. Check EasyShell server logs — search for Started channel or Failed to start channel
  3. Verify the Bot Token or Webhook URL is correct
  4. 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?”
  1. Verify the Client ID / App ID and Secret are correct
  2. Confirm the app has Bot capability enabled on the open platform
  3. Check that outbound network from your server can reach api.dingtalk.com or open.feishu.cn
  4. Check logs for WebSocket connection errors
  5. Stream mode auto-reconnects with exponential backoff — wait a few seconds

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)?”
  1. Confirm you’re using an enterprise internal application bot (not a custom group bot) with a message receiving URL configured
  2. Verify the callback URL https://<domain>/api/v1/webhook/dingtalk is publicly accessible
  3. Check that the signing Secret matches the DingTalk Open Platform configuration
  4. Check server logs for signature verification failures

Feishu bot not receiving messages (Webhook mode)?

Section titled “Feishu bot not receiving messages (Webhook mode)?”
  1. Verify the callback URL https://<domain>/api/v1/webhook/feishu is publicly accessible
  2. Confirm the url_verification challenge completed successfully (EasyShell handles this automatically)
  3. Confirm you’ve subscribed to the im.message.receive_v1 event
  4. Check that the signing Secret matches the Feishu Open Platform configuration
  1. Verify the Events API request URL https://<domain>/api/v1/webhook/slack is publicly accessible
  2. Confirm you’ve subscribed to message.channels and message.im events
  3. Confirm Bot Token Scopes include chat:write and channels:history
  4. Check that the Signing Secret is correct

Check the EasyShell server startup logs:

Started channel: telegram — Telegram bot started
Started channel: discord — Discord bot started
DingTalk 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 started
WeChat Work bot started (webhook mode) — WeCom bot started
Failed to start channel: xxx — Startup failed, check error details

Bot doesn’t remember conversation history?

Section titled “Bot doesn’t remember conversation history?”
  1. Check that Context Mode is set to Persistent (not Stateless) in Channel Context Settings
  2. Verify the Session Timeout hasn’t expired — if the user was idle longer than the configured timeout, the session was cleared
  3. Check server logs for Session expired for messages indicating timeout-based cleanup
  4. 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.