Skip to content

Commit 0f301c4

Browse files
committed
Added the class InputProfilePhoto, describing a profile photo to be set.
1 parent 4f816a0 commit 0f301c4

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.pengrad.telegrambot.model.inputprofilephoto
2+
3+
open class InputProfilePhoto(val type: String)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.pengrad.telegrambot.model.inputprofilephoto
2+
3+
@Suppress("unused")
4+
class InputProfilePhotoAnimated private constructor(
5+
val animation: String,
6+
var mainFrameTimestamp: Double?
7+
) : InputProfilePhoto(type = "animated") {
8+
9+
constructor(animation: String) : this(
10+
animation = animation,
11+
mainFrameTimestamp = null
12+
)
13+
14+
fun mainFrameTimestamp(mainFrameTimestamp: Double) = apply {
15+
this.mainFrameTimestamp = mainFrameTimestamp
16+
}
17+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.pengrad.telegrambot.model.inputprofilephoto
2+
3+
@Suppress("unused")
4+
class InputProfilePhotoStatic(val photo: String) : InputProfilePhoto(type = "static")

0 commit comments

Comments
 (0)