mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
fix of build
This commit is contained in:
parent
92407c9010
commit
48c4a3156b
@ -1,8 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.utils.internal
|
package dev.inmo.tgbotapi.utils.internal
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource
|
import dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
|
||||||
import dev.inmo.tgbotapi.types.link
|
|
||||||
import dev.inmo.tgbotapi.utils.extensions.*
|
import dev.inmo.tgbotapi.utils.extensions.*
|
||||||
|
|
||||||
internal fun MultilevelTextSource.markdownV2Default(
|
internal fun MultilevelTextSource.markdownV2Default(
|
||||||
@ -61,8 +60,8 @@ internal fun MultilevelTextSource.underlineMarkdownV2(): String = markdownV2Defa
|
|||||||
internal fun MultilevelTextSource.underlineHTML(): String = htmlDefault(htmlUnderlineControl)
|
internal fun MultilevelTextSource.underlineHTML(): String = htmlDefault(htmlUnderlineControl)
|
||||||
|
|
||||||
|
|
||||||
internal fun MultilevelTextSource.textMentionMarkdownV2(userId: UserId): String = linkMarkdownV2(userId.link)
|
internal fun MultilevelTextSource.textMentionMarkdownV2(userId: UserId): String = linkMarkdownV2(userId.userLink)
|
||||||
internal fun MultilevelTextSource.textMentionHTML(userId: UserId): String = linkHTML(userId.link)
|
internal fun MultilevelTextSource.textMentionHTML(userId: UserId): String = linkHTML(userId.userLink)
|
||||||
|
|
||||||
internal fun MultilevelTextSource.mentionMarkdownV2(): String = optionalPrefix("@") + subsources.makeMarkdownV2String()
|
internal fun MultilevelTextSource.mentionMarkdownV2(): String = optionalPrefix("@") + subsources.makeMarkdownV2String()
|
||||||
internal fun MultilevelTextSource.mentionHTML(): String = optionalPrefix("@") + subsources.makeHtmlString()
|
internal fun MultilevelTextSource.mentionHTML(): String = optionalPrefix("@") + subsources.makeHtmlString()
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.utils.internal
|
package dev.inmo.tgbotapi.utils.internal
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.link
|
|
||||||
import dev.inmo.tgbotapi.types.message.*
|
import dev.inmo.tgbotapi.types.message.*
|
||||||
import dev.inmo.tgbotapi.utils.extensions.*
|
import dev.inmo.tgbotapi.utils.extensions.*
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ private inline fun String.hashTag(adapt: String.() -> String): String = if (star
|
|||||||
"#${adapt()}"
|
"#${adapt()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun String.textMentionMarkdown(userId: UserId): String = linkMarkdown(userId.link)
|
internal fun String.textMentionMarkdown(userId: UserId): String = linkMarkdown(userId.userLink)
|
||||||
|
|
||||||
internal fun String.mentionMarkdown(): String = mention(String::toMarkdown)
|
internal fun String.mentionMarkdown(): String = mention(String::toMarkdown)
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ val Chat.link: String?
|
|||||||
inviteLink ?.let { return it }
|
inviteLink ?.let { return it }
|
||||||
}
|
}
|
||||||
if (this is PrivateChat) {
|
if (this is PrivateChat) {
|
||||||
return id.link
|
return id.userLink
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -109,9 +109,9 @@ private inline fun String.hashTag(adapt: String.() -> String): String = if (star
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun String.textMentionMarkdown(userId: UserId): String = linkMarkdown(userId.link)
|
fun String.textMentionMarkdown(userId: UserId): String = linkMarkdown(userId.userLink)
|
||||||
fun String.textMentionMarkdownV2(userId: UserId): String = linkMarkdownV2(userId.link)
|
fun String.textMentionMarkdownV2(userId: UserId): String = linkMarkdownV2(userId.userLink)
|
||||||
fun String.textMentionHTML(userId: UserId): String = linkHTML(userId.link)
|
fun String.textMentionHTML(userId: UserId): String = linkHTML(userId.userLink)
|
||||||
|
|
||||||
|
|
||||||
fun String.mentionMarkdown(): String = mention(String::toMarkdown)
|
fun String.mentionMarkdown(): String = mention(String::toMarkdown)
|
||||||
|
Loading…
Reference in New Issue
Block a user