Package top.focess.qq.api.bot.message
Class MessageSource
- java.lang.Object
-
- top.focess.qq.api.bot.message.MessageSource
-
public class MessageSource extends Object
Represents a message source.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBotId()Get the bot idint[]getIds()Get the message idsint[]getInternalIds()Get the message internal idsnet.mamoe.mirai.message.data.MessageSourcegetNativeSource()longgetSender()Get the sender idlonggetTarget()Get the target idintgetTime()Get the sending timestatic MessageSourceof(net.mamoe.mirai.message.data.MessageSource source)Wrap a message source
-
-
-
Method Detail
-
of
@NotNull @Contract(value="_ -> new", pure=true) public static 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
-
-