notifySpies
fun notifySpies(noticeText: () -> String, exclude: (Player) -> Boolean, message: () -> Component)(source)
Sends a copy of a message to every online spy that exclude does not reject.
noticeText, exclude and message are only invoked when someone will actually read the result, and the "you are seeing this because you have spy permission" hover is built once for the whole audience rather than per recipient. Spies are rare, so all of that matters on the message path - callers otherwise pay a translation lookup, and channel chat an O(members) set, for an audience that is usually empty.
Parameters
noticeText
Text shown on hover, explaining why the reader is seeing the message
exclude
Rejects players who are party to the message already
message
Builds the message body