Package top.focess.qq
Class Main
- java.lang.Object
-
- top.focess.qq.Main
-
public class Main extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMain.CommandLineThe CommandLine Tool Class can be used to exec command with customize executor, arguments and receiver.static classMain.MainPluginThe MainPlugin Plugin is a core plugin in Bot.
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexit()Exit Botstatic @NotNull net.mamoe.mirai.contact.FriendgetAuthor()get Author as a Friendstatic longgetAuthorId()static @NotNull BotgetBot()static BotManagergetBotManager()static @Nullable ClientReceivergetClientReceiver()static @Nullable net.mamoe.mirai.contact.FriendgetFriend(long id)Get the Friend Mirai instance by its idstatic @Nullable net.mamoe.mirai.contact.GroupgetGroup(long id)Get the Group Mirai instance by its idstatic LangConfiggetLangConfig()static @NotNull FocessLoggergetLogger()static PlugingetMainPlugin()static @Nullable PlugingetPlugin(Class<? extends Plugin> cls)Get the plugin by its classstatic @Nullable PlugingetPlugin(String name)Get the plugin by its namestatic List<Plugin>getPlugins()Get all the loaded pluginsstatic @Nullable ServerReceivergetServerReceiver()static @Nullable SocketgetSocket()static @Nullable ServerMultiReceivergetUdpServerMultiReceiver()static @Nullable ServerReceivergetUdpServerReceiver()static @Nullable SocketgetUdpSocket()static longgetUsername()static VersiongetVersion()static booleanisRunning()static voidmain(String[] args)
-
-
-
Method Detail
-
getFriend
@Nullable public static @Nullable net.mamoe.mirai.contact.Friend getFriend(long id)
Get the Friend Mirai instance by its id- Parameters:
id- the friend id- Returns:
- the Friend Mirai instance
- See Also:
getBot(),Bot.getFriend(long)
-
getGroup
@Nullable public static @Nullable net.mamoe.mirai.contact.Group getGroup(long id)
Get the Group Mirai instance by its id- Parameters:
id- the group id- Returns:
- the Group Mirai instance
- See Also:
getBot(),Bot.getGroup(long)
-
isRunning
public static boolean isRunning()
-
getLogger
@NotNull public static @NotNull FocessLogger getLogger()
-
getBot
@NotNull public static @NotNull Bot getBot()
-
getUsername
public static long getUsername()
-
getAuthorId
public static long getAuthorId()
-
getBotManager
public static BotManager getBotManager()
-
getSocket
@Nullable public static @Nullable Socket getSocket()
-
getServerReceiver
@Nullable public static @Nullable ServerReceiver getServerReceiver()
-
getClientReceiver
@Nullable public static @Nullable ClientReceiver getClientReceiver()
-
getUdpSocket
@Nullable public static @Nullable Socket getUdpSocket()
-
getUdpServerReceiver
@Nullable public static @Nullable ServerReceiver getUdpServerReceiver()
-
getUdpServerMultiReceiver
@Nullable public static @Nullable ServerMultiReceiver getUdpServerMultiReceiver()
-
getVersion
public static Version getVersion()
-
getMainPlugin
public static Plugin getMainPlugin()
-
getPlugins
public static List<Plugin> getPlugins()
Get all the loaded plugins- Returns:
- all the loaded plugins
-
getPlugin
@Nullable public static @Nullable Plugin getPlugin(String name)
Get the plugin by its name- Parameters:
name- the plugin name- Returns:
- the plugin
-
getPlugin
@Nullable public static @Nullable Plugin getPlugin(Class<? extends Plugin> cls)
Get the plugin by its class- Parameters:
cls- the plugin class- Returns:
- the plugin
-
getAuthor
@NotNull public static @NotNull net.mamoe.mirai.contact.Friend getAuthor()
get Author as a Friend- Returns:
- Author as a Friend
-
main
public static void main(String[] args)
-
exit
public static void exit()
Exit Bot
-
getLangConfig
public static LangConfig getLangConfig()
-
-