diff --git a/gradle.properties b/gradle.properties index 50cbf59..2d2e5dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.4.2.3 +VERSION = 0.4.2.4 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index 8a50a22..3a8381d 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -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.4.2.3"; - public static final long COMPILE_TIMESTAMP = 1639543312227L; + public static final String VERSION = "0.4.2.4"; + public static final long COMPILE_TIMESTAMP = 1639736122490L; } diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/event/on_commands/GetUsernameAndId.java b/src/main/java/cc/sukazyo/cono/morny/bot/event/on_commands/GetUsernameAndId.java index b54bb9d..18e91a0 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/event/on_commands/GetUsernameAndId.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/event/on_commands/GetUsernameAndId.java @@ -19,7 +19,7 @@ public class GetUsernameAndId { "[Unavailable] Too much arguments." ).replyToMessageId(event.message().messageId())); return; } - long userId = 0; + long userId = event.message().from().id(); if ( event.message().replyToMessage()!= null) { userId = event.message().replyToMessage().from().id(); @@ -36,14 +36,6 @@ public class GetUsernameAndId { } } - if (userId == 0) { - MornyCoeur.getAccount().execute(new SendMessage( - event.message().chat().id(), - "[Unavailable] no userid given." - ).replyToMessageId(event.message().messageId())); - return; - } - final GetChatMemberResponse response = MornyCoeur.getAccount().execute( new GetChatMember(event.message().chat().id(), userId) );