Package top.focess.qq.api.event.request
Class FriendRequestEvent
- java.lang.Object
-
- top.focess.qq.api.event.Event
-
- top.focess.qq.api.event.bot.BotEvent
-
- top.focess.qq.api.event.request.FriendRequestEvent
-
- All Implemented Interfaces:
Serializable
public class FriendRequestEvent extends BotEvent
Called when a friend-request comes- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FriendRequestEvent(Bot bot, long id, String nick, net.mamoe.mirai.contact.Group group, String message)Constructs a FriendRequestEvent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept()Accept this requestBooleangetAccept()net.mamoe.mirai.contact.GroupgetGroup()longgetId()StringgetMessage()StringgetNick()booleanisBlackList()Indicate add this stranger to blacklistvoidrefuse()Refuse this requestvoidrefuse(boolean blacklist)Refuse this request and add blacklist to it or not-
Methods inherited from class top.focess.qq.api.event.Event
isPrevent, setPrevent
-
-
-
-
Constructor Detail
-
FriendRequestEvent
public FriendRequestEvent(Bot bot, long id, String nick, net.mamoe.mirai.contact.Group group, String message)
Constructs a FriendRequestEvent- Parameters:
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 application
-
-
Method Detail
-
getId
public long getId()
-
getNick
@NotNull public String getNick()
-
getGroup
@Nullable public net.mamoe.mirai.contact.Group getGroup()
-
getMessage
@NotNull public String getMessage()
-
accept
public void accept()
Accept this request
-
getAccept
@Nullable public Boolean getAccept()
-
refuse
public void refuse()
Refuse this request
-
refuse
public void refuse(boolean blacklist)
Refuse this request and add blacklist to it or not- Parameters:
blacklist- whether to add blacklist to
-
isBlackList
public boolean isBlackList()
Indicate add this stranger to blacklist- Returns:
- true if add this stranger to blacklist, false otherwise
-
-