mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-23 10:20:14 +08:00
miraiAPI
This commit is contained in:
parent
8383c77209
commit
deeb8fa342
@ -42,6 +42,14 @@ public class Bot {
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addGroup(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void quitGroup(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void sendGroupMessage(long group, String message){
|
public void sendGroupMessage(long group, String message){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,20 @@ import java.util.List;
|
|||||||
* for only using , you should refer to Mirai-API
|
* for only using , you should refer to Mirai-API
|
||||||
*/
|
*/
|
||||||
public class MiraiAPI {
|
public class MiraiAPI {
|
||||||
|
|
||||||
|
public static void startMirai(String[] args){
|
||||||
|
MiraiMain.main(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void closeMirai(){
|
||||||
|
MiraiServer.getInstance().shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void restartMirai(String[] args){
|
||||||
|
MiraiServer.getInstance().shutdown();
|
||||||
|
MiraiMain.main(args);
|
||||||
|
}
|
||||||
|
|
||||||
public static String getMiraiVersion(){
|
public static String getMiraiVersion(){
|
||||||
return MiraiServer.MIRAI_VERSION;
|
return MiraiServer.MIRAI_VERSION;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package net.mamoe.mirai;
|
package net.mamoe.mirai;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author NaturalHG
|
* @author NaturalHG
|
||||||
*/
|
*/
|
||||||
public final class MiraiMain {
|
public final class MiraiMain {
|
||||||
|
@Getter
|
||||||
private static MiraiServer server;
|
private static MiraiServer server;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user