diff --git a/gradle.properties b/gradle.properties index 097003d..435c0cb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.7.0.12 +VERSION = 0.7.0.13 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index c9bbcf6..ce9ca67 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny; * the final field that will be updated by gradle automatically. */ public class GradleProjectConfigures { - public static final String VERSION = "0.7.0.12"; - public static final long COMPILE_TIMESTAMP = 1653445911339L; + public static final String VERSION = "0.7.0.13"; + public static final long COMPILE_TIMESTAMP = 1653744934038L; } diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/event/EventListeners.java b/src/main/java/cc/sukazyo/cono/morny/bot/event/EventListeners.java index 53d6c72..c50e6b2 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/event/EventListeners.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/event/EventListeners.java @@ -11,7 +11,7 @@ public class EventListeners { public static final OnInlineQueries INLINE_QUERY = new OnInlineQueries(); public static final OnCallMe CALL_ME = new OnCallMe(); public static final OnEventHackHandle EVENT_HACK_HANDLE = new OnEventHackHandle(); - public static final OnKuohuanhuanNeedSleep KUOHUANHUAN_NEED_SLEEP = new OnKuohuanhuanNeedSleep(); + @SuppressWarnings("unused") static final OnKuohuanhuanNeedSleep KUOHUANHUAN_NEED_SLEEP = new OnKuohuanhuanNeedSleep(); public static final OnUserRandoms USER_RANDOMS = new OnUserRandoms(); public static final OnCallMsgSend CALL_MSG_SEND = new OnCallMsgSend(); @@ -19,7 +19,7 @@ public class EventListeners { EventListenerManager.addListener( ACTIVITY_RECORDER, UPDATE_TIMESTAMP_OFFSET_LOCK, - KUOHUANHUAN_NEED_SLEEP, +// KUOHUANHUAN_NEED_SLEEP, COMMANDS_LISTENER, USER_RANDOMS, USER_SLASH_ACTION, diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserSlashAction.java b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserSlashAction.java index b624a23..960ff17 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserSlashAction.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnUserSlashAction.java @@ -3,7 +3,6 @@ package cc.sukazyo.cono.morny.bot.event; import cc.sukazyo.cono.morny.MornyCoeur; import cc.sukazyo.cono.morny.bot.api.EventListener; import cc.sukazyo.cono.morny.util.tgapi.TGToStringFromMessage; -import cc.sukazyo.untitled.telegram.api.formatting.TGToString; import cc.sukazyo.untitled.util.command.CommonCommand; import cc.sukazyo.untitled.util.string.StringArrays; @@ -14,7 +13,6 @@ import com.pengrad.telegrambot.request.SendMessage; import javax.annotation.Nonnull; -import static cc.sukazyo.cono.morny.Log.logger; import static cc.sukazyo.untitled.util.telegram.formatting.MsgEscape.escapeHtml; public class OnUserSlashAction extends EventListener { @@ -24,20 +22,21 @@ public class OnUserSlashAction extends EventListener { final String text = event.message().text(); if (text == null) return false; - if (text.startsWith("/")) { + if (text.startsWith("/")) + { /// Due to @Lapis_Apple, we stopped slash action function at .DP7 groups. /// It may be enabled after some updates when the function will not be conflicted to other bots. // if (event.message().chat().id() == ) return false; - if (event.message().chat().title() != null && event.message().chat().title().contains(".DP7")) { - logger.info(String.format(""" - Chat slash action ignored due to the following keyword. - - %s - - ".DP7\"""", - TGToString.as(event.message().chat()).toStringFullNameId() - )); - return false; - } +//{ if (event.message().chat().title() != null && event.message().chat().title().contains(".DP7")) { +// logger.info(String.format(""" +// Chat slash action ignored due to the following keyword. +// - %s +// - ".DP7\"""", +// TGToString.as(event.message().chat()).toStringFullNameId() +// )); +// return false; +// } final String[] action = CommonCommand.format(text); action[0] = action[0].substring(1);