Chat¶
- send_announcement(self, channel_name, channel_description, message, target_ids)¶
Send an announcement message. You must be in the announce usergroup to use this endpoint (and if you don’t know what that is, then you aren’t in it).
If you want to send a normal pm, see
send_pm()
.- Parameters:
- Return type:
Notes
Implements the Create Channel endpoint.
Warning
I don’t have an account in the announce usergroup, so I’ve never tested this endpoint. If it breaks for you, please open an issue on github or dm me on discord (tybug#8490)!
Note
This endpoint requires the
Scope.CHAT_WRITE_MANAGE
scope.
- send_pm(self, user_id, message, *, is_action=False)¶
Send a pm to a user.
- Parameters:
user_id (int | UserCompact) – The user to send a message to.
message (str) – The message to send.
is_action (bool | None)
- Return type:
Notes
Implements the Create New PM endpoint.
Note
This endpoint requires the
Scope.CHAT_WRITE
scope.