diff --git a/project/MornyConfiguration.scala b/project/MornyConfiguration.scala index d5ba8f0..87c170a 100644 --- a/project/MornyConfiguration.scala +++ b/project/MornyConfiguration.scala @@ -8,7 +8,7 @@ object MornyConfiguration { val MORNY_CODE_STORE = "https://github.com/Eyre-S/Coeur-Morny-Cono" val MORNY_COMMIT_PATH = "https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s" - val VERSION = "2.0.0-alpha9" + val VERSION = "2.0.0-alpha10" val VERSION_DELTA: Option[String] = None val CODENAME = "guanggu" diff --git a/project/MornyProject.scala b/project/MornyProject.scala index 1242517..7f7b96b 100644 --- a/project/MornyProject.scala +++ b/project/MornyProject.scala @@ -28,7 +28,7 @@ object MornyProject { val app_group = "cc.sukazyo" val app_package = s"$app_group.cono.morny" val app_archive_name = MornyConfiguration.MORNY_ARCHIVE_NAME - val app_application_main = s"$app_package.ServerMain" + val app_application_main = s"$app_package.core.ServerMain" val version_base = MornyConfiguration.VERSION val version_delta = MornyConfiguration.VERSION_DELTA diff --git a/src/main/scala/cc/sukazyo/cono/morny/ServerModulesLoader.scala b/src/main/scala/cc/sukazyo/cono/morny/ServerModulesLoader.scala deleted file mode 100644 index 28f168b..0000000 --- a/src/main/scala/cc/sukazyo/cono/morny/ServerModulesLoader.scala +++ /dev/null @@ -1,26 +0,0 @@ -package cc.sukazyo.cono.morny - -object ServerModulesLoader { - - def load (): List[MornyModule] = { - - List( - - tele_utils.ModuleTeleUtils(), - randomize_somthing.ModuleRandomize(), - slash_action.ModuleSlashAction(), - nbnhhsh.ModuleNbnhhsh(), - ip186.ModuleIP186(), - encrypt_tool.ModuleEncryptor(), - call_me.ModuleCallMe(), - social_share.ModuleSocialShare(), - medication_timer.ModuleMedicationTimer(), - morny_misc.ModuleMornyMisc(), - uni_meow.ModuleUniMeow(), - reporter.Module() - - ) - - } - -} diff --git a/src/main/scala/cc/sukazyo/cono/morny/call_me/ModuleCallMe.scala b/src/main/scala/cc/sukazyo/cono/morny/call_me/ModuleCallMe.scala index d268603..33987b7 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/call_me/ModuleCallMe.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/call_me/ModuleCallMe.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.call_me -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule class ModuleCallMe extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMe.scala b/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMe.scala index 200d0b4..0e934b7 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMe.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMe.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.call_me -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramFormatter.* import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMsgSend.scala b/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMsgSend.scala index 32deb5d..53c7bd2 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMsgSend.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/call_me/OnCallMsgSend.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.call_me -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.{Chat, Message, MessageEntity} diff --git a/src/main/scala/cc/sukazyo/cono/morny/Log.scala b/src/main/scala/cc/sukazyo/cono/morny/core/Log.scala similarity index 71% rename from src/main/scala/cc/sukazyo/cono/morny/Log.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/Log.scala index c8dd452..536dc85 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/Log.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/Log.scala @@ -1,10 +1,8 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core -import cc.sukazyo.cono.morny.internal.logging.{MornyFormatterConsole, MornyLoggerBase} +import cc.sukazyo.cono.morny.core.internal.logging.{MornyFormatterConsole, MornyLoggerBase} import cc.sukazyo.messiva.appender.ConsoleAppender -import cc.sukazyo.messiva.formatter.SimpleFormatter import cc.sukazyo.messiva.log.LogLevels -import cc.sukazyo.messiva.logger.Logger import java.io.{PrintWriter, StringWriter} @@ -19,7 +17,7 @@ object Log { def debug: Boolean = logger.levelSetting.minLevel.level <= LogLevels.DEBUG.level - def debug(is: Boolean): Unit = + def debug (is: Boolean): Unit = if is then logger.minLevel(LogLevels.ALL) else logger.minLevel(LogLevels.INFO) diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyAbout.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornyAbout.scala similarity index 88% rename from src/main/scala/cc/sukazyo/cono/morny/MornyAbout.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyAbout.scala index 9d608ed..36dbed0 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyAbout.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyAbout.scala @@ -1,4 +1,6 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core + +import cc.sukazyo.cono.morny.core.MornyAssets import java.io.IOException diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyAssets.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornyAssets.scala similarity index 88% rename from src/main/scala/cc/sukazyo/cono/morny/MornyAssets.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyAssets.scala index c331ea9..76990b2 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyAssets.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyAssets.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core import cc.sukazyo.restools.ResourcesPackage diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyCoeur.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornyCoeur.scala similarity index 96% rename from src/main/scala/cc/sukazyo/cono/morny/MornyCoeur.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyCoeur.scala index bbadf99..a08820c 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyCoeur.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyCoeur.scala @@ -1,11 +1,9 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core -import cc.sukazyo.cono.morny.bot.command.MornyCommandManager -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} -import cc.sukazyo.cono.morny.MornyCoeur.* -import cc.sukazyo.cono.morny.bot.api.EventListenerManager -import cc.sukazyo.cono.morny.bot.event.{MornyOnInlineQuery, MornyOnTelegramCommand, MornyOnUpdateTimestampOffsetLock} -import cc.sukazyo.cono.morny.bot.query.MornyQueryManager +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.MornyCoeur.* +import cc.sukazyo.cono.morny.core.bot.api.{EventListenerManager, MornyCommandManager, MornyQueryManager} +import cc.sukazyo.cono.morny.core.bot.event.{MornyOnInlineQuery, MornyOnTelegramCommand, MornyOnUpdateTimestampOffsetLock} import cc.sukazyo.cono.morny.reporter.MornyReport import cc.sukazyo.cono.morny.util.schedule.Scheduler import cc.sukazyo.cono.morny.util.EpochDateTime.EpochMillis @@ -111,7 +109,7 @@ class MornyCoeur (modules: List[MornyModule])(using val config: MornyConfig)(tes given MornyCoeur = this val externalContext: GivenContext = GivenContext() - import util.dataview.Table.format as fmtTable + import cc.sukazyo.cono.morny.util.dataview.Table.format as fmtTable logger info s"""The following Modules have been added to current Morny: |${fmtTable( diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyConfig.java b/src/main/scala/cc/sukazyo/cono/morny/core/MornyConfig.java similarity index 95% rename from src/main/scala/cc/sukazyo/cono/morny/MornyConfig.java rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyConfig.java index c8ed479..71b8205 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyConfig.java +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyConfig.java @@ -1,4 +1,6 @@ -package cc.sukazyo.cono.morny; +package cc.sukazyo.cono.morny.core; + +import cc.sukazyo.cono.morny.core.bot.event.MornyOnUpdateTimestampOffsetLock; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -88,7 +90,7 @@ public class MornyConfig { *
* 过期事件即发生时间比 {@link MornyCoeur#coeurStartTimestamp()} 早的事件。 *
- * 如果此项设置为 true, 则 {@link cc.sukazyo.cono.morny.bot.event.MornyOnUpdateTimestampOffsetLock} + * 如果此项设置为 true, 则 {@link MornyOnUpdateTimestampOffsetLock} * 会使事件时间比 {@link MornyCoeur#coeurStartTimestamp()} 早的事件跳过处理 */ public final boolean eventIgnoreOutdated; @@ -113,7 +115,7 @@ public class MornyConfig { /** * 控制 Morny Coeur 系统的报告的基准时间. *

- * 仅会用于 {@link cc.sukazyo.cono.morny.daemon.MornyReport} 内的时间敏感的报告, + * 仅会用于 {@link cc.sukazyo.cono.morny.reporter.MornyReport} 内的时间敏感的报告, * 不会用于 {@code /info} 命令等位置。 *

* 默认使用 {@link TimeZone#getDefault()}. diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyModule.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornyModule.scala similarity index 84% rename from src/main/scala/cc/sukazyo/cono/morny/MornyModule.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyModule.scala index d0d6b43..87971e6 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyModule.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyModule.scala @@ -1,6 +1,6 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core -import cc.sukazyo.cono.morny.MornyCoeur.* +import cc.sukazyo.cono.morny.core.MornyCoeur.* trait MornyModule { @@ -8,19 +8,24 @@ trait MornyModule { val name: String val version: String - val description: String|Null + val description: String | Null def onInitializingPre (using MornyCoeur)(cxt: OnInitializingPreContext): Unit = {} + def onInitializing (using MornyCoeur)(cxt: OnInitializingContext): Unit = {} + def onInitializingPost (using MornyCoeur)(cxt: OnInitializingPostContext): Unit = {} def onStarting (using MornyCoeur)(cxt: OnStartingContext): Unit = {} + def onStartingPost (using MornyCoeur)(cxt: OnStartingPostContext): Unit = {} def onRoutineSavingData (using MornyCoeur): Unit = {} def onExiting (using MornyCoeur): Unit = {} + def onExitingPost (using MornyCoeur): Unit = {} + def onExited (using MornyCoeur): Unit = {} } diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornySystem.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornySystem.scala similarity index 89% rename from src/main/scala/cc/sukazyo/cono/morny/MornySystem.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornySystem.scala index 7400eb0..11d0012 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornySystem.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornySystem.scala @@ -1,9 +1,10 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core -import cc.sukazyo.cono.morny.internal.BuildConfigField -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.internal.BuildConfigField import cc.sukazyo.cono.morny.util.EpochDateTime.EpochMillis import cc.sukazyo.cono.morny.util.FileUtils +import cc.sukazyo.cono.morny.BuildConfig import java.io.IOException import java.net.URISyntaxException diff --git a/src/main/scala/cc/sukazyo/cono/morny/MornyTrusted.scala b/src/main/scala/cc/sukazyo/cono/morny/core/MornyTrusted.scala similarity index 91% rename from src/main/scala/cc/sukazyo/cono/morny/MornyTrusted.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/MornyTrusted.scala index 1400db6..60929a3 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/MornyTrusted.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/MornyTrusted.scala @@ -1,8 +1,8 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core +import cc.sukazyo.cono.morny.core.Log.logger import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.{LimboChat, LimboUser} import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Chat.* -import cc.sukazyo.cono.morny.Log.logger import com.pengrad.telegrambot.model.ChatMember.Status import com.pengrad.telegrambot.TelegramBot diff --git a/src/main/scala/cc/sukazyo/cono/morny/ServerMain.scala b/src/main/scala/cc/sukazyo/cono/morny/core/ServerMain.scala similarity index 59% rename from src/main/scala/cc/sukazyo/cono/morny/ServerMain.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/ServerMain.scala index 06f0335..c1a0918 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/ServerMain.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/ServerMain.scala @@ -1,18 +1,17 @@ -package cc.sukazyo.cono.morny +package cc.sukazyo.cono.morny.core -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyConfig.CheckFailure +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyConfig.CheckFailure import cc.sukazyo.cono.morny.util.CommonFormat import java.time.ZoneOffset import java.util.TimeZone import scala.collection.mutable.ArrayBuffer -import scala.language.postfixOps -object ServerMain { +object ServerMain { val tz: TimeZone = TimeZone getDefault - val tz_offset: ZoneOffset = ZoneOffset ofTotalSeconds (tz.getRawOffset/1000) + val tz_offset: ZoneOffset = ZoneOffset ofTotalSeconds(tz.getRawOffset / 1000) private val THREAD_MORNY_INIT: String = "morny-init" @@ -44,28 +43,28 @@ object ServerMain { deprecatedArgs += "--outdated-block" -> "--outdated-ignore" case "--outdated-ignore" | "-oig" => config.eventIgnoreOutdated = true - case "--api" | "-a" => i+=1 ; config.telegramBotApiServer = args(i) - case "--api-files" | "files-api" | "-af" => i+=1; config.telegramBotApiServer4File = args(i) + case "--api" | "-a" => i += 1; config.telegramBotApiServer = args(i) + case "--api-files" | "files-api" | "-af" => i += 1; config.telegramBotApiServer4File = args(i) - case "--token" | "-t" => i+=1 ; config.telegramBotKey = args(i) - case "--username" | "-u" => i+=1 ; config.telegramBotUsername = args(i) + case "--token" | "-t" => i += 1; config.telegramBotKey = args(i) + case "--username" | "-u" => i += 1; config.telegramBotUsername = args(i) - case "--master" | "-mm" => i+=1 ; config.trustedMaster = args(i)toLong - case "--trusted-chat" | "-trs" => i+=1 ; config.trustedChat = args(i)toLong - case "--report-to" => i+=1; config.reportToChat = args(i)toLong - case "--report-zone" => i+=1; config.reportZone = TimeZone.getTimeZone(args(i)) + case "--master" | "-mm" => i += 1; config.trustedMaster = args(i) toLong + case "--trusted-chat" | "-trs" => i += 1; config.trustedChat = args(i) toLong + case "--report-to" => i += 1; config.reportToChat = args(i) toLong + case "--report-zone" => i += 1; config.reportZone = TimeZone.getTimeZone(args(i)) - case "--trusted-reader-dinner" | "-trsd" => i+=1 ; config.dinnerTrustedReaders add (args(i)toLong) - case "--dinner-chat" | "-chd" => i+=1 ; config.dinnerChatId = args(i)toLong + case "--trusted-reader-dinner" | "-trsd" => i += 1; config.dinnerTrustedReaders add(args(i) toLong) + case "--dinner-chat" | "-chd" => i += 1; config.dinnerChatId = args(i) toLong - case "--medication-notify-chat" | "-medc" => i+=1 ; config.medicationNotifyToChat = args(i)toLong + case "--medication-notify-chat" | "-medc" => i += 1; config.medicationNotifyToChat = args(i) toLong case "--medication-notify-timezone" | "-medtz" => - i+=1 - config.medicationTimerUseTimezone = ZoneOffset.ofHours(args(i)toInt) + i += 1 + config.medicationTimerUseTimezone = ZoneOffset.ofHours(args(i) toInt) case "--medication-notify-times" | "-medt" => - i+=1 + i += 1 for (u <- args(i) split ",") { - config.medicationNotifyAt add (u toInt) + config.medicationNotifyAt add(u toInt) } case "--auto-cmd-list" | "-ca" => config.commandLoginRefresh = true @@ -77,7 +76,7 @@ object ServerMain { case _ => unknownArgs append args(i) } - i+=1 + i += 1 } /// Setup launch params from ENVIRONMENT @@ -99,48 +98,57 @@ object ServerMain { if (mode_echoHello) return if (unknownArgs.nonEmpty) logger warn - s"""Can't understand arg to some meaning - | ${unknownArgs mkString "\n "}""" + s"""Can't understand arg to some meaning + | ${unknownArgs mkString "\n "}""" .stripMargin if (deprecatedArgs.nonEmpty) logger warn s"""Those arguments have been deprecated: - | ${deprecatedArgs map ((d, n) => s"$d : use $n instead") mkString "\n "} + | ${deprecatedArgs map((d, n) => s"$d : use $n instead") mkString "\n "} |""".stripMargin if (Log debug) logger warn - """Debug log output enabled. - | It may lower your performance, make sure that you are not in production environment.""" + """Debug log output enabled. + | It may lower your performance, make sure that you are not in production environment.""" .stripMargin if (mode_echoVersion) { logger info - s"""Morny Cono Version - |- version : - | Morny ${MornySystem.CODENAME toUpperCase} - | ${MornySystem.VERSION_BASE}${MornySystem.VERSION_DELTA match{case Some(d) => "-δ" + d case None => ""}} - |- md5hash : - | ${MornySystem.getJarMD5} - |- gitstat : - |${ MornySystem.GIT_COMMIT match { case Some(commit) => + s"""Morny Cono Version + |- version : + | Morny ${MornySystem.CODENAME toUpperCase} + | ${MornySystem.VERSION_BASE}${ + MornySystem.VERSION_DELTA match { + case Some(d) => "-δ" + d + case None => "" + } + } + |- md5hash : + | ${MornySystem.getJarMD5} + |- gitstat : + |${ + MornySystem.GIT_COMMIT match { + case Some(commit) => s""" on commit ${if (MornySystem.isCleanBuild) "- clean-build" else "<δ/non-clean-build>"} | $commit""" - .stripMargin - case None => " " }} - |- buildtd : - | ${MornySystem.CODE_TIMESTAMP} - | ${CommonFormat.formatDate(MornySystem.CODE_TIMESTAMP, 0)} [UTC]""" - .stripMargin + .stripMargin + case None => " " + } + } + |- buildtd : + | ${MornySystem.CODE_TIMESTAMP} + | ${CommonFormat.formatDate(MornySystem.CODE_TIMESTAMP, 0)} [UTC]""" + .stripMargin return } logger info - s"""ServerMain.java Loaded >>> - |- version ${MornySystem.VERSION_FULL} - |- Morny ${MornySystem.CODENAME toUpperCase} - |- <${MornySystem.getJarMD5}> [${MornySystem.CODE_TIMESTAMP}]""".stripMargin + s"""ServerMain.java Loaded >>> + |- version ${MornySystem.VERSION_FULL} + |- Morny ${MornySystem.CODENAME toUpperCase} + |- <${MornySystem.getJarMD5}> [${MornySystem.CODE_TIMESTAMP}]""".stripMargin // due to [[MornyFormatterConsole]] will use a localized time, it will output to the log logger info s"logging time will use time-zone ${tz.getID} ($tz_offset)" diff --git a/src/main/scala/cc/sukazyo/cono/morny/core/ServerModulesLoader.scala b/src/main/scala/cc/sukazyo/cono/morny/core/ServerModulesLoader.scala new file mode 100644 index 0000000..a4b5d7e --- /dev/null +++ b/src/main/scala/cc/sukazyo/cono/morny/core/ServerModulesLoader.scala @@ -0,0 +1,28 @@ +package cc.sukazyo.cono.morny.core + +import cc.sukazyo.cono.morny + +object ServerModulesLoader { + + def load (): List[MornyModule] = { + + List( + + morny.tele_utils.ModuleTeleUtils(), + morny.randomize_somthing.ModuleRandomize(), + morny.slash_action.ModuleSlashAction(), + morny.nbnhhsh.ModuleNbnhhsh(), + morny.ip186.ModuleIP186(), + morny.encrypt_tool.ModuleEncryptor(), + morny.call_me.ModuleCallMe(), + morny.social_share.ModuleSocialShare(), + morny.medication_timer.ModuleMedicationTimer(), + morny.morny_misc.ModuleMornyMisc(), + morny.uni_meow.ModuleUniMeow(), + morny.reporter.Module() + + ) + + } + +} diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventEnv.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventEnv.scala similarity index 96% rename from src/main/scala/cc/sukazyo/cono/morny/bot/api/EventEnv.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventEnv.scala index 9c37602..11dfb81 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventEnv.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventEnv.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.bot.api +package cc.sukazyo.cono.morny.core.bot.api import cc.sukazyo.cono.morny.util.EpochDateTime.EpochMillis import cc.sukazyo.cono.morny.util.GivenContext diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListener.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListener.scala similarity index 97% rename from src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListener.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListener.scala index fa7c490..a8da606 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListener.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListener.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.bot.api +package cc.sukazyo.cono.morny.core.bot.api trait EventListener () { diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListenerManager.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListenerManager.scala similarity index 96% rename from src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListenerManager.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListenerManager.scala index dab29d9..a2e4fa4 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/api/EventListenerManager.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/EventListenerManager.scala @@ -1,7 +1,7 @@ -package cc.sukazyo.cono.morny.bot.api +package cc.sukazyo.cono.morny.core.bot.api -import cc.sukazyo.cono.morny.{Log, MornyCoeur} -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.{Log, MornyCoeur} +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} import cc.sukazyo.cono.morny.reporter.MornyReport import cc.sukazyo.cono.morny.util.tgapi.event.EventRuntimeException import com.google.gson.GsonBuilder diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ICommandAlias.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ICommandAlias.scala similarity index 96% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/ICommandAlias.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ICommandAlias.scala index de9dbe7..d102ebe 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ICommandAlias.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ICommandAlias.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.api /** One alias definition, contains the necessary message of how * to process the alias. diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ISimpleCommand.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ISimpleCommand.scala similarity index 96% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/ISimpleCommand.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ISimpleCommand.scala index dcd5d91..a851405 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ISimpleCommand.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ISimpleCommand.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.api import cc.sukazyo.cono.morny.util.tgapi.InputCommand import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ITelegramCommand.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramCommand.scala similarity index 93% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/ITelegramCommand.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramCommand.scala index 1a720b8..9ec6aab 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/ITelegramCommand.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramCommand.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.api /** A complex telegram command. * diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/query/ITelegramQuery.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramQuery.scala similarity index 65% rename from src/main/scala/cc/sukazyo/cono/morny/bot/query/ITelegramQuery.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramQuery.scala index a7a2b99..52e3036 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/query/ITelegramQuery.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/ITelegramQuery.scala @@ -1,6 +1,6 @@ -package cc.sukazyo.cono.morny.bot.query +package cc.sukazyo.cono.morny.core.bot.api -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur import com.pengrad.telegrambot.model.Update import javax.annotation.Nullable diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/query/InlineQueryUnit.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/InlineQueryUnit.scala similarity index 81% rename from src/main/scala/cc/sukazyo/cono/morny/bot/query/InlineQueryUnit.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/InlineQueryUnit.scala index b15f4b6..563dfd0 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/query/InlineQueryUnit.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/InlineQueryUnit.scala @@ -1,6 +1,6 @@ -package cc.sukazyo.cono.morny.bot.query +package cc.sukazyo.cono.morny.core.bot.api -import cc.sukazyo.cono.morny.bot.query.InlineQueryUnit.defaults +import cc.sukazyo.cono.morny.core.bot.api.InlineQueryUnit.defaults import com.pengrad.telegrambot.model.request.InlineQueryResult object InlineQueryUnit { diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyCommandManager.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyCommandManager.scala similarity index 90% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyCommandManager.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyCommandManager.scala index 4d8b9c7..1cee14d 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyCommandManager.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyCommandManager.scala @@ -1,9 +1,10 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.api -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ISimpleCommand, ITelegramCommand} +import cc.sukazyo.cono.morny.core.bot.api.MornyCommandManager.CommandMap import cc.sukazyo.cono.morny.data.TelegramStickers -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.bot.command.MornyCommandManager.CommandMap import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.{BotCommand, DeleteMyCommands, Update} diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/query/MornyQueryManager.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyQueryManager.scala similarity index 81% rename from src/main/scala/cc/sukazyo/cono/morny/bot/query/MornyQueryManager.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyQueryManager.scala index b4e92fc..11da0f7 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/query/MornyQueryManager.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/api/MornyQueryManager.scala @@ -1,7 +1,6 @@ -package cc.sukazyo.cono.morny.bot.query +package cc.sukazyo.cono.morny.core.bot.api -import cc.sukazyo.cono.morny.bot.query -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur import com.pengrad.telegrambot.model.Update import scala.collection.mutable diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/DirectMsgClear.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/DirectMsgClear.scala similarity index 90% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/DirectMsgClear.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/DirectMsgClear.scala index cb49df2..c740062 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/DirectMsgClear.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/DirectMsgClear.scala @@ -1,7 +1,8 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.command -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyHellos.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyHellos.scala similarity index 84% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyHellos.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyHellos.scala index ebf5518..b6ed789 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyHellos.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyHellos.scala @@ -1,6 +1,8 @@ -package cc.sukazyo.cono.morny.bot.command -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.ICommandAlias.ListedAlias +package cc.sukazyo.cono.morny.core.bot.command + +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.bot.api.ICommandAlias.ListedAlias import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInfoOnStart.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInfoOnStart.scala similarity index 87% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInfoOnStart.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInfoOnStart.scala index c9f55e2..ffaebfb 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInfoOnStart.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInfoOnStart.scala @@ -1,6 +1,7 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.command -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.data.MornyInformation.{getAboutPic, getMornyAboutLinksHTML} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformation.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformation.scala similarity index 97% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformation.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformation.scala index 36f9e2e..3fed1f8 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformation.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformation.scala @@ -1,6 +1,7 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.command -import cc.sukazyo.cono.morny.{MornyCoeur, MornySystem} +import cc.sukazyo.cono.morny.core.{MornyCoeur, MornySystem} +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.data.MornyInformation.* import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.reporter.MornyReport diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformationOlds.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformationOlds.scala similarity index 83% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformationOlds.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformationOlds.scala index 3521b6e..ddcbfd5 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyInformationOlds.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyInformationOlds.scala @@ -1,5 +1,6 @@ -package cc.sukazyo.cono.morny.bot.command +package cc.sukazyo.cono.morny.core.bot.command +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyManagers.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyManagers.scala similarity index 89% rename from src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyManagers.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyManagers.scala index e833843..145ca37 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/command/MornyManagers.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/command/MornyManagers.scala @@ -1,8 +1,10 @@ -package cc.sukazyo.cono.morny.bot.command -import cc.sukazyo.cono.morny.bot.command.ICommandAlias.HiddenAlias -import cc.sukazyo.cono.morny.MornyCoeur +package cc.sukazyo.cono.morny.core.bot.command + +import cc.sukazyo.cono.morny.core.bot.api.ICommandAlias.HiddenAlias +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.data.TelegramStickers -import cc.sukazyo.cono.morny.Log.logger import cc.sukazyo.cono.morny.reporter.MornyReport import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramFormatter.* diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnInlineQuery.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnInlineQuery.scala similarity index 83% rename from src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnInlineQuery.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnInlineQuery.scala index db5c821..5d2dbc7 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnInlineQuery.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnInlineQuery.scala @@ -1,8 +1,7 @@ -package cc.sukazyo.cono.morny.bot.event +package cc.sukazyo.cono.morny.core.bot.event -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, MornyQueryManager} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener, InlineQueryUnit, MornyQueryManager} import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.request.InlineQueryResult import com.pengrad.telegrambot.request.AnswerInlineQuery diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnTelegramCommand.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnTelegramCommand.scala similarity index 81% rename from src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnTelegramCommand.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnTelegramCommand.scala index f49f292..c9b4eb7 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnTelegramCommand.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnTelegramCommand.scala @@ -1,9 +1,8 @@ -package cc.sukazyo.cono.morny.bot.event +package cc.sukazyo.cono.morny.core.bot.event -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.MornyCommandManager +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener, MornyCommandManager} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import com.pengrad.telegrambot.model.{Message, Update} diff --git a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnUpdateTimestampOffsetLock.scala b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnUpdateTimestampOffsetLock.scala similarity index 82% rename from src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnUpdateTimestampOffsetLock.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnUpdateTimestampOffsetLock.scala index 734af34..8f1c015 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/bot/event/MornyOnUpdateTimestampOffsetLock.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/bot/event/MornyOnUpdateTimestampOffsetLock.scala @@ -1,7 +1,7 @@ -package cc.sukazyo.cono.morny.bot.event +package cc.sukazyo.cono.morny.core.bot.event -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} class MornyOnUpdateTimestampOffsetLock (using coeur: MornyCoeur) extends EventListener { diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/BuildConfigField.java b/src/main/scala/cc/sukazyo/cono/morny/core/internal/BuildConfigField.java similarity index 88% rename from src/main/scala/cc/sukazyo/cono/morny/internal/BuildConfigField.java rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/BuildConfigField.java index f9931ce..92a324c 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/BuildConfigField.java +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/BuildConfigField.java @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.internal; +package cc.sukazyo.cono.morny.core.internal; import java.lang.annotation.Documented; diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/MornyInternalModule.scala b/src/main/scala/cc/sukazyo/cono/morny/core/internal/MornyInternalModule.scala similarity index 50% rename from src/main/scala/cc/sukazyo/cono/morny/internal/MornyInternalModule.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/MornyInternalModule.scala index 03866c1..39f2d02 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/MornyInternalModule.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/MornyInternalModule.scala @@ -1,6 +1,6 @@ -package cc.sukazyo.cono.morny.internal +package cc.sukazyo.cono.morny.core.internal -import cc.sukazyo.cono.morny.{MornyModule, MornySystem} +import cc.sukazyo.cono.morny.core.{MornyModule, MornySystem} trait MornyInternalModule extends MornyModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/IMornyLogLevelImpl.scala b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/IMornyLogLevelImpl.scala similarity index 81% rename from src/main/scala/cc/sukazyo/cono/morny/internal/logging/IMornyLogLevelImpl.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/IMornyLogLevelImpl.scala index 80d2847..5c16a4d 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/IMornyLogLevelImpl.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/IMornyLogLevelImpl.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.internal.logging +package cc.sukazyo.cono.morny.core.internal.logging import cc.sukazyo.messiva.log.Message diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyFormatterConsole.scala b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyFormatterConsole.scala similarity index 88% rename from src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyFormatterConsole.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyFormatterConsole.scala index 2d9514a..4f13086 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyFormatterConsole.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyFormatterConsole.scala @@ -1,7 +1,7 @@ -package cc.sukazyo.cono.morny.internal.logging +package cc.sukazyo.cono.morny.core.internal.logging +import cc.sukazyo.cono.morny.core.ServerMain import cc.sukazyo.cono.morny.util.CommonFormat.formatDate -import cc.sukazyo.cono.morny.ServerMain import cc.sukazyo.messiva.formatter.ILogFormatter import cc.sukazyo.messiva.log.Log diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLogLevels.scala b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLogLevels.scala similarity index 83% rename from src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLogLevels.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLogLevels.scala index acaf7b8..fa4a895 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLogLevels.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLogLevels.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.internal.logging +package cc.sukazyo.cono.morny.core.internal.logging import cc.sukazyo.messiva.log.ILogLevel diff --git a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLoggerBase.scala b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLoggerBase.scala similarity index 93% rename from src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLoggerBase.scala rename to src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLoggerBase.scala index 5d4b143..62cc15a 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/internal/logging/MornyLoggerBase.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/core/internal/logging/MornyLoggerBase.scala @@ -1,4 +1,4 @@ -package cc.sukazyo.cono.morny.internal.logging +package cc.sukazyo.cono.morny.core.internal.logging import cc.sukazyo.messiva.appender.IAppender import cc.sukazyo.messiva.log.{Log, Message} diff --git a/src/main/scala/cc/sukazyo/cono/morny/data/MornyInformation.scala b/src/main/scala/cc/sukazyo/cono/morny/data/MornyInformation.scala index 686b211..b94d554 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/data/MornyInformation.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/data/MornyInformation.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.data -import cc.sukazyo.cono.morny.{MornyAbout, MornySystem} +import cc.sukazyo.cono.morny.core.{MornyAbout, MornySystem} import java.net.InetAddress import java.rmi.UnknownHostException diff --git a/src/main/scala/cc/sukazyo/cono/morny/data/TelegramImages.scala b/src/main/scala/cc/sukazyo/cono/morny/data/TelegramImages.scala index e6362d4..d26a45b 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/data/TelegramImages.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/data/TelegramImages.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.data -import cc.sukazyo.cono.morny.MornyAssets -import cc.sukazyo.cono.morny.MornyAssets.AssetsException +import cc.sukazyo.cono.morny.core.MornyAssets +import cc.sukazyo.cono.morny.core.MornyAssets.AssetsException import java.io.IOException import scala.language.postfixOps diff --git a/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/Encryptor.scala b/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/Encryptor.scala index 1292b87..a86538c 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/Encryptor.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/Encryptor.scala @@ -1,9 +1,9 @@ package cc.sukazyo.cono.morny.encrypt_tool -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} -import cc.sukazyo.cono.morny.bot.command.ICommandAlias.ListedAlias +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.bot.api.ICommandAlias.ListedAlias import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.reporter.MornyReport import cc.sukazyo.cono.morny.util.tgapi.InputCommand diff --git a/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/ModuleEncryptor.scala b/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/ModuleEncryptor.scala index d87ec6c..e809b48 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/ModuleEncryptor.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/encrypt_tool/ModuleEncryptor.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.encrypt_tool -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleEncryptor extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/ip186/BotCommand.scala b/src/main/scala/cc/sukazyo/cono/morny/ip186/BotCommand.scala index 4580dd4..c4d94dd 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/ip186/BotCommand.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/ip186/BotCommand.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.ip186 -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/ip186/ModuleIP186.scala b/src/main/scala/cc/sukazyo/cono/morny/ip186/ModuleIP186.scala index 612bb7c..a5ae8c1 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/ip186/ModuleIP186.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/ip186/ModuleIP186.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.ip186 -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleIP186 extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/MedicationTimer.scala b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/MedicationTimer.scala index 5dadf15..80489f2 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/MedicationTimer.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/MedicationTimer.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.medication_timer -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur import cc.sukazyo.cono.morny.medication_timer.MedicationTimer.calcNextRoutineTimestamp import cc.sukazyo.cono.morny.util.schedule.RoutineTask import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/ModuleMedicationTimer.scala b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/ModuleMedicationTimer.scala index 33e80ee..15f2dad 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/ModuleMedicationTimer.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/ModuleMedicationTimer.scala @@ -1,8 +1,8 @@ package cc.sukazyo.cono.morny.medication_timer -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleMedicationTimer extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/OnMedicationNotifyApply.scala b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/OnMedicationNotifyApply.scala index 38f3ae1..1cbc965 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/medication_timer/OnMedicationNotifyApply.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/medication_timer/OnMedicationNotifyApply.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.medication_timer -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import com.pengrad.telegrambot.model.Message class OnMedicationNotifyApply (using instance: MedicationTimer)(using coeur: MornyCoeur) extends EventListener { diff --git a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/ModuleMornyMisc.scala b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/ModuleMornyMisc.scala index 5bb699c..c59aab3 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/ModuleMornyMisc.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/ModuleMornyMisc.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.morny_misc -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleMornyMisc extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/MornyOldJrrp.scala b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/MornyOldJrrp.scala index 3773a1c..16f9ed0 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/MornyOldJrrp.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/MornyOldJrrp.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.morny_misc -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramFormatter.* import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/Testing.scala b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/Testing.scala index dea0371..1401039 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/morny_misc/Testing.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/morny_misc/Testing.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.morny_misc -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ISimpleCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/CommandNbnhhsh.scala b/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/CommandNbnhhsh.scala index 7b8743e..10c1e23 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/CommandNbnhhsh.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/CommandNbnhhsh.scala @@ -1,7 +1,8 @@ package cc.sukazyo.cono.morny.nbnhhsh -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramParseEscape.escapeHtml as h import cc.sukazyo.cono.morny.util.tgapi.InputCommand @@ -44,7 +45,6 @@ class CommandNbnhhsh (using coeur: MornyCoeur) extends ITelegramCommand { val message = StringBuilder(NBNHHSH_RESULT_HEAD_HTML) - import cc.sukazyo.cono.morny.Log.logger logger trace s"**nbnhhsh got len=${queryResp.words.length}" for (_word <- queryResp.words) { logger trace s"**start for ${_word.name}" diff --git a/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/ModuleNbnhhsh.scala b/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/ModuleNbnhhsh.scala index 19bb05e..ec597f9 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/ModuleNbnhhsh.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/nbnhhsh/ModuleNbnhhsh.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.nbnhhsh -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleNbnhhsh extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/ModuleRandomize.scala b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/ModuleRandomize.scala index ee22c5f..808b713 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/ModuleRandomize.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/ModuleRandomize.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.randomize_somthing -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleRandomize extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnQuestionMarkReply.scala b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnQuestionMarkReply.scala index aaeb765..a3ea6e0 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnQuestionMarkReply.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnQuestionMarkReply.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.randomize_somthing -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.randomize_somthing.OnQuestionMarkReply.isAllMessageMark import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.request.SendMessage diff --git a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnUserRandom.scala b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnUserRandom.scala index d5a0060..d7f2989 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnUserRandom.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/randomize_somthing/OnUserRandom.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.randomize_somthing -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.request.SendMessage import com.pengrad.telegrambot.response.SendResponse diff --git a/src/main/scala/cc/sukazyo/cono/morny/reporter/Module.scala b/src/main/scala/cc/sukazyo/cono/morny/reporter/Module.scala index 22a6fde..2450024 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/reporter/Module.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/reporter/Module.scala @@ -1,8 +1,8 @@ package cc.sukazyo.cono.morny.reporter -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur class Module extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/reporter/MornyReport.scala b/src/main/scala/cc/sukazyo/cono/morny/reporter/MornyReport.scala index 00c888e..c0e4b59 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/reporter/MornyReport.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/reporter/MornyReport.scala @@ -1,8 +1,8 @@ package cc.sukazyo.cono.morny.reporter -import cc.sukazyo.cono.morny.{MornyCoeur, MornyConfig} -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.{MornyCoeur, MornyConfig} +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.data.MornyInformation.getVersionAllFullTagHTML import cc.sukazyo.cono.morny.util.statistics.NumericStatistics import cc.sukazyo.cono.morny.util.tgapi.event.EventRuntimeException diff --git a/src/main/scala/cc/sukazyo/cono/morny/slash_action/ModuleSlashAction.scala b/src/main/scala/cc/sukazyo/cono/morny/slash_action/ModuleSlashAction.scala index 840f622..0b768a5 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/slash_action/ModuleSlashAction.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/slash_action/ModuleSlashAction.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.slash_action -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleSlashAction extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/slash_action/OnUserSlashAction.scala b/src/main/scala/cc/sukazyo/cono/morny/slash_action/OnUserSlashAction.scala index f5591c9..663ffda 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/slash_action/OnUserSlashAction.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/slash_action/OnUserSlashAction.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.slash_action -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramFormatter.* import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramParseEscape.escapeHtml as h import cc.sukazyo.cono.morny.util.UniversalCommand diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/ModuleSocialShare.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/ModuleSocialShare.scala index 566deba..62aab45 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/ModuleSocialShare.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/ModuleSocialShare.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.social_share -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur class ModuleSocialShare extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/api/SocialContent.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/api/SocialContent.scala index 469e6fe..84c5163 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/api/SocialContent.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/api/SocialContent.scala @@ -1,9 +1,9 @@ package cc.sukazyo.cono.morny.social_share.api +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.InlineQueryUnit import cc.sukazyo.cono.morny.social_share.api.SocialContent.{SocialMedia, SocialMediaType, SocialMediaWithUrl} import cc.sukazyo.cono.morny.social_share.api.SocialContent.SocialMediaType.{Photo, Video} -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.query.InlineQueryUnit import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId import com.pengrad.telegrambot.model.request.* diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/command/GetSocial.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/command/GetSocial.scala index b540805..0b9ab8c 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/command/GetSocial.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/command/GetSocial.scala @@ -1,10 +1,10 @@ package cc.sukazyo.cono.morny.social_share.command +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.data.TelegramStickers -import cc.sukazyo.cono.morny.util.tgapi.InputCommand -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.social_share.event.OnGetSocial +import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.pengrad.telegrambot.model.Update import com.pengrad.telegrambot.request.SendSticker diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/event/OnGetSocial.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/event/OnGetSocial.scala index 8472b31..38f0bc3 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/event/OnGetSocial.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/event/OnGetSocial.scala @@ -1,14 +1,14 @@ package cc.sukazyo.cono.morny.social_share.event -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.data.TelegramStickers -import cc.sukazyo.cono.morny.social_share.event.OnGetSocial.tryFetchSocial -import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} import cc.sukazyo.cono.morny.reporter.MornyReport import cc.sukazyo.cono.morny.social_share.api.{SocialTwitterParser, SocialWeiboParser} +import cc.sukazyo.cono.morny.social_share.event.OnGetSocial.tryFetchSocial import cc.sukazyo.cono.morny.social_share.external.{twitter, weibo} +import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Message.textWithUrls import com.pengrad.telegrambot.model.Chat import com.pengrad.telegrambot.model.request.ParseMode diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolBilibili.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolBilibili.scala index c44483d..83e5dfa 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolBilibili.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolBilibili.scala @@ -1,10 +1,10 @@ package cc.sukazyo.cono.morny.social_share.query -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId -import cc.sukazyo.cono.morny.Log.{exceptionLog, logger} -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, ITelegramQuery} +import cc.sukazyo.cono.morny.core.Log.{exceptionLog, logger} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{InlineQueryUnit, ITelegramQuery} import cc.sukazyo.cono.morny.reporter.MornyReport +import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId import com.pengrad.telegrambot.model.Update import com.pengrad.telegrambot.model.request.{InlineQueryResultArticle, InputTextMessageContent, ParseMode} diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolSocialContent.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolSocialContent.scala index 12442d0..9b53bfe 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolSocialContent.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolSocialContent.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.social_share.query -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, ITelegramQuery} +import cc.sukazyo.cono.morny.core.bot.api.{InlineQueryUnit, ITelegramQuery} import cc.sukazyo.cono.morny.social_share.api.{SocialTwitterParser, SocialWeiboParser} import cc.sukazyo.cono.morny.social_share.external.{twitter, weibo} import cc.sukazyo.cono.morny.social_share.external.twitter.{FXApi, TweetUrlInformation} diff --git a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolTwitter.scala b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolTwitter.scala index 187e2c5..618cd85 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolTwitter.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/social_share/query/ShareToolTwitter.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.social_share.query -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, ITelegramQuery} +import cc.sukazyo.cono.morny.core.bot.api.{InlineQueryUnit, ITelegramQuery} import cc.sukazyo.cono.morny.social_share.external.twitter import cc.sukazyo.cono.morny.social_share.external.twitter.TweetUrlInformation import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/InlineRawText.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/InlineRawText.scala index fa19780..1143400 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/InlineRawText.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/InlineRawText.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.tele_utils -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, ITelegramQuery} +import cc.sukazyo.cono.morny.core.bot.api.{InlineQueryUnit, ITelegramQuery} import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId import com.pengrad.telegrambot.model.Update import com.pengrad.telegrambot.model.request.{InlineQueryResultArticle, InputTextMessageContent} diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/ModuleTeleUtils.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/ModuleTeleUtils.scala index bae6288..7e3c4ba 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/ModuleTeleUtils.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/ModuleTeleUtils.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.tele_utils -import cc.sukazyo.cono.morny.internal.MornyInternalModule -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur import cc.sukazyo.cono.morny.tele_utils.event_hack.{CommandEventHack, EventHacker, HackerEventHandler} import cc.sukazyo.cono.morny.tele_utils.user_info.{CommandGetUser, InlineMyInformation} diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/CommandEventHack.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/CommandEventHack.scala index 8f2d7fc..5808c0d 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/CommandEventHack.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/CommandEventHack.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.tele_utils.event_hack -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/EventHacker.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/EventHacker.scala index 5ff34ee..ed90caa 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/EventHacker.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/EventHacker.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.tele_utils.event_hack -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec import com.google.gson.GsonBuilder import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/HackerEventHandler.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/HackerEventHandler.scala index 3059f0f..58ae45b 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/HackerEventHandler.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/event_hack/HackerEventHandler.scala @@ -1,8 +1,8 @@ package cc.sukazyo.cono.morny.tele_utils.event_hack -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} -import cc.sukazyo.cono.morny.Log.logger -import cc.sukazyo.cono.morny.MornyCoeur +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import com.google.gson.GsonBuilder import com.pengrad.telegrambot.model.Update import com.pengrad.telegrambot.model.request.ParseMode diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/CommandGetUser.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/CommandGetUser.scala index 341fd43..4a5a018 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/CommandGetUser.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/CommandGetUser.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.tele_utils.user_info -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ITelegramCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ITelegramCommand} import cc.sukazyo.cono.morny.util.tgapi.{InputCommand, Standardize} import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramUserInformation import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/InlineMyInformation.scala b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/InlineMyInformation.scala index ccb3328..1173f75 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/InlineMyInformation.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/tele_utils/user_info/InlineMyInformation.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.tele_utils.user_info -import cc.sukazyo.cono.morny.bot.query.{InlineQueryUnit, ITelegramQuery} +import cc.sukazyo.cono.morny.core.bot.api.{InlineQueryUnit, ITelegramQuery} import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramUserInformation import com.pengrad.telegrambot.model.Update diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/BotEventUniMeowTrigger.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/BotEventUniMeowTrigger.scala index 755d636..201cd05 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/BotEventUniMeowTrigger.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/BotEventUniMeowTrigger.scala @@ -1,8 +1,8 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.bot.api.{EventEnv, EventListener} +import cc.sukazyo.cono.morny.core.Log.logger +import cc.sukazyo.cono.morny.core.bot.api.{EventEnv, EventListener} import cc.sukazyo.cono.morny.util.tgapi.InputCommand -import cc.sukazyo.cono.morny.Log.logger class BotEventUniMeowTrigger (using commands: UniMeowCommandManager) extends EventListener { diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/ModuleUniMeow.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/ModuleUniMeow.scala index 091e3fc..1ddd50a 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/ModuleUniMeow.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/ModuleUniMeow.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.internal.MornyInternalModule +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.internal.MornyInternalModule class ModuleUniMeow extends MornyInternalModule { diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/UniMeowCommandManager.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/UniMeowCommandManager.scala index 95c23af..fb31e24 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/UniMeowCommandManager.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/UniMeowCommandManager.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.bot.command.ISimpleCommand -import cc.sukazyo.cono.morny.bot.command.MornyCommandManager.CommandMap +import cc.sukazyo.cono.morny.core.bot.api.ISimpleCommand +import cc.sukazyo.cono.morny.core.bot.api.MornyCommandManager.CommandMap import scala.collection.mutable diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/创.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/创.scala index 7f025ca..150195b 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/创.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/创.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ISimpleCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.* import com.pengrad.telegrambot.model.{MessageEntity, Update} diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/喵呜.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/喵呜.scala index 9a24de5..605ae51 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/喵呜.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/喵呜.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ISimpleCommand, ITelegramCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand, ITelegramCommand} import cc.sukazyo.cono.morny.data.TelegramStickers import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec diff --git a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/私わね.scala b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/私わね.scala index 0078b83..ca094b5 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/uni_meow/私わね.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/uni_meow/私わね.scala @@ -1,7 +1,7 @@ package cc.sukazyo.cono.morny.uni_meow -import cc.sukazyo.cono.morny.MornyCoeur -import cc.sukazyo.cono.morny.bot.command.{ICommandAlias, ISimpleCommand} +import cc.sukazyo.cono.morny.core.MornyCoeur +import cc.sukazyo.cono.morny.core.bot.api.{ICommandAlias, ISimpleCommand} import cc.sukazyo.cono.morny.util.tgapi.InputCommand import cc.sukazyo.cono.morny.util.UseMath.over import cc.sukazyo.cono.morny.util.UseRandom.* diff --git a/src/main/scala/cc/sukazyo/cono/morny/util/SttpPublic.scala b/src/main/scala/cc/sukazyo/cono/morny/util/SttpPublic.scala index 1f338b9..663388e 100644 --- a/src/main/scala/cc/sukazyo/cono/morny/util/SttpPublic.scala +++ b/src/main/scala/cc/sukazyo/cono/morny/util/SttpPublic.scala @@ -1,6 +1,6 @@ package cc.sukazyo.cono.morny.util -import cc.sukazyo.cono.morny.MornySystem +import cc.sukazyo.cono.morny.core.MornySystem import sttp.client3.basicRequest import sttp.model.Header