mirror of
https://github.com/hibobmaster/matrix_chatgpt_bot.git
synced 2024-10-01 05:35:36 -04:00
13 lines
385 B
Python
13 lines
385 B
Python
from nio import AsyncClient
|
|
|
|
|
|
async def send_room_message(client: AsyncClient,
|
|
room_id: str,
|
|
send_text: str) -> None:
|
|
await client.room_send(
|
|
room_id,
|
|
message_type="m.room.message",
|
|
content={"msgtype": "m.text", "body": f"{send_text}"},
|
|
)
|
|
await client.room_typing(room_id, typing_state=False)
|