mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +08:00
使 user 支持命令在无参时设置目标为调用者
This commit is contained in:
parent
ee30b0a0ff
commit
8dad0930bc
@ -1,6 +1,6 @@
|
|||||||
## Core
|
## Core
|
||||||
|
|
||||||
VERSION = 0.4.2.3
|
VERSION = 0.4.2.4
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -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.4.2.3";
|
public static final String VERSION = "0.4.2.4";
|
||||||
public static final long COMPILE_TIMESTAMP = 1639543312227L;
|
public static final long COMPILE_TIMESTAMP = 1639736122490L;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class GetUsernameAndId {
|
|||||||
"[Unavailable] Too much arguments."
|
"[Unavailable] Too much arguments."
|
||||||
).replyToMessageId(event.message().messageId())); return; }
|
).replyToMessageId(event.message().messageId())); return; }
|
||||||
|
|
||||||
long userId = 0;
|
long userId = event.message().from().id();
|
||||||
|
|
||||||
if ( event.message().replyToMessage()!= null) {
|
if ( event.message().replyToMessage()!= null) {
|
||||||
userId = event.message().replyToMessage().from().id();
|
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(
|
final GetChatMemberResponse response = MornyCoeur.getAccount().execute(
|
||||||
new GetChatMember(event.message().chat().id(), userId)
|
new GetChatMember(event.message().chat().id(), userId)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user