| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
@NotNull net.mamoe.mirai.contact.Friend |
getAsFriend()
Get the bot itself as a friend
|
@Nullable net.mamoe.mirai.contact.Friend |
getFriend(long id)
Get the friend with special id
|
@NotNull net.mamoe.mirai.contact.Friend |
getFriendOrFail(long id)
Get the friend with special id
|
@NotNull List<net.mamoe.mirai.contact.Friend> |
getFriends()
Get all the friends
|
@Nullable net.mamoe.mirai.contact.Group |
getGroup(long id)
Get the group with special id
|
@NotNull List<net.mamoe.mirai.contact.Group> |
getGroups()
Get all the groups
|
long |
getId()
Get the id of the bot
|
net.mamoe.mirai.Bot |
getNativeBot()
Get the Mirai Bot Instance
|
String |
getPassword() |
long |
getUsername() |
int |
hashCode() |
boolean |
isDefaultBot()
Indicate this is the default bot
|
boolean |
isOnline()
Indicate the bot is online
|
boolean |
login()
Login the bot
|
boolean |
logout()
Logout the bot
|
boolean |
relogin()
Relogin the bot
|
public SimpleBot(long username,
String password,
net.mamoe.mirai.Bot bot)
public net.mamoe.mirai.Bot getNativeBot()
BotgetNativeBot 在接口中 Botpublic boolean relogin()
Botpublic boolean login()
Botpublic boolean logout()
Bot@NotNull public @NotNull net.mamoe.mirai.contact.Friend getFriendOrFail(long id)
BotgetFriendOrFail 在接口中 Botid - the friend id@Nullable public @Nullable net.mamoe.mirai.contact.Group getGroup(long id)
Bot@Nullable public @Nullable net.mamoe.mirai.contact.Friend getFriend(long id)
Bot@NotNull public @NotNull List<net.mamoe.mirai.contact.Friend> getFriends()
BotgetFriends 在接口中 Bot@NotNull public @NotNull List<net.mamoe.mirai.contact.Group> getGroups()
Botpublic boolean isOnline()
Bot@NotNull public @NotNull net.mamoe.mirai.contact.Friend getAsFriend()
BotgetAsFriend 在接口中 Botpublic long getId()
Botpublic boolean isDefaultBot()
BotisDefaultBot 在接口中 Botpublic long getUsername()
public String getPassword()
Copyright © 2022. All rights reserved.