toggle menu
ktgbotapi
common
switch theme
search in API
tgbotapi.core
/
dev.inmo.tgbotapi.types.files
/
VoiceFile
Voice
File
@
Serializable
data
class
VoiceFile
(
val
fileId
:
FileId
,
val
fileUniqueId
:
TgFileUniqueId
,
val
duration
:
Long
?
=
null
,
val
mimeType
:
MimeType
?
=
null
,
val
fileSize
:
Long
?
=
null
)
:
TelegramMediaFile
,
MimedMediaFile
,
PlayableMediaFile
,
MediaContentVariant
Members
Members & Extensions
Constructors
Voice
File
Link copied to clipboard
constructor
(
fileId
:
FileId
,
fileUniqueId
:
TgFileUniqueId
,
duration
:
Long
?
=
null
,
mimeType
:
MimeType
?
=
null
,
fileSize
:
Long
?
=
null
)
Properties
duration
Link copied to clipboard
@
SerialName
(
value
=
"duration"
)
open
override
val
duration
:
Long
?
=
null
file
Id
Link copied to clipboard
@
SerialName
(
value
=
"file_id"
)
open
override
val
fileId
:
FileId
file
Size
Link copied to clipboard
@
SerialName
(
value
=
"file_size"
)
open
override
val
fileSize
:
Long
?
=
null
file
Unique
Id
Link copied to clipboard
@
SerialName
(
value
=
"file_unique_id"
)
open
override
val
fileUniqueId
:
TgFileUniqueId
mime
Type
Link copied to clipboard
@
SerialName
(
value
=
"mime_type"
)
open
override
val
mimeType
:
MimeType
?
=
null
Functions
as
Audio
File
Link copied to clipboard
fun
VoiceFile
.
asAudioFile
(
performer
:
String
?
=
null
,
title
:
String
?
=
null
,
fileName
:
String
?
=
null
)
:
AudioFile
as
Document
File
Link copied to clipboard
inline
fun
TelegramMediaFile
.
asDocumentFile
(
)
:
DocumentFile