1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

ReplyForce companion improvements

This commit is contained in:
InsanusMokrassar 2022-07-11 01:27:28 +06:00
parent 3f9237b5de
commit acaf46e015
2 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,14 @@
* `Core`: * `Core`:
* For `CopyMessage` order of parameters has been changed * For `CopyMessage` order of parameters has been changed
* `ReplyForce` defaults changes:
* All old companion properties (like `ReplyForce.ReplyForceSelective`) have been renamed:
* `ReplyForceSelective` -> `Selective`
* `ReplyForceNonSelective` -> `NonSelective`
* `ReplyForceDefault` -> `Default`
* New companion functions:
* `ReplyForce#Selective`
* `ReplyForce#NonSelective`
* `API`: * `API`:
* For `copyMessage` order of parameters has been changed * For `copyMessage` order of parameters has been changed
* `Utils`: * `Utils`:

View File

@ -15,8 +15,19 @@ data class ReplyForce(
val forceReply: Boolean = true val forceReply: Boolean = true
companion object { companion object {
val ReplyForceSelective = ReplyForce(true) fun Selective(inputFieldPlaceholder: String? = null) = ReplyForce(true, inputFieldPlaceholder)
val ReplyForceNonSelective = ReplyForce(false) fun NonSelective(inputFieldPlaceholder: String? = null) = ReplyForce(false, inputFieldPlaceholder)
val Selective = Selective()
val NonSelective = NonSelective()
val Default = ReplyForce()
@Deprecated("Renamed", ReplaceWith("ReplyForce.Selective"))
inline val ReplyForceSelective
get() = Selective
@Deprecated("Renamed", ReplaceWith("ReplyForce.NonSelective"))
inline val ReplyForceNonSelective
get() = NonSelective
@Deprecated("Renamed", ReplaceWith("ReplyForce.Default"))
val ReplyForceDefault = ReplyForce() val ReplyForceDefault = ReplyForce()
} }