Class FriendRequestEvent

    • Constructor Detail

      • FriendRequestEvent

        public FriendRequestEvent​(Bot bot,
                                  long id,
                                  String nick,
                                  @Nullable net.mamoe.mirai.contact.Group group,
                                  String message)
        Constructs a FriendRequestEvent
        Parameters:
        bot - the bot
        id - the id of the stranger
        nick - the nickname of the stranger
        group - the group of the stranger where the application comes from
        message - the message of the application
    • Method Detail

      • getId

        public long getId()
      • getNick

        public @NonNull String getNick()
      • getGroup

        public @Nullable net.mamoe.mirai.contact.Group getGroup()
      • getMessage

        public @NonNull String getMessage()
      • accept

        public void accept()
        Accept this request
      • getAccept

        public @Nullable 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