mirror of
https://github.com/InsanusMokrassar/ConfigurableInlineTelegramBot.git
synced 2025-09-04 07:39:19 +00:00
upupdate
This commit is contained in:
@@ -54,8 +54,8 @@ data class FormatterBot(
|
||||
val bot = botConfig.createBot()
|
||||
val filter = FlowsUpdatesFilter()
|
||||
bot.buildBehaviour(
|
||||
filter,
|
||||
scope,
|
||||
filter
|
||||
) {
|
||||
enableFormatterBot(templates, restrictions)
|
||||
}
|
||||
@@ -74,4 +74,4 @@ data class FormatterBot(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package dev.inmo.configurable_inline_telegram_bot.config
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InlineQuery
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@@ -11,4 +11,4 @@ data class Restrictions(
|
||||
fun check(query: InlineQuery): Boolean {
|
||||
return query.from.id in allowedUsers || query.from.username ?.let { it in allowedUsers } ?: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user