Package top.focess.qq.core.bot
Class SimpleBot
- java.lang.Object
-
- top.focess.qq.core.bot.SimpleBot
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)net.mamoe.mirai.contact.FriendgetAsFriend()Get the bot itself as a friendnet.mamoe.mirai.contact.FriendgetFriend(long id)Get the friend with special idnet.mamoe.mirai.contact.FriendgetFriendOrFail(long id)Get the friend with special idList<net.mamoe.mirai.contact.Friend>getFriends()Get all the friendsnet.mamoe.mirai.contact.GroupgetGroup(long id)Get the group with special idList<net.mamoe.mirai.contact.Group>getGroups()Get all the groupslonggetId()Get the id of the botnet.mamoe.mirai.BotgetNativeBot()Get the Mirai Bot InstanceStringgetPassword()PlugingetPlugin()Get the plugin of the botlonggetUsername()inthashCode()booleanisDefaultBot()Indicate this is the default botbooleanisOnline()Indicate the bot is onlinebooleanlogin()Login the botbooleanlogout()Logout the botbooleanrelogin()Relogin the botvoidsetNativeBot(net.mamoe.mirai.Bot nativeBot)
-
-
-
Method Detail
-
getNativeBot
@NotNull public net.mamoe.mirai.Bot getNativeBot()
Description copied from interface:BotGet the Mirai Bot Instance- Specified by:
getNativeBotin interfaceBot- Returns:
- the Mirai Bot Instance
-
relogin
public boolean relogin()
Description copied from interface:BotRelogin the bot
-
login
public boolean login()
Description copied from interface:BotLogin the bot
-
logout
public boolean logout()
Description copied from interface:BotLogout the bot
-
getFriendOrFail
@NotNull public net.mamoe.mirai.contact.Friend getFriendOrFail(long id)
Description copied from interface:BotGet the friend with special id- Specified by:
getFriendOrFailin interfaceBot- Parameters:
id- the friend id- Returns:
- the friend with special id
-
getGroup
@Nullable public net.mamoe.mirai.contact.Group getGroup(long id)
Description copied from interface:BotGet the group with special id
-
getFriend
@Nullable public net.mamoe.mirai.contact.Friend getFriend(long id)
Description copied from interface:BotGet the friend with special id
-
getFriends
@NotNull public List<net.mamoe.mirai.contact.Friend> getFriends()
Description copied from interface:BotGet all the friends- Specified by:
getFriendsin interfaceBot- Returns:
- all the friends
-
getGroups
@NotNull public List<net.mamoe.mirai.contact.Group> getGroups()
Description copied from interface:BotGet all the groups
-
isOnline
public boolean isOnline()
Description copied from interface:BotIndicate the bot is online
-
getAsFriend
@NotNull public net.mamoe.mirai.contact.Friend getAsFriend()
Description copied from interface:BotGet the bot itself as a friend- Specified by:
getAsFriendin interfaceBot- Returns:
- the bot itself as a friend
-
getId
public long getId()
Description copied from interface:BotGet the id of the bot
-
isDefaultBot
public boolean isDefaultBot()
Description copied from interface:BotIndicate this is the default bot- Specified by:
isDefaultBotin interfaceBot- Returns:
- true if this is the default bot, false otherwise
-
getUsername
public long getUsername()
-
getPassword
public String getPassword()
-
setNativeBot
public void setNativeBot(net.mamoe.mirai.Bot nativeBot)
-
-