Package top.focess.qq.api.bot
Interface BotManager
-
- All Known Implementing Classes:
SimpleBotManager
public interface BotManagerThis class is used to manage all the bots.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable BotgetBot(long id)Get the bot with special idList<Bot>getBots()Get the list of bots@NotNull Future<Bot>login(long id, String password)Login and get the bot with id and passwordbooleanlogin(Bot bot)Login the bot@NotNull BotloginDirectly(long id, String password)Login and get the bot with id and password This is a blocking methodbooleanlogout(@NotNull Bot bot)Logout the botbooleanrelogin(@NotNull Bot bot)Relogin the botBotremove(long id)Remove the bot
-
-
-
Method Detail
-
login
@NotNull @NotNull Future<Bot> login(long id, String password)
Login and get the bot with id and password- Parameters:
id- the id of the botpassword- the password of the bot- Returns:
- the bot
-
loginDirectly
@NotNull @NotNull Bot loginDirectly(long id, String password)
Login and get the bot with id and password This is a blocking method- Parameters:
id- the id of the botpassword- the password of the bot- Returns:
- the bot
- Throws:
BotLoginException- if the bot login failed
-
login
boolean login(Bot bot)
Login the bot- Parameters:
bot- the bot need to log in- Returns:
- true if the bot is not online, false otherwise
-
logout
boolean logout(@NotNull @NotNull Bot bot)Logout the bot- Parameters:
bot- the bot need to log out- Returns:
- true if the bot is online, false otherwise
-
getBot
@Nullable @Nullable Bot getBot(long id)
Get the bot with special id- Parameters:
id- the id of the bot- Returns:
- the bot with special id
-
relogin
boolean relogin(@NotNull @NotNull Bot bot)Relogin the bot- Parameters:
bot- the bot need to relogin- Returns:
- true if the bot is online, false otherwise
-
remove
Bot remove(long id)
Remove the bot- Parameters:
id- the bot id- Returns:
- the previous bot
-
-