From 7abb6efba3072a445daa43574e6b24570af8dffd Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 6 Nov 2023 21:48:03 +0600 Subject: [PATCH] add force posts check shortcut in inline mode --- posts/gc/src/jvmMain/kotlin/Plugin.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/posts/gc/src/jvmMain/kotlin/Plugin.kt b/posts/gc/src/jvmMain/kotlin/Plugin.kt index 889bc7b..63ec05e 100644 --- a/posts/gc/src/jvmMain/kotlin/Plugin.kt +++ b/posts/gc/src/jvmMain/kotlin/Plugin.kt @@ -11,6 +11,9 @@ import dev.inmo.micro_utils.coroutines.actor import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions import dev.inmo.micro_utils.repos.deleteById import dev.inmo.plagubot.Plugin +import dev.inmo.plagubot.plugins.inline.queries.models.Format +import dev.inmo.plagubot.plugins.inline.queries.models.OfferTemplate +import dev.inmo.plagubot.plugins.inline.queries.repos.InlineTemplatesRepo import dev.inmo.plaguposter.common.ChatConfig import dev.inmo.plaguposter.posts.models.NewPost import dev.inmo.plaguposter.posts.models.PostContentInfo @@ -164,5 +167,14 @@ object Plugin : Plugin { } } } + koin.getOrNull() ?.addTemplate( + OfferTemplate( + "Force posts check", + listOf( + Format("/force_garbage_collection") + ), + "Force check posts without exists messages" + ) + ) } }