为 @Lapis-Apple 也添加 khh 定制功能,代码整理

- 删除 NbnhhshQuery 类里遗留的测试 main()
- 删除 NbnhhshQuery.GuessReq 的冗余 static
- TelegramUserInformation 整理空行
This commit is contained in:
A.C.Sukazyo Eyre 2022-03-15 23:10:45 +08:00
parent 79e61e28a2
commit 9c0d207fbb
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
5 changed files with 14 additions and 12 deletions

View File

@ -1,6 +1,6 @@
## Core ## Core
VERSION = 0.6.0.2 VERSION = 0.6.1.0
# dependencies # dependencies

View File

@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny;
* the final field that will be updated by gradle automatically. * the final field that will be updated by gradle automatically.
*/ */
public class GradleProjectConfigures { public class GradleProjectConfigures {
public static final String VERSION = "0.6.0.2"; public static final String VERSION = "0.6.1.0";
public static final long COMPILE_TIMESTAMP = 1647237887029L; public static final long COMPILE_TIMESTAMP = 1647356707522L;
} }

View File

@ -14,11 +14,16 @@ public class OnKuohuanhuanNeedSleep extends EventListener {
@Override @Override
public boolean onMessage (@Nonnull Update update) { public boolean onMessage (@Nonnull Update update) {
final GregorianCalendar time = new GregorianCalendar(Locale.TAIWAN);
time.setTimeInMillis(System.currentTimeMillis());
if ( if (
update.message().from().id() == 786563752L && ( ( update.message().from().id() == 786563752L && (
new GregorianCalendar(Locale.TAIWAN).get(Calendar.HOUR_OF_DAY) >= 23 || time.get(Calendar.HOUR_OF_DAY) >= 23 ||
new GregorianCalendar(Locale.TAIWAN).get(Calendar.HOUR_OF_DAY) < 5 time.get(Calendar.HOUR_OF_DAY) < 5
) )) || ( update.message().from().id() == 1075871712L && (
(time.get(Calendar.HOUR_OF_DAY) >= 22 && time.get(Calendar.MINUTE) >= 30) ||
time.get(Calendar.HOUR_OF_DAY) < 5
))
) { ) {
MornyCoeur.extra().exec( MornyCoeur.extra().exec(
new DeleteMessage(update.message().chat().id(), new DeleteMessage(update.message().chat().id(),

View File

@ -23,7 +23,7 @@ public class NbnhhshQuery {
public Word[] words; public Word[] words;
} }
public static record GuessReq (String text) { public record GuessReq (String text) {
} }
public static final String API_URL = "https://lab.magiconch.com/api/nbnhhsh/"; public static final String API_URL = "https://lab.magiconch.com/api/nbnhhsh/";
@ -47,8 +47,4 @@ public class NbnhhshQuery {
} }
} }
public static void main(String[] args) {
System.out.println(new Gson().toJson(new GuessReq("8h28oey8 qe89 aoHO*)I'[ IK\"@+ )EOI)D\"{AIR\")Q @}")));
}
} }

View File

@ -3,6 +3,7 @@ package cc.sukazyo.cono.morny.util;
import com.pengrad.telegrambot.model.User; import com.pengrad.telegrambot.model.User;
import static cc.sukazyo.untitled.util.telegram.formatting.MsgEscape.escapeHtml; import static cc.sukazyo.untitled.util.telegram.formatting.MsgEscape.escapeHtml;
public class TelegramUserInformation { public class TelegramUserInformation {
public static String informationOutputHTML (User user) { public static String informationOutputHTML (User user) {