mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 19:24:53 +08:00
feature fix #28
This commit is contained in:
parent
60bf104e94
commit
7bbe75a522
@ -1,6 +1,6 @@
|
||||
## Core
|
||||
|
||||
VERSION = 0.5.1.1
|
||||
VERSION = 0.5.2.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.5.1.1";
|
||||
public static final long COMPILE_TIMESTAMP = 1644381533694L;
|
||||
public static final String VERSION = "0.5.2.0";
|
||||
public static final long COMPILE_TIMESTAMP = 1646742061976L;
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ public class MornyCommands {
|
||||
new 喵呜.抱抱(),
|
||||
new 喵呜.揉揉(),
|
||||
new 喵呜.蹭蹭(),
|
||||
new 喵呜.贴贴()
|
||||
new 喵呜.贴贴(),
|
||||
new 私わね()
|
||||
);
|
||||
|
||||
}
|
||||
|
38
src/main/java/cc/sukazyo/cono/morny/bot/command/私わね.java
Normal file
38
src/main/java/cc/sukazyo/cono/morny/bot/command/私わね.java
Normal file
@ -0,0 +1,38 @@
|
||||
package cc.sukazyo.cono.morny.bot.command;
|
||||
|
||||
import cc.sukazyo.cono.morny.MornyCoeur;
|
||||
import cc.sukazyo.untitled.util.telegram.object.InputCommand;
|
||||
import com.pengrad.telegrambot.model.Update;
|
||||
import com.pengrad.telegrambot.request.SendMessage;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@SuppressWarnings("NonAsciiCharacters")
|
||||
public class 私わね implements ISimpleCommand {
|
||||
|
||||
@Nonnull
|
||||
@Override public String getName () { return "/me"; }
|
||||
|
||||
@Nullable
|
||||
@Override public String[] getAliases () { return null; }
|
||||
|
||||
@Override
|
||||
public void execute (@Nonnull InputCommand command, @Nonnull Update event) {
|
||||
if (ThreadLocalRandom.current().nextInt(521) == 0) {
|
||||
// 可以接入未来的心情系统(如果有的话)
|
||||
final String text = switch (ThreadLocalRandom.current().nextInt(11)) {
|
||||
case 0,7,8,9,10 -> "才不是";
|
||||
case 1,2,3,6 -> "才不是!";
|
||||
case 4,5 -> "才不是..";
|
||||
default -> throw new IllegalStateException("Unexpected random value in 私わね command.");
|
||||
};
|
||||
MornyCoeur.extra().exec(new SendMessage(
|
||||
event.message().chat().id(),
|
||||
text
|
||||
).replyToMessageId(event.message().messageId()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user