Class MessageSource


  • public class MessageSource
    extends Object
    Represents a message source.
    • Method Detail

      • of

        @NotNull
        @Contract(value="_ -> new",
                  pure=true)
        public static @NotNull MessageSource of​(net.mamoe.mirai.message.data.MessageSource source)
        Wrap a message source
        Parameters:
        source - the native message source
        Returns:
        the wrapped message source
      • getNativeSource

        public net.mamoe.mirai.message.data.MessageSource getNativeSource()
      • getSender

        public long getSender()
        Get the sender id
        Returns:
        the sender id
      • getTarget

        public long getTarget()
        Get the target id
        Returns:
        the target id
      • getBotId

        public long getBotId()
        Get the bot id
        Returns:
        the bot id
      • getTime

        public int getTime()
        Get the sending time
        Returns:
        the sending time
      • getIds

        public int[] getIds()
        Get the message ids
        Returns:
        the message ids
      • getInternalIds

        public int[] getInternalIds()
        Get the message internal ids
        Returns:
        the message internal ids