Package top.focess.qq.api.bot.message
Class MessageChain
- java.lang.Object
-
- top.focess.qq.api.bot.message.Message
-
- top.focess.qq.api.bot.message.MessageChain
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Messageget(int index)Get the message at the specified index@NotNull Iterator<Message>iterator()Get the iterator of this message chainstatic @NotNull MessageChainof(net.mamoe.mirai.message.data.MessageChain message)Wrap a message chainintsize()Get the size of this message chainjava.util.stream.Stream<Message>stream()Get the stream of this message chainStringtoMiraiCode()Get the message as MiraiCode-
Methods inherited from class top.focess.qq.api.bot.message.Message
getNativeMessage, of, plus, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
@NotNull public @NotNull Iterator<Message> iterator()
Get the iterator of this message chain
-
stream
public java.util.stream.Stream<Message> stream()
Get the stream of this message chain- Returns:
- the stream of this message chain
-
toMiraiCode
public String toMiraiCode()
Get the message as MiraiCode- Returns:
- the message as MiraiCode
-
get
public Message get(int index)
Get the message at the specified index- Parameters:
index- the specified index- Returns:
- the message at the specified index
-
size
public int size()
Get the size of this message chain- Returns:
- the size of this message chain
-
of
@NotNull @Contract("_ -> new") public static @NotNull MessageChain of(net.mamoe.mirai.message.data.MessageChain message)Wrap a message chain- Parameters:
message- the native message chain- Returns:
- the wrapped message chain
-
-