2020-10-04 11:06:30 +00:00
|
|
|
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
2019-12-11 08:06:09 +00:00
|
|
|
|
|
|
|
private val commandRegex = Regex("[/!][^@\\s]*")
|
|
|
|
|
2020-11-06 12:52:59 +00:00
|
|
|
/**
|
|
|
|
* @see botCommand
|
|
|
|
*/
|
2022-05-01 14:36:07 +00:00
|
|
|
@Deprecated("Replaced", ReplaceWith("BotCommandTextSource", "dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource"))
|
|
|
|
typealias BotCommandTextSource = dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
|
2020-11-06 12:52:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param command Without leading "/"
|
|
|
|
*/
|
|
|
|
@Suppress("NOTHING_TO_INLINE")
|
2022-05-01 14:36:07 +00:00
|
|
|
@Deprecated("Replaced", ReplaceWith("botCommand", "dev.inmo.tgbotapi.types.message.textsources.botCommand"))
|
|
|
|
inline fun botCommand(command: String) = dev.inmo.tgbotapi.types.message.textsources.botCommand(command)
|