sendFile

suspend fun ChannelClient.sendFile(data: FileData, comment: String = ""): Message(source)

Calls ChannelClient.createMessage for to attach a file without needing to create a CreateMessage object first.

Return

the created Message.

Parameters

data

The file to attach.

comment

An optional comment to send with the file.

Throws

upon client errors.

suspend fun ChannelClient.sendFile(file: File, comment: String = ""): Message(source)

Calls ChannelClient.createMessage for text messages without needing to create a CreateMessage object first.

Return

the created Message.

Parameters

file

The file to attach.

comment

The comment to send with the file.

Throws

upon client errors.


suspend fun ChannelClient.sendFile(path: Path, comment: String = ""): Message(source)

Calls ChannelClient.createMessage for text messages without needing to create a CreateMessage object first.

Return

the created Message.

Parameters

path

The file to attach.

comment

The comment to send with the file.

Throws

upon client errors.