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:
parent
3f9237b5de
commit
acaf46e015
@ -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`:
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user