mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +08:00
为 @Lapis-Apple 也添加 khh 定制功能,代码整理
- 删除 NbnhhshQuery 类里遗留的测试 main() - 删除 NbnhhshQuery.GuessReq 的冗余 static - TelegramUserInformation 整理空行
This commit is contained in:
parent
79e61e28a2
commit
9c0d207fbb
@ -1,6 +1,6 @@
|
||||
## Core
|
||||
|
||||
VERSION = 0.6.0.2
|
||||
VERSION = 0.6.1.0
|
||||
|
||||
# dependencies
|
||||
|
||||
|
@ -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.6.0.2";
|
||||
public static final long COMPILE_TIMESTAMP = 1647237887029L;
|
||||
public static final String VERSION = "0.6.1.0";
|
||||
public static final long COMPILE_TIMESTAMP = 1647356707522L;
|
||||
}
|
||||
|
@ -14,11 +14,16 @@ public class OnKuohuanhuanNeedSleep extends EventListener {
|
||||
|
||||
@Override
|
||||
public boolean onMessage (@Nonnull Update update) {
|
||||
final GregorianCalendar time = new GregorianCalendar(Locale.TAIWAN);
|
||||
time.setTimeInMillis(System.currentTimeMillis());
|
||||
if (
|
||||
update.message().from().id() == 786563752L && (
|
||||
new GregorianCalendar(Locale.TAIWAN).get(Calendar.HOUR_OF_DAY) >= 23 ||
|
||||
new GregorianCalendar(Locale.TAIWAN).get(Calendar.HOUR_OF_DAY) < 5
|
||||
)
|
||||
( update.message().from().id() == 786563752L && (
|
||||
time.get(Calendar.HOUR_OF_DAY) >= 23 ||
|
||||
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(
|
||||
new DeleteMessage(update.message().chat().id(),
|
||||
|
@ -23,7 +23,7 @@ public class NbnhhshQuery {
|
||||
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/";
|
||||
@ -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 @}")));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package cc.sukazyo.cono.morny.util;
|
||||
import com.pengrad.telegrambot.model.User;
|
||||
|
||||
import static cc.sukazyo.untitled.util.telegram.formatting.MsgEscape.escapeHtml;
|
||||
|
||||
public class TelegramUserInformation {
|
||||
|
||||
public static String informationOutputHTML (User user) {
|
||||
|
Loading…
Reference in New Issue
Block a user