From b252b3de51e2c6c23348760882b8b5059f3359c1 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Fri, 29 Apr 2022 17:44:34 +0800 Subject: [PATCH] #30 add support(warnlog) to /user command to channel identify --- gradle.properties | 2 +- .../cc/sukazyo/cono/morny/GradleProjectConfigures.java | 2 +- .../cono/morny/bot/command/GetUsernameAndId.java | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3c3e879..d270904 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.6.3.0 +VERSION = 0.6.3.1 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index da23614..cfd598d 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -5,5 +5,5 @@ package cc.sukazyo.cono.morny; */ public class GradleProjectConfigures { public static final String VERSION = "0.6.3.0"; - public static final long COMPILE_TIMESTAMP = 1651635619528L; + public static final long COMPILE_TIMESTAMP = 1651804975121L; } 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 f7d136f..627b6c3 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 @@ -32,7 +32,7 @@ public class GetUsernameAndId implements ITelegramCommand { long userId = event.message().from().id(); - if ( event.message().replyToMessage()!= null) { + if (event.message().replyToMessage()!= null) { userId = event.message().replyToMessage().from().id(); } if (args.length > 0) { @@ -61,6 +61,14 @@ public class GetUsernameAndId implements ITelegramCommand { final User user = response.chatMember().user(); + if (user.id() == 136817688) { + MornyCoeur.extra().exec(new SendMessage( + event.message().chat().id(), + "$__channel_identify" + )); + return; + } + MornyCoeur.extra().exec(new SendMessage( event.message().chat().id(), TelegramUserInformation.informationOutputHTML(user)