Class GroupMessageEvent

  • All Implemented Interfaces:
    Serializable

    public class GroupMessageEvent
    extends MessageEvent
    Called when a member who chats in the group the bot is in (this does not execute any commands)
    See Also:
    Serialized Form
    • Constructor Detail

      • GroupMessageEvent

        public GroupMessageEvent​(Bot bot,
                                 net.mamoe.mirai.contact.Member member,
                                 net.mamoe.mirai.message.data.MessageChain message,
                                 net.mamoe.mirai.message.data.OnlineMessageSource.Incoming.FromGroup source)
        Constructs a GroupMessageEvent
        Parameters:
        bot - the bot
        member - the one who chats in the group the bot is in
        message - the chat message
        source - the source of the message
    • Method Detail

      • getMember

        public net.mamoe.mirai.contact.Member getMember()
      • getGroup

        public net.mamoe.mirai.contact.Group getGroup()
        Get the Group Mirai instance of the member
        Returns:
        the Group Mirai instance of the member
      • getSource

        public net.mamoe.mirai.message.data.OnlineMessageSource.Incoming.FromGroup getSource()