public class FriendRequestEvent extends BotEvent
| 构造器和说明 |
|---|
FriendRequestEvent(Bot bot,
long id,
String nick,
net.mamoe.mirai.contact.Group group,
String message)
Constructs a FriendRequestEvent
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept()
Accept this request
|
@Nullable Boolean |
getAccept() |
@Nullable net.mamoe.mirai.contact.Group |
getGroup() |
long |
getId() |
@NotNull String |
getMessage() |
@NotNull String |
getNick() |
boolean |
isBlackList()
Indicate add this stranger to blacklist
|
void |
refuse()
Refuse this request
|
void |
refuse(boolean blacklist)
Refuse this request and add blacklist to it or not
|
isPrevent, setPreventpublic FriendRequestEvent(Bot bot, long id, String nick, net.mamoe.mirai.contact.Group group, String message)
bot - the botid - the id of the strangernick - the nickname of the strangergroup - the group of the stranger where the application comes frommessage - the message of the applicationpublic long getId()
@NotNull public @NotNull String getNick()
@Nullable public @Nullable net.mamoe.mirai.contact.Group getGroup()
@NotNull public @NotNull String getMessage()
public void accept()
@Nullable public @Nullable Boolean getAccept()
public void refuse()
public void refuse(boolean blacklist)
blacklist - whether to add blacklist topublic boolean isBlackList()
Copyright © 2022. All rights reserved.