File tree 2 files changed +19
-5
lines changed
library/src/main/java/com/pengrad/telegrambot/request
2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,17 @@ class SavePreparedInlineMessage(
16
16
val userId: Long by requestParameter(userId)
17
17
val result: InlineQueryResult <* > by requestParameter(result)
18
18
19
- @set:JvmName(" allowUserChats" ) var allowUserChats: Boolean? by optionalRequestParameter(customParameterName = " allow_user_chats" )
20
- @set:JvmName(" allowBotChats" ) var allowBotChats: Boolean? by optionalRequestParameter(customParameterName = " allow_bot_chats" )
21
- @set:JvmName(" allowGroupChats" ) var allowGroupChats: Boolean? by optionalRequestParameter(customParameterName = " allow_group_chats" )
22
- @set:JvmName(" allowChannelChats" ) var allowChannelChats: Boolean? by optionalRequestParameter(customParameterName = " allow_channel_chats" )
19
+ var allowUserChats: Boolean? by optionalRequestParameter(customParameterName = " allow_user_chats" )
20
+ var allowBotChats: Boolean? by optionalRequestParameter(customParameterName = " allow_bot_chats" )
21
+ var allowGroupChats: Boolean? by optionalRequestParameter(customParameterName = " allow_group_chats" )
22
+ var allowChannelChats: Boolean? by optionalRequestParameter(customParameterName = " allow_channel_chats" )
23
+
24
+ fun allowUserChats (allowUserChats : Boolean ) = apply { this .allowUserChats = allowUserChats }
25
+
26
+ fun allowBotChats (allowBotChats : Boolean ) = apply { this .allowBotChats = allowBotChats }
27
+
28
+ fun allowGroupChats (allowGroupChats : Boolean ) = apply { this .allowGroupChats = allowGroupChats }
29
+
30
+ fun allowChannelChats (allowChannelChats : Boolean ) = apply { this .allowChannelChats = allowChannelChats }
23
31
24
32
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class SendGift(
11
11
giftId : String ,
12
12
) : KBaseRequest<SendGift, BaseResponse>(BaseResponse : :class) {
13
13
14
- val userId: Long by requestParameter(userId)
14
+ val userId: Long by requestParameter(userId, customParameterName = " user_id " )
15
15
val giftId: String by requestParameter(giftId, customParameterName = " gift_id" )
16
16
17
17
@set:JvmName(" text" ) var text: String? by optionalRequestParameter()
@@ -21,4 +21,10 @@ class SendGift(
21
21
)
22
22
@set:JvmName(" textEntities" ) var textEntities: Array <MessageEntity >? by optionalRequestParameter(customParameterName = " text_entities" )
23
23
24
+ fun text (text : String ) = apply { this .text = text }
25
+
26
+ fun textParseMode (parseMode : ParseMode ) = apply { this .textParseMode = textParseMode }
27
+
28
+ fun textEntities (textEntities : Array <MessageEntity >) = apply { this .textEntities = textEntities }
29
+
24
30
}
You can’t perform that action at this time.
0 commit comments