遥遥领先
This commit is contained in:
parent
6eedb9786e
commit
af3f85618d
@ -35,15 +35,20 @@ public class WoodenFish extends Model {
|
|||||||
@Override
|
@Override
|
||||||
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
||||||
super.onMessage(qq, event, isGroup);
|
super.onMessage(qq, event, isGroup);
|
||||||
|
File file = null;
|
||||||
if(msg.contains("地狱笑话")){
|
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()) {
|
if(file.exists()) {
|
||||||
OfflineAudio audio = Objects.requireNonNull(event.getBot().getGroup(qq)).uploadAudio(ExternalResource.create(file));
|
OfflineAudio audio = Objects.requireNonNull(event.getBot().getGroup(qq)).uploadAudio(ExternalResource.create(file));
|
||||||
MessageChainBuilder builder = new MessageChainBuilder();
|
MessageChainBuilder builder = new MessageChainBuilder();
|
||||||
builder.append(audio);
|
builder.append(audio);
|
||||||
QQBotManager.getInstance().sendMessage(qq,builder);
|
QQBotManager.getInstance().sendMessage(qq,builder);
|
||||||
}
|
}
|
||||||
QQBotManager.getInstance().sendMessage(qq,"功德+1");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user