list_chats.sh
470 Bytes
#!/bin/bash
# list_chats.sh - 列出飞书群聊
set -e
echo "=== Feishu/Lark Chat List ==="
# 使用 lark-cli 获取群聊列表
lark im chat list --page_size 20 2>/dev/null || {
echo "Error: Failed to list chats"
echo "Make sure you have completed authentication"
exit 1
}
echo ""
echo "To send a message to a chat, use:"
echo " lark im message create --receive_id_type chat_id --receive_id <chat_id> --msg_type text --content '{\"text\":\"Hello\"}'"