public class Main extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Main.CommandLine
The CommandLine Tool Class can be used to exec command with customize executor, arguments and receiver.
|
static class |
Main.MainPlugin
The MainPlugin Plugin is a core plugin in Bot.
|
| 构造器和说明 |
|---|
Main() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
exit()
Exit Bot
|
static @NotNull net.mamoe.mirai.contact.Friend |
getAuthor()
get Author as a Friend
|
static long |
getAuthorId() |
static @NotNull Bot |
getBot() |
static BotManager |
getBotManager() |
static @Nullable ClientReceiver |
getClientReceiver() |
static @Nullable net.mamoe.mirai.contact.Friend |
getFriend(long id)
Get the Friend Mirai instance by its id
|
static @Nullable net.mamoe.mirai.contact.Group |
getGroup(long id)
Get the Group Mirai instance by its id
|
static LangConfig |
getLangConfig() |
static @NotNull FocessLogger |
getLogger() |
static Plugin |
getMainPlugin() |
static @Nullable Plugin |
getPlugin(Class<? extends Plugin> cls)
Get the plugin by its class
|
static @Nullable Plugin |
getPlugin(String name)
Get the plugin by its name
|
static List<Plugin> |
getPlugins()
Get all the loaded plugins
|
static @Nullable ServerReceiver |
getServerReceiver() |
static @Nullable Socket |
getSocket() |
static @Nullable ServerMultiReceiver |
getUdpServerMultiReceiver() |
static @Nullable ServerReceiver |
getUdpServerReceiver() |
static @Nullable Socket |
getUdpSocket() |
static long |
getUsername() |
static Version |
getVersion() |
static boolean |
isRunning() |
static void |
main(String[] args) |
@Nullable public static @Nullable net.mamoe.mirai.contact.Friend getFriend(long id)
id - the friend idgetBot(),
Bot.getFriend(long)@Nullable public static @Nullable net.mamoe.mirai.contact.Group getGroup(long id)
id - the group idgetBot(),
Bot.getGroup(long)public static boolean isRunning()
@NotNull public static @NotNull FocessLogger getLogger()
@NotNull public static @NotNull Bot getBot()
public static long getUsername()
public static long getAuthorId()
public static BotManager getBotManager()
@Nullable public static @Nullable Socket getSocket()
@Nullable public static @Nullable ServerReceiver getServerReceiver()
@Nullable public static @Nullable ClientReceiver getClientReceiver()
@Nullable public static @Nullable Socket getUdpSocket()
@Nullable public static @Nullable ServerReceiver getUdpServerReceiver()
@Nullable public static @Nullable ServerMultiReceiver getUdpServerMultiReceiver()
public static Version getVersion()
public static Plugin getMainPlugin()
public static List<Plugin> getPlugins()
@Nullable public static @Nullable Plugin getPlugin(String name)
name - the plugin name@Nullable public static @Nullable Plugin getPlugin(Class<? extends Plugin> cls)
cls - the plugin class@NotNull public static @NotNull net.mamoe.mirai.contact.Friend getAuthor()
public static void main(String[] args)
public static void exit()
public static LangConfig getLangConfig()
Copyright © 2022. All rights reserved.