最も単純な顔射ロボットの作り方

ここに画像の説明を挿入

ロボットがグループに参加したら、次の関数を使用して、ロボットにグループにテキスト メッセージを送信させます。

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)

このようにして、ロボットはグループにテキストを送信できます

おすすめ

転載: blog.csdn.net/duoyasong5907/article/details/129915049