mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +08:00
add core package
This commit is contained in:
parent
2374d39b41
commit
ee47446900
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny
|
||||
package cc.sukazyo.cono.morny.core
|
||||
|
||||
import cc.sukazyo.restools.ResourcesPackage
|
||||
|
@ -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(
|
@ -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 {
|
||||
* <br>
|
||||
* 过期事件即发生时间比 {@link MornyCoeur#coeurStartTimestamp()} 早的事件。
|
||||
* <br>
|
||||
* 如果此项设置为 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 系统的报告的基准时间.
|
||||
* <p>
|
||||
* 仅会用于 {@link cc.sukazyo.cono.morny.daemon.MornyReport} 内的时间敏感的报告,
|
||||
* 仅会用于 {@link cc.sukazyo.cono.morny.reporter.MornyReport} 内的时间敏感的报告,
|
||||
* 不会用于 {@code /info} 命令等位置。
|
||||
* <p>
|
||||
* 默认使用 {@link TimeZone#getDefault()}.
|
@ -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 = {}
|
||||
|
||||
}
|
@ -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
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
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
|
||||
@ -104,7 +103,7 @@ object ServerMain {
|
||||
.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)
|
||||
@ -119,15 +118,24 @@ object ServerMain {
|
||||
s"""Morny Cono Version
|
||||
|- version :
|
||||
| Morny ${MornySystem.CODENAME toUpperCase}
|
||||
| ${MornySystem.VERSION_BASE}${MornySystem.VERSION_DELTA match{case Some(d) => "-δ" + d case None => ""}}
|
||||
| ${MornySystem.VERSION_BASE}${
|
||||
MornySystem.VERSION_DELTA match {
|
||||
case Some(d) => "-δ" + d
|
||||
case None => ""
|
||||
}
|
||||
}
|
||||
|- md5hash :
|
||||
| ${MornySystem.getJarMD5}
|
||||
|- gitstat :
|
||||
|${ MornySystem.GIT_COMMIT match { case Some(commit) =>
|
||||
|${
|
||||
MornySystem.GIT_COMMIT match {
|
||||
case Some(commit) =>
|
||||
s""" on commit ${if (MornySystem.isCleanBuild) "- clean-build" else "<δ/non-clean-build>"}
|
||||
| $commit"""
|
||||
.stripMargin
|
||||
case None => " <non-git-build>" }}
|
||||
case None => " <non-git-build>"
|
||||
}
|
||||
}
|
||||
|- buildtd :
|
||||
| ${MornySystem.CODE_TIMESTAMP}
|
||||
| ${CommonFormat.formatDate(MornySystem.CODE_TIMESTAMP, 0)} [UTC]"""
|
@ -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()
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.bot.api
|
||||
package cc.sukazyo.cono.morny.core.bot.api
|
||||
|
||||
trait EventListener () {
|
||||
|
@ -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
|
@ -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.
|
@ -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
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.bot.command
|
||||
package cc.sukazyo.cono.morny.core.bot.api
|
||||
|
||||
/** A complex telegram command.
|
||||
*
|
@ -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
|
@ -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 {
|
@ -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}
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
||||
|
@ -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.*
|
@ -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
|
@ -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}
|
||||
|
@ -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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.internal;
|
||||
package cc.sukazyo.cono.morny.core.internal;
|
||||
|
||||
|
||||
import java.lang.annotation.Documented;
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}"
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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.*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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.*
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user