mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-09-15 13:09:29 +00:00
provide support of inlines
This commit is contained in:
@@ -10,6 +10,9 @@ import dev.inmo.micro_utils.repos.pagination.getAll
|
||||
import dev.inmo.micro_utils.repos.set
|
||||
import dev.inmo.plagubot.Plugin
|
||||
import dev.inmo.plaguposter.common.*
|
||||
import dev.inmo.plaguposter.inlines.models.Format
|
||||
import dev.inmo.plaguposter.inlines.models.OfferTemplate
|
||||
import dev.inmo.plaguposter.inlines.repos.InlineTemplatesRepo
|
||||
import dev.inmo.plaguposter.posts.models.PostId
|
||||
import dev.inmo.plaguposter.posts.repo.PostsRepo
|
||||
import dev.inmo.plaguposter.ratings.models.Rating
|
||||
@@ -189,5 +192,22 @@ object Plugin : Plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
koin.getOrNull<InlineTemplatesRepo>() ?.apply {
|
||||
addTemplate(
|
||||
OfferTemplate(
|
||||
"Enable ratings for post",
|
||||
listOf(Format("attach_ratings")),
|
||||
"Require reply on post message"
|
||||
)
|
||||
)
|
||||
addTemplate(
|
||||
OfferTemplate(
|
||||
"Disable ratings for post",
|
||||
listOf(Format("detach_ratings")),
|
||||
"Require reply on post message"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user