From ae6bf2a5606f956bf3cbeb7ba304302e780db91a Mon Sep 17 00:00:00 2001 From: "A.C.Sukazyo Eyre" Date: Fri, 10 Jun 2022 19:09:01 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bbca55..d1f1ca8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ [Task Listing][todo] | [~~BBS~~][issues] | [Published][artifact] -[说明书][book] | [FindInTelegram][tg-account] +**[说明书][book] | [FindInTelegram][tg-account]**
From 58038e8a1febe5669e1fdc5abcd3f604b42014c5 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Tue, 21 Jun 2022 21:09:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=20"user?= =?UTF-8?q?=20not=20found"=20=E5=9C=A8=E5=86=85=E9=83=A8=E6=8A=9B=E5=87=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=A4=96=E9=83=A8=E6=97=A0=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20#38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../java/cc/sukazyo/cono/morny/GradleProjectConfigures.java | 4 ++-- .../cc/sukazyo/cono/morny/bot/command/GetUsernameAndId.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 97a0d67..40b7762 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.7.1.3 +VERSION = 0.7.2.0 CODENAME = fuzhou diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index 2f7fdbe..fbd8bca 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.1.3"; + public static final String VERSION = "0.7.2.0"; public static final String CODENAME = "fuzhou"; - public static final long COMPILE_TIMESTAMP = 1654590942119L; + public static final long COMPILE_TIMESTAMP = 1655816387446L; } diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/command/GetUsernameAndId.java b/src/main/java/cc/sukazyo/cono/morny/bot/command/GetUsernameAndId.java index 1b406c7..bb06ed2 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/command/GetUsernameAndId.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/command/GetUsernameAndId.java @@ -47,7 +47,7 @@ public class GetUsernameAndId implements ITelegramCommand { } } - final GetChatMemberResponse response = MornyCoeur.extra().exec( + final GetChatMemberResponse response = MornyCoeur.getAccount().execute( new GetChatMember(event.message().chat().id(), userId) ); From ab37144d45d33240eceddab8d536436f4841e7dc Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Mon, 19 Sep 2022 23:54:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BB=BA=E7=AB=8B=E4=BA=86=20OnRandomlyTri?= =?UTF-8?q?gged=20=E4=BA=8B=E4=BB=B6=E7=94=A8=E4=BA=8E=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=A5=BD=E7=8E=A9=E7=9A=84=E8=A7=A6=E5=8F=91=E5=BD=A9=E8=9B=8B?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=A5=87=E6=80=AA=E7=9A=84?= =?UTF-8?q?=20CODE=5FIK0XA1=20=E5=8A=9F=E8=83=BD=EF=BC=88=E4=BD=86?= =?UTF-8?q?=E6=9C=AA=E5=90=AF=E7=94=A8=EF=BC=89=EF=BC=8C=E4=B8=BA=E6=96=B0?= =?UTF-8?q?=E7=9A=84=20maven=20=E4=BB=93=E5=BA=93=E7=9A=84=20api=20changes?= =?UTF-8?q?=20=E5=81=9A=E4=BA=86=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - dependencies upgrade: - spotbugs 4.5.3 -> 4.7.2 - junit 5.8.2 -> 5.9.0 --- build.gradle | 2 +- gradle.properties | 6 ++--- .../cono/morny/GradleProjectConfigures.java | 4 +-- .../cono/morny/bot/event/EventListeners.java | 3 +++ .../morny/bot/event/OnRandomlyTriggered.java | 26 +++++++++++++++++++ 5 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/main/java/cc/sukazyo/cono/morny/bot/event/OnRandomlyTriggered.java 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; +// +// } + +}