diff --git a/build.gradle b/build.gradle index 0fa5a50..9e60e84 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ mainClassName = 'cc.sukazyo.cono.morny.ServerMain' repositories { mavenCentral() - maven { name '-ws'; url 'https://mvn.sukazyo.cc' } + maven { name '-ws'; url 'https://mvn.sukazyo.cc/releases' } } String untitled (String lib, String upd = null) { diff --git a/gradle.properties b/gradle.properties index 40b7762..eb58aeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ ## Core -VERSION = 0.7.2.0 +VERSION = 0.7.2.1 CODENAME = fuzhou # dependencies -libSpotbugsVersion = 4.5.3 +libSpotbugsVersion = 4.7.2 libUntitledVersionMajor = 1 @@ -14,4 +14,4 @@ libMessivaVersion = 0.1.0.1 libJavaTelegramBotApiVersion = 5.6.0 -libJunitVersion = 5.8.2 +libJunitVersion = 5.9.0 diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index fbd8bca..9dcb287 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -4,7 +4,7 @@ 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.2.0"; + public static final String VERSION = "0.7.2.1"; public static final String CODENAME = "fuzhou"; - public static final long COMPILE_TIMESTAMP = 1655816387446L; + public static final long COMPILE_TIMESTAMP = 1663602816303L; } 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 3ff7ef6..0b300e2 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 @@ -15,13 +15,16 @@ public class EventListeners { public static final OnUserRandoms USER_RANDOMS = new OnUserRandoms(); public static final OnCallMsgSend CALL_MSG_SEND = new OnCallMsgSend(); public static final OnMedicationNotifyApply MEDICATION_NOTIFY_APPLY = new OnMedicationNotifyApply(); + public static final OnRandomlyTriggered RANDOMLY_TRIGGERED = new OnRandomlyTriggered(); public static void registerAllListeners () { EventListenerManager.addListener( ACTIVITY_RECORDER, UPDATE_TIMESTAMP_OFFSET_LOCK, + /* write functional event behind here */ // KUOHUANHUAN_NEED_SLEEP, COMMANDS_LISTENER, + RANDOMLY_TRIGGERED, USER_RANDOMS, USER_SLASH_ACTION, INLINE_QUERY, diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/event/OnRandomlyTriggered.java b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnRandomlyTriggered.java new file mode 100644 index 0000000..d710459 --- /dev/null +++ b/src/main/java/cc/sukazyo/cono/morny/bot/event/OnRandomlyTriggered.java @@ -0,0 +1,26 @@ +package cc.sukazyo.cono.morny.bot.event; + +import cc.sukazyo.cono.morny.bot.api.EventListener; + +public class OnRandomlyTriggered extends EventListener { + + /** + * function CODE_IK0XA1 + */ + // @Override +// public boolean onMessage (@Nonnull Update update) { +// +// if (update.message().text() == null) return false; +// +// if (update.message().text().contains("急") && Math.random()<(1d/20)) { +// MornyCoeur.extra().exec(new SendMessage( +// update.message().chat().id(), +// "急也没用" +// )); +// } +// +// return false; +// +// } + +}