ロボットがグループに参加したら、次の関数を使用して、ロボットにグループにテキスト メッセージを送信させます。
def send_feishu_message(content):
url = 'https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxx'
headers = {
'Content-Type': 'application/json'}
payload = {
"msg_type": "text",
"content": {
"text": content
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
このようにして、ロボットはグループにテキストを送信できます