diff --git a/src/main/java/com/yutou/qqbot/models/Commands/WoodenFish.java b/src/main/java/com/yutou/qqbot/models/Commands/WoodenFish.java index 8115891..d478a34 100644 --- a/src/main/java/com/yutou/qqbot/models/Commands/WoodenFish.java +++ b/src/main/java/com/yutou/qqbot/models/Commands/WoodenFish.java @@ -35,15 +35,20 @@ public class WoodenFish extends Model { @Override public void onMessage(Long qq, MessageEvent event, boolean isGroup) { super.onMessage(qq, event, isGroup); + File file = null; if(msg.contains("地狱笑话")){ - File file=new File("muyu.mp3"); + file=new File("muyu.mp3"); + QQBotManager.getInstance().sendMessage(qq,"功德+1"); + }else if(msg.contains("遥遥领先")){ + file=new File("遥遥领先.m4a"); + } + if(file!=null){ if(file.exists()) { OfflineAudio audio = Objects.requireNonNull(event.getBot().getGroup(qq)).uploadAudio(ExternalResource.create(file)); MessageChainBuilder builder = new MessageChainBuilder(); builder.append(audio); QQBotManager.getInstance().sendMessage(qq,builder); } - QQBotManager.getInstance().sendMessage(qq,"功德+1"); } } }