1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +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`:
* 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`:
* For `copyMessage` order of parameters has been changed
* `Utils`:

View File

@ -15,8 +15,19 @@ data class ReplyForce(
val forceReply: Boolean = true
companion object {
val ReplyForceSelective = ReplyForce(true)
val ReplyForceNonSelective = ReplyForce(false)
fun Selective(inputFieldPlaceholder: String? = null) = ReplyForce(true, inputFieldPlaceholder)
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()
}