Package top.focess.qq
Class FocessQQ
- java.lang.Object
-
- top.focess.qq.FocessQQ
-
public class FocessQQ extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFocessQQ.MainPluginThe MainPlugin Plugin is a core plugin in Bot.
-
Constructor Summary
Constructors Constructor Description FocessQQ()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexit()Exit Botstatic @Nullable net.mamoe.mirai.contact.FriendgetAdministrator()Get Administrator as a Friendstatic @Nullable LonggetAdministratorId()static @NonNull BotgetBot()static @NonNull 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 @NonNull 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 @NonNull 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 @NonNull VersiongetVersion()static booleanisRunning()static voidmain(String[] args)
-
-
-
Method Detail
-
getFriend
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
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
public static @NonNull FocessLogger getLogger()
-
getBot
public static @NonNull Bot getBot()
-
getUsername
public static long getUsername()
-
getAdministratorId
public static @Nullable Long getAdministratorId()
-
getBotManager
public static @NonNull BotManager getBotManager()
-
getSocket
public static @Nullable Socket getSocket()
-
getServerReceiver
public static @Nullable ServerReceiver getServerReceiver()
-
getClientReceiver
public static @Nullable ClientReceiver getClientReceiver()
-
getUdpSocket
public static @Nullable Socket getUdpSocket()
-
getUdpServerReceiver
public static @Nullable ServerReceiver getUdpServerReceiver()
-
getUdpServerMultiReceiver
public static @Nullable ServerMultiReceiver getUdpServerMultiReceiver()
-
getVersion
public static @NonNull Version getVersion()
-
getMainPlugin
public static Plugin getMainPlugin()
-
getPlugins
public static @NonNull List<Plugin> getPlugins()
Get all the loaded plugins- Returns:
- all the loaded plugins
-
getPlugin
public static @Nullable Plugin getPlugin(String name)
Get the plugin by its name- Parameters:
name- the plugin name- Returns:
- the plugin
-
getPlugin
public static @Nullable Plugin getPlugin(Class<? extends Plugin> cls)
Get the plugin by its class- Parameters:
cls- the plugin class- Returns:
- the plugin
-
getAdministrator
public static @Nullable net.mamoe.mirai.contact.Friend getAdministrator()
Get Administrator as a Friend- Returns:
- the Administrator as a Friend
-
main
public static void main(String[] args)
-
exit
public static void exit()
Exit Bot
-
getLangConfig
public static LangConfig getLangConfig()
-
-