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:
  • channel_name (str) – The name of the announce channel that will be created.

  • channel_description (str) – The description of the announce channel that will be created.

  • message (str) – The message to send.

  • target_ids (List[int | UserCompact]) – The users to send the message to.

Return type:

ChatChannel

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:

CreatePMResponse

Notes

Implements the Create New PM endpoint.

Note

This endpoint requires the Scope.CHAT_WRITE scope.