添加了一个可以抽取 "debian安装镜像" 的命令 /install

This commit is contained in:
A.C.Sukazyo Eyre 2022-10-05 21:19:45 +08:00
parent afef4f0345
commit 7bb179658e
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
4 changed files with 21 additions and 6 deletions

View File

@ -1,6 +1,6 @@
## Core ## Core
VERSION = 0.8.0.1 VERSION = 0.8.0.3
CODENAME = fuzhou CODENAME = fuzhou
@ -8,8 +8,6 @@ CODENAME = fuzhou
libSpotbugsVersion = 4.7.2 libSpotbugsVersion = 4.7.2
libUntitledVersionMajor = 1
libMessivaVersion = 0.1.0.1 libMessivaVersion = 0.1.0.1
libJavaTelegramBotApiVersion = 5.6.0 libJavaTelegramBotApiVersion = 5.6.0

View File

@ -4,7 +4,7 @@ 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.8.0.2"; public static final String VERSION = "0.8.0.3";
public static final String CODENAME = "fuzhou"; public static final String CODENAME = "fuzhou";
public static final long COMPILE_TIMESTAMP = 1664867846222L; public static final long COMPILE_TIMESTAMP = 1664975839021L;
} }

View File

@ -57,6 +57,7 @@ public class MornyCommands {
} }
} }
@SuppressWarnings("NonAsciiCharacters")
public MornyCommands () { public MornyCommands () {
register( register(
@ -85,7 +86,8 @@ public class MornyCommands {
new 喵呜.揉揉(), new 喵呜.揉揉(),
new 喵呜.蹭蹭(), new 喵呜.蹭蹭(),
new 喵呜.贴贴(), new 喵呜.贴贴(),
new 私わね() new 私わね(),
new 喵呜.Progynova()
); );
} }

View File

@ -1,10 +1,12 @@
package cc.sukazyo.cono.morny.bot.command; package cc.sukazyo.cono.morny.bot.command;
import cc.sukazyo.cono.morny.MornyCoeur; import cc.sukazyo.cono.morny.MornyCoeur;
import cc.sukazyo.cono.morny.data.TelegramStickers;
import cc.sukazyo.cono.morny.util.tgapi.InputCommand; import cc.sukazyo.cono.morny.util.tgapi.InputCommand;
import com.pengrad.telegrambot.model.Update; import com.pengrad.telegrambot.model.Update;
import com.pengrad.telegrambot.model.request.ParseMode; import com.pengrad.telegrambot.model.request.ParseMode;
import com.pengrad.telegrambot.request.SendMessage; import com.pengrad.telegrambot.request.SendMessage;
import com.pengrad.telegrambot.request.SendSticker;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -56,4 +58,17 @@ public class 喵呜 {
} }
} }
public static class Progynova implements ITelegramCommand {
@Nonnull @Override public String getName () { return "install"; }
@Nullable @Override public String[] getAliases () { return new String[0]; }
@Nonnull @Override public String getParamRule () { return ""; }
@Nonnull @Override public String getDescription () { return "抽取一个神秘盒子"; }
@Override public void execute (@Nonnull InputCommand command, @Nonnull Update event) {
MornyCoeur.extra().exec(new SendSticker(
event.message().chat().id(),
TelegramStickers.ID_PROGYNOVA
).replyToMessageId(event.message().messageId()));
}
}
} }